#672172 auto-complete-el: ac-symbol-documentation let binding help-xref-following

#672172#5
Date:
2012-05-08 22:48:02 UTC
From:
To:
Starting from "emacs23 -q", evaluating

(progn
  (require 'auto-complete)
  (ac-symbol-documentation 'emacs-version)
  (describe-function 'emacs-version))

gives a warning in the *Messages* buffer

  Warning: defvar ignored because help-xref-following is let-bound

and an error

  Debugger entered--Lisp error: (void-variable help-xref-following)


I struck this somehow when auto-complete presented some variables and
their docstring and I later tried to bring up describe-variable
separately, but alas I don't have a good recipe to reproduce the
problem.

I believe ac-symbol-documentation should (require 'help-mode) before
let-binding help-xref-following, since as the message says a let will
defeat a defvar and leave the variable unbound.

Unless ac-symbol-documentation can be confident help-mode.el is already
loaded, but it looks like that's not so.

I believe help-mode.el and thus (require 'help-mode) is available in
emacs22 and up, but not xemacs21.  But that's fine since auto-complete
is only for emacs22 and up anyway is it?