aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2011-06-09 16:22:06 -0400
committerGlenn Morris2011-06-09 16:22:06 -0400
commitf0da764a5c9bd61df5892ea9a377ab677dd5b612 (patch)
tree2692a858baa956e5ddec99c543d1a53cde2566f9
parent59f623b770909ad4d0e71ccedbcbdcabfbe2abc1 (diff)
downloademacs-f0da764a5c9bd61df5892ea9a377ab677dd5b612.tar.gz
emacs-f0da764a5c9bd61df5892ea9a377ab677dd5b612.zip
Allow/recommend explicit args for minor-modes in file local eval:s.
* 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.
-rw-r--r--doc/emacs/ChangeLog5
-rw-r--r--doc/emacs/custom.texi2
-rw-r--r--etc/NEWS2
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/doc-view.el2
-rw-r--r--lisp/files.el4
-rw-r--r--lisp/net/soap-client.el2
7 files changed, 16 insertions, 6 deletions
diff --git a/doc/emacs/ChangeLog b/doc/emacs/ChangeLog
index 6e69a96a2a8..8853eb099d6 100644
--- a/doc/emacs/ChangeLog
+++ b/doc/emacs/ChangeLog
@@ -1,3 +1,8 @@
12011-06-09 Glenn Morris <rgm@gnu.org>
2
3 * custom.texi (Specifying File Variables):
4 Recommend explicit arguments for minor modes.
5
12011-06-02 Paul Eggert <eggert@cs.ucla.edu> 62011-06-02 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 Document wide integers better. 8 Document wide integers better.
diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi
index a0dce5b3216..434c574ac42 100644
--- a/doc/emacs/custom.texi
+++ b/doc/emacs/custom.texi
@@ -1215,7 +1215,7 @@ other context has no special meaning.
1215well as the major modes; in fact, you can use it more than once, first 1215well as the major modes; in fact, you can use it more than once, first
1216to set the major mode and then to enable minor modes which are 1216to set the major mode and then to enable minor modes which are
1217specific to particular buffers. Using @code{mode} for minor modes 1217specific to particular buffers. Using @code{mode} for minor modes
1218is deprecated, though---instead, use @code{eval: (minor-mode)}. 1218is deprecated, though---instead, use @code{eval: (minor-mode 1)}.
1219 1219
1220 Often, however, it is a mistake to enable minor modes in file local 1220 Often, however, it is a mistake to enable minor modes in file local
1221variables. Most minor modes, like Auto Fill mode, represent individual user 1221variables. Most minor modes, like Auto Fill mode, represent individual user
diff --git a/etc/NEWS b/etc/NEWS
index eaa6ee1b704..51b179d8ddc 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -294,7 +294,7 @@ the remote file-name cache is used for read access.
294 294
295+++ 295+++
296** The use of a "mode: minor" specification in a file local variables section 296** The use of a "mode: minor" specification in a file local variables section
297to enable a minor-mode is deprecated. Instead, use "eval: (minor-mode)". 297to enable a minor-mode is deprecated. Instead, use "eval: (minor-mode 1)".
298 298
299** The standalone programs lib-src/digest-doc and sorted-doc have been 299** The standalone programs lib-src/digest-doc and sorted-doc have been
300replaced with Lisp commands `doc-file-to-man' and `doc-file-to-info'. 300replaced with Lisp commands `doc-file-to-man' and `doc-file-to-info'.
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d6e247eeb43..af36f8c9b98 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12011-06-09 Glenn Morris <rgm@gnu.org>
2
3 * files.el (hack-one-local-variable-eval-safep):
4 Allow minor-modes with explicit +/-1 arguments.
5
12011-06-09 Teodor Zlatanov <tzz@lifelogs.com> 62011-06-09 Teodor Zlatanov <tzz@lifelogs.com>
2 7
3 * term/xterm.el (xterm): Add defgroup. 8 * term/xterm.el (xterm): Add defgroup.
diff --git a/lisp/doc-view.el b/lisp/doc-view.el
index 06c3b70a3a6..666c6a8b034 100644
--- a/lisp/doc-view.el
+++ b/lisp/doc-view.el
@@ -1550,7 +1550,7 @@ See the command `doc-view-mode' for more information on this mode."
1550(provide 'doc-view) 1550(provide 'doc-view)
1551 1551
1552;; Local Variables: 1552;; Local Variables:
1553;; eval: (outline-minor-mode) 1553;; eval: (outline-minor-mode 1)
1554;; End: 1554;; End:
1555 1555
1556;;; doc-view.el ends here 1556;;; doc-view.el ends here
diff --git a/lisp/files.el b/lisp/files.el
index 5b950e0d409..317153dc9bf 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -2635,7 +2635,7 @@ we don't actually set it to the same mode the buffer already has."
2635 ;; Look for -*-MODENAME-*- or -*- ... mode: MODENAME; ... -*- 2635 ;; Look for -*-MODENAME-*- or -*- ... mode: MODENAME; ... -*-
2636 (let (end done mode modes) 2636 (let (end done mode modes)
2637 ;; Once we drop the deprecated feature where mode: is also allowed to 2637 ;; Once we drop the deprecated feature where mode: is also allowed to
2638 ;; specify minor-modes (ie, there can be more than one "mode:), we can 2638 ;; specify minor-modes (ie, there can be more than one "mode:"), we can
2639 ;; remove this section and just let (hack-local-variables t) handle it. 2639 ;; remove this section and just let (hack-local-variables t) handle it.
2640 ;; Find a -*- mode tag. 2640 ;; Find a -*- mode tag.
2641 (save-excursion 2641 (save-excursion
@@ -3367,7 +3367,7 @@ It is dangerous if either of these conditions are met:
3367 (and (symbolp (car exp)) 3367 (and (symbolp (car exp))
3368 ;; Allow (minor)-modes calls with no arguments. 3368 ;; Allow (minor)-modes calls with no arguments.
3369 ;; This obsoletes the use of "mode:" for such things. (Bug#8613) 3369 ;; This obsoletes the use of "mode:" for such things. (Bug#8613)
3370 (or (and (null (cdr exp)) 3370 (or (and (member (cdr exp) '(nil (1) (-1)))
3371 (string-match "-mode\\'" (symbol-name (car exp)))) 3371 (string-match "-mode\\'" (symbol-name (car exp))))
3372 (let ((prop (get (car exp) 'safe-local-eval-function))) 3372 (let ((prop (get (car exp) 'safe-local-eval-function)))
3373 (cond ((eq prop t) 3373 (cond ((eq prop t)
diff --git a/lisp/net/soap-client.el b/lisp/net/soap-client.el
index 9862332bf3f..b7b0b61f4e1 100644
--- a/lisp/net/soap-client.el
+++ b/lisp/net/soap-client.el
@@ -1745,7 +1745,7 @@ operations in a WSDL document."
1745 1745
1746 1746
1747;;; Local Variables: 1747;;; Local Variables:
1748;;; eval: (outline-minor-mode) 1748;;; eval: (outline-minor-mode 1)
1749;;; outline-regexp: ";;;;+" 1749;;; outline-regexp: ";;;;+"
1750;;; End: 1750;;; End:
1751 1751