emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/trunk r104547: Allow/recommend explicit arg


From: Glenn Morris
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r104547: Allow/recommend explicit args for minor-modes in file local eval:s.
Date: Thu, 09 Jun 2011 16:22:06 -0400
User-agent: Bazaar (2.3.1)

------------------------------------------------------------
revno: 104547
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Thu 2011-06-09 16:22:06 -0400
message:
  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.
modified:
  doc/emacs/ChangeLog
  doc/emacs/custom.texi
  etc/NEWS
  lisp/ChangeLog
  lisp/doc-view.el
  lisp/files.el
  lisp/net/soap-client.el
=== modified file 'doc/emacs/ChangeLog'
--- a/doc/emacs/ChangeLog       2011-06-06 19:43:39 +0000
+++ b/doc/emacs/ChangeLog       2011-06-09 20:22:06 +0000
@@ -1,3 +1,8 @@
+2011-06-09  Glenn Morris  <address@hidden>
+
+       * custom.texi (Specifying File Variables):
+       Recommend explicit arguments for minor modes.
+
 2011-06-02  Paul Eggert  <address@hidden>
 
        Document wide integers better.

=== modified file 'doc/emacs/custom.texi'
--- a/doc/emacs/custom.texi     2011-05-28 18:22:08 +0000
+++ b/doc/emacs/custom.texi     2011-06-09 20:22:06 +0000
@@ -1215,7 +1215,7 @@
 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

=== modified file 'etc/NEWS'
--- a/etc/NEWS  2011-06-07 18:32:12 +0000
+++ b/etc/NEWS  2011-06-09 20:22:06 +0000
@@ -294,7 +294,7 @@
 
 +++
 ** 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'.

=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2011-06-09 16:58:18 +0000
+++ b/lisp/ChangeLog    2011-06-09 20:22:06 +0000
@@ -1,3 +1,8 @@
+2011-06-09  Glenn Morris  <address@hidden>
+
+       * files.el (hack-one-local-variable-eval-safep):
+       Allow minor-modes with explicit +/-1 arguments.
+
 2011-06-09  Teodor Zlatanov  <address@hidden>
 
        * term/xterm.el (xterm): Add defgroup.

=== modified file 'lisp/doc-view.el'
--- a/lisp/doc-view.el  2011-06-05 00:18:46 +0000
+++ b/lisp/doc-view.el  2011-06-09 20:22:06 +0000
@@ -1550,7 +1550,7 @@
 (provide 'doc-view)
 
 ;; Local Variables:
-;; eval: (outline-minor-mode)
+;; eval: (outline-minor-mode 1)
 ;; End:
 
 ;;; doc-view.el ends here

=== modified file 'lisp/files.el'
--- a/lisp/files.el     2011-06-09 05:33:26 +0000
+++ b/lisp/files.el     2011-06-09 20:22:06 +0000
@@ -2635,7 +2635,7 @@
   ;; 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 @@
       (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)

=== modified file 'lisp/net/soap-client.el'
--- a/lisp/net/soap-client.el   2011-05-10 02:31:42 +0000
+++ b/lisp/net/soap-client.el   2011-06-09 20:22:06 +0000
@@ -1745,7 +1745,7 @@
 
 
 ;;; Local Variables:
-;;; eval: (outline-minor-mode)
+;;; eval: (outline-minor-mode 1)
 ;;; outline-regexp: ";;;;+"
 ;;; End:
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]