diff options
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/elint.el | 13 |
2 files changed, 15 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 37b8d7f98eb..aa3ea918e58 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2009-11-14 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * emacs-lisp/elint.el (elint-standard-variables): Doc fix. | ||
| 4 | |||
| 1 | 2009-11-14 Shigeru Fukaya <shigeru.fukaya@gmail.com> | 5 | 2009-11-14 Shigeru Fukaya <shigeru.fukaya@gmail.com> |
| 2 | 6 | ||
| 3 | * emacs-lisp/elint.el (elint-standard-variables): Add some variables | 7 | * 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 ec408d2d45a..bcb399c23f3 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: | |||
| 118 | ;;; Data | 118 | ;;; Data |
| 119 | ;;; | 119 | ;;; |
| 120 | 120 | ||
| 121 | ;; FIXME does this serve any useful purpose now elint-builtin-variables exists? | ||
| 122 | (defconst elint-standard-variables | 121 | (defconst elint-standard-variables |
| 122 | ;; Most of these are defined in C with no documentation. | ||
| 123 | ;; FIXME I don't see why they shouldn't just get doc-strings. | ||
| 123 | '(vc-mode local-write-file-hooks activate-menubar-hook buffer-name-history | 124 | '(vc-mode local-write-file-hooks activate-menubar-hook buffer-name-history |
| 124 | coding-system-history extended-command-history | 125 | coding-system-history extended-command-history |
| 125 | kbd-macro-termination-hook read-expression-history | 126 | kbd-macro-termination-hook read-expression-history |
| 126 | yes-or-no-p-history) | 127 | yes-or-no-p-history) |
| 127 | "Standard buffer local variables, excluding `elint-builtin-variables'.") | 128 | "Standard variables, excluding `elint-builtin-variables'. |
| 129 | These are variables that we cannot detect automatically for some reason.") | ||
| 128 | 130 | ||
| 129 | (defvar elint-builtin-variables nil | 131 | (defvar elint-builtin-variables nil |
| 130 | "List of built-in variables. Set by `elint-initialize'. | 132 | "List of built-in variables. Set by `elint-initialize'. |
| @@ -638,6 +640,13 @@ Returns the environment created by the form." | |||
| 638 | 640 | ||
| 639 | (defun elint-unbound-variable (var env) | 641 | (defun elint-unbound-variable (var env) |
| 640 | "T if VAR is unbound in ENV." | 642 | "T if VAR is unbound in ENV." |
| 643 | ;; #1063 suggests adding (symbol-file var) here, but I don't think | ||
| 644 | ;; this is right, because it depends on what files you happen to have | ||
| 645 | ;; loaded at the time, which might not be the same when the code runs. | ||
| 646 | ;; It also suggests adding: | ||
| 647 | ;; (numberp (get var 'variable-documentation)) | ||
| 648 | ;; (numberp (cdr-safe (get var 'variable-documentation))) | ||
| 649 | ;; but this is not needed now elint-scan-doc-file exists. | ||
| 641 | (not (or (memq var '(nil t)) | 650 | (not (or (memq var '(nil t)) |
| 642 | (eq var elint-bound-variable) | 651 | (eq var elint-bound-variable) |
| 643 | (elint-env-find-var env var) | 652 | (elint-env-find-var env var) |