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.
This commit is contained in:
parent
59f623b770
commit
f0da764a5c
7 changed files with 16 additions and 6 deletions
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
2
etc/NEWS
2
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'.
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -1745,7 +1745,7 @@ operations in a WSDL document."
|
|||
|
||||
|
||||
;;; Local Variables:
|
||||
;;; eval: (outline-minor-mode)
|
||||
;;; eval: (outline-minor-mode 1)
|
||||
;;; outline-regexp: ";;;;+"
|
||||
;;; End:
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue