From f0da764a5c9bd61df5892ea9a377ab677dd5b612 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Thu, 9 Jun 2011 16:22:06 -0400 Subject: 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. --- lisp/files.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lisp/files.el') 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) -- cgit v1.2.3