From: Glenn Morris Date: Sat, 14 Nov 2009 19:57:09 +0000 (+0000) Subject: (elint-standard-variables): Doc fix. X-Git-Tag: emacs-pretest-23.1.90~429 X-Git-Url: https://code.delx.au/gnu-emacs/commitdiff_plain/a61344d684331fc5a29f813cf9fea372d8a4561f (elint-standard-variables): Doc fix. Add some comments related to #1063. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 37b8d7f98e..aa3ea918e5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,7 @@ +2009-11-14 Glenn Morris + + * emacs-lisp/elint.el (elint-standard-variables): Doc fix. + 2009-11-14 Shigeru Fukaya * emacs-lisp/elint.el (elint-standard-variables): Add some variables diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el index ec408d2d45..bcb399c23f 100644 --- a/lisp/emacs-lisp/elint.el +++ b/lisp/emacs-lisp/elint.el @@ -118,13 +118,15 @@ are as follows, and suppress messages about the indicated features: ;;; Data ;;; -;; FIXME does this serve any useful purpose now elint-builtin-variables exists? (defconst elint-standard-variables + ;; Most of these are defined in C with no documentation. + ;; FIXME I don't see why they shouldn't just get doc-strings. '(vc-mode local-write-file-hooks activate-menubar-hook buffer-name-history coding-system-history extended-command-history kbd-macro-termination-hook read-expression-history yes-or-no-p-history) - "Standard buffer local variables, excluding `elint-builtin-variables'.") + "Standard variables, excluding `elint-builtin-variables'. +These are variables that we cannot detect automatically for some reason.") (defvar elint-builtin-variables nil "List of built-in variables. Set by `elint-initialize'. @@ -638,6 +640,13 @@ Returns the environment created by the form." (defun elint-unbound-variable (var env) "T if VAR is unbound in ENV." + ;; #1063 suggests adding (symbol-file var) here, but I don't think + ;; this is right, because it depends on what files you happen to have + ;; loaded at the time, which might not be the same when the code runs. + ;; It also suggests adding: + ;; (numberp (get var 'variable-documentation)) + ;; (numberp (cdr-safe (get var 'variable-documentation))) + ;; but this is not needed now elint-scan-doc-file exists. (not (or (memq var '(nil t)) (eq var elint-bound-variable) (elint-env-find-var env var)