diff options
author | Glenn Morris <[email protected]> | 2011-06-09 16:22:06 -0400 |
---|---|---|
committer | Glenn Morris <[email protected]> | 2011-06-09 16:22:06 -0400 |
commit | f0da764a5c9bd61df5892ea9a377ab677dd5b612 (patch) | |
tree | 2692a858baa956e5ddec99c543d1a53cde2566f9 /lisp/files.el | |
parent | 59f623b770909ad4d0e71ccedbcbdcabfbe2abc1 (diff) |
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.
Diffstat (limited to 'lisp/files.el')
-rw-r--r-- | lisp/files.el | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el index 5b950e0d40..317153dc9b 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." ;; 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) |