aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2009-07-23 02:55:34 +0000
committerGlenn Morris2009-07-23 02:55:34 +0000
commit589a99f2f6d05ab40538e84eb37b0e98ea5fc10b (patch)
tree2099e8df686aa76ad10c7c170a852f709d07c9ea
parente2d5a67f9eaaa59723bd9a8cbf4e93c29a7aca0f (diff)
downloademacs-589a99f2f6d05ab40538e84eb37b0e98ea5fc10b.tar.gz
emacs-589a99f2f6d05ab40538e84eb37b0e98ea5fc10b.zip
(describe-variable): Describe ignored and risky local
variables in a similar way to that in which we describe safe ones.
-rw-r--r--lisp/ChangeLog50
-rw-r--r--lisp/help-fns.el17
2 files changed, 66 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 68031d91a7b..b227250e197 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,53 @@
12009-07-23 Glenn Morris <rgm@gnu.org>
2
3 * help-fns.el (describe-variable): Describe ignored and risky local
4 variables in a similar way to that in which we describe safe ones.
5
6 * emacs-lisp/bytecomp.el (byte-compile-from-buffer)
7 (byte-compile-output-file-form, byte-compile-output-docform)
8 (byte-compile-file-form-defmumble, byte-compile-output-as-comment):
9 Give some more local variables with common names a "bytecomp-" prefix,
10 so as not to shadow things during compilation.
11 * emacs-lisp/cl-macs.el (load-time-value)
12 * emacs-lisp/cl.el (cl-compiling-file): Update for the name-change
13 `outbuffer' to `bytecomp-outbuffer'.
14
15 * emacs-lisp/elint.el (elint-standard-variables): Remove most members,
16 since the next two variables cover them automatically now.
17 (elint-builtin-variables, elint-autoloaded-variables): New.
18 (elint-unknown-builtin-args): Remove all members, since they can be
19 parsed automatically now.
20 (elint-extra-errors): New.
21 (elint-env-add-env, elint-env-add-macro): Use cadr.
22 (elint-current-buffer): Use or. Change final message.
23 (elint-get-top-forms): Use line-end-position.
24 (elint-init-env): Use cadr. Handle autoload, declare-function,
25 and defalias.
26 (elint-add-required-env): Doc fix. Use or. Standardize error.
27 (regexp-assoc): Remove unused function.
28 (elint-top-form): Set elint-current-pos, to record the start of the
29 top-level form, for compilation-mode.
30 (elint-form): Trap errors in macro expansion. Use dolist.
31 (elint-unbound-variable): Use elint-builtin-variables and
32 elint-autoloaded-variables.
33 (elint-get-args): Use cadr, or.
34 (elint-check-cond-form): Use dolist, cadr.
35 (elint-check-condition-case-form): Doc fix. Use cadr.
36 Use elint-extra-errors.
37 (elint-log): New function.
38 (elint-error, elint-warning): Use elint-log for a bytecomp-style format.
39 Distinguish errors and warnings.
40 (elint-log-message): Use with-current-buffer. Inhibit read-only.
41 Use a bytecomp-style format.
42 (elint-clear-log): Preserve default-directory. Inhibit read-only.
43 (elint-get-log-buffer): Use compilation mode. Disable undo.
44 Don't truncate lines.
45 (elint-initialize): Set builtin and autoloaded variable lists.
46 Only process elint-unknown-builtin-args if non-nil.
47 (elint-find-builtin-variables, elint-find-autoloaded-variables):
48 New functions.
49 (elint-find-builtin-args): Doc fix. Handle "BODY...)".
50
12009-07-22 Kevin Ryde <user42@zip.com.au> 512009-07-22 Kevin Ryde <user42@zip.com.au>
2 52
3 * net/newst-backend.el (newsticker--parse-atom-1.0) 53 * net/newst-backend.el (newsticker--parse-atom-1.0)
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index d45976cc8dc..9546396fd87 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -1,7 +1,8 @@
1;;; help-fns.el --- Complex help functions 1;;; help-fns.el --- Complex help functions
2 2
3;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001, 3;; Copyright (C) 1985, 1986, 1993, 1994, 1998, 1999, 2000, 2001,
4;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. 4;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
5;; Free Software Foundation, Inc.
5 6
6;; Maintainer: FSF 7;; Maintainer: FSF
7;; Keywords: help, internal 8;; Keywords: help, internal
@@ -722,6 +723,20 @@ it is displayed along with the global value."
722 (princ ".\n")) 723 (princ ".\n"))
723 (princ " This variable is a file local variable.\n"))) 724 (princ " This variable is a file local variable.\n")))
724 725
726 (when (memq variable ignored-local-variables)
727 (setq extra-line t)
728 (princ " This variable is ignored when used as a file local \
729variable.\n"))
730
731 ;; Can be both risky and safe, eg auto-fill-function.
732 (when (risky-local-variable-p variable)
733 (setq extra-line t)
734 (princ " This variable is potentially risky when used as a \
735file local variable.\n")
736 (when (assq variable safe-local-variable-values)
737 (princ " However, you have added it to \
738`safe-local-variable-values'.\n")))
739
725 (when safe-var 740 (when safe-var
726 (setq extra-line t) 741 (setq extra-line t)
727 (princ " This variable is safe as a file local variable ") 742 (princ " This variable is safe as a file local variable ")