]> git.eshelyaron.com Git - emacs.git/commitdiff
Allow/recommend explicit args for minor-modes in file local eval:s.
authorGlenn Morris <rgm@gnu.org>
Thu, 9 Jun 2011 20:22:06 +0000 (16:22 -0400)
committerGlenn Morris <rgm@gnu.org>
Thu, 9 Jun 2011 20:22:06 +0000 (16:22 -0400)
* lisp/files.el (hack-one-local-variable-eval-safep):
Allow minor-modes with explicit +/-1 arguments.

* doc/emacs/custom.texi (Specifying File Variables):
Recommend explicit arguments for minor modes.

* etc/NEWS: Likewise.

* lisp/doc-view.el, lisp/net/soap-client.el: Update file locals.

doc/emacs/ChangeLog
doc/emacs/custom.texi
etc/NEWS
lisp/ChangeLog
lisp/doc-view.el
lisp/files.el
lisp/net/soap-client.el

index 6e69a96a2a84fb8cf4ecdf45e89c263f9d58b82e..8853eb099d62a76e0ff3675161b6eb500af34f93 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-09  Glenn Morris  <rgm@gnu.org>
+
+       * custom.texi (Specifying File Variables):
+       Recommend explicit arguments for minor modes.
+
 2011-06-02  Paul Eggert  <eggert@cs.ucla.edu>
 
        Document wide integers better.
index a0dce5b32160bb2435df85210b51e7c46477b94a..434c574ac429a318e11fefac20d7054cb282f36d 100644 (file)
@@ -1215,7 +1215,7 @@ other context has no special meaning.
 well as the major modes; in fact, you can use it more than once, first
 to set the major mode and then to enable minor modes which are
 specific to particular buffers.  Using @code{mode} for minor modes
-is deprecated, though---instead, use @code{eval: (minor-mode)}. 
+is deprecated, though---instead, use @code{eval: (minor-mode 1)}. 
 
   Often, however, it is a mistake to enable minor modes in file local
 variables.  Most minor modes, like Auto Fill mode, represent individual user
index eaa6ee1b704c788a27677f43b088dd5be52e2dcf..51b179d8ddcf932de1ce44744a87e8cdd5343811 100644 (file)
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -294,7 +294,7 @@ the remote file-name cache is used for read access.
 
 +++
 ** The use of a "mode: minor" specification in a file local variables section
-to enable a minor-mode is deprecated.  Instead, use "eval: (minor-mode)".
+to enable a minor-mode is deprecated.  Instead, use "eval: (minor-mode 1)".
 
 ** The standalone programs lib-src/digest-doc and sorted-doc have been
 replaced with Lisp commands `doc-file-to-man' and `doc-file-to-info'.
index d6e247eeb434a3be8095ad3ad47b6811f8e2decf..af36f8c9b98bcc32709bdfcc2d629bd1bd8bd726 100644 (file)
@@ -1,3 +1,8 @@
+2011-06-09  Glenn Morris  <rgm@gnu.org>
+
+       * files.el (hack-one-local-variable-eval-safep):
+       Allow minor-modes with explicit +/-1 arguments.
+
 2011-06-09  Teodor Zlatanov  <tzz@lifelogs.com>
 
        * term/xterm.el (xterm): Add defgroup.
index 06c3b70a3a6db529695e785169354c52d6867c54..666c6a8b03446e078b3e05ea78b244450d1d3c00 100644 (file)
@@ -1550,7 +1550,7 @@ See the command `doc-view-mode' for more information on this mode."
 (provide 'doc-view)
 
 ;; Local Variables:
-;; eval: (outline-minor-mode)
+;; eval: (outline-minor-mode 1)
 ;; End:
 
 ;;; doc-view.el ends here
index 5b950e0d409e34f78a7edaffbac9e1786dc1d403..317153dc9bff36d6d546b0140bc7f85861a6c813 100644 (file)
@@ -2635,7 +2635,7 @@ we don't actually set it to the same mode the buffer already has."
   ;; Look for -*-MODENAME-*- or -*- ... mode: MODENAME; ... -*-
   (let (end done mode modes)
     ;; Once we drop the deprecated feature where mode: is also allowed to
-    ;; specify minor-modes (ie, there can be more than one "mode:), we can
+    ;; specify minor-modes (ie, there can be more than one "mode:"), we can
     ;; remove this section and just let (hack-local-variables t) handle it.
     ;; Find a -*- mode tag.
     (save-excursion
@@ -3367,7 +3367,7 @@ It is dangerous if either of these conditions are met:
       (and (symbolp (car exp))
           ;; Allow (minor)-modes calls with no arguments.
           ;; This obsoletes the use of "mode:" for such things.  (Bug#8613)
-          (or (and (null (cdr exp))
+          (or (and (member (cdr exp) '(nil (1) (-1)))
                    (string-match "-mode\\'" (symbol-name (car exp))))
               (let ((prop (get (car exp) 'safe-local-eval-function)))
                 (cond ((eq prop t)
index 9862332bf3f3c032df56f68ae8631f53ae7321c7..b7b0b61f4e1a317bb135e660e9476092e8498cc7 100644 (file)
@@ -1745,7 +1745,7 @@ operations in a WSDL document."
 
 \f
 ;;; Local Variables:
-;;; eval: (outline-minor-mode)
+;;; eval: (outline-minor-mode 1)
 ;;; outline-regexp: ";;;;+"
 ;;; End: