emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] emacs/lisp ChangeLog files.el


From: Chong Yidong
Subject: [Emacs-diffs] emacs/lisp ChangeLog files.el
Date: Mon, 17 Aug 2009 23:40:24 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      09/08/17 23:40:23

Modified files:
        lisp           : ChangeLog files.el 

Log message:
        * files.el (hack-one-local-variable): If the mode function is for
        a minor mode, pass it an argument (Bug#4148).

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/ChangeLog?cvsroot=emacs&r1=1.15954&r2=1.15955
http://cvs.savannah.gnu.org/viewcvs/emacs/lisp/files.el?cvsroot=emacs&r1=1.1068&r2=1.1069

Patches:
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/lisp/ChangeLog,v
retrieving revision 1.15954
retrieving revision 1.15955
diff -u -b -r1.15954 -r1.15955
--- ChangeLog   17 Aug 2009 19:12:10 -0000      1.15954
+++ ChangeLog   17 Aug 2009 23:40:19 -0000      1.15955
@@ -1,3 +1,8 @@
+2009-08-17  Chong Yidong  <address@hidden>
+
+       * files.el (hack-one-local-variable): If the mode function is for
+       a minor mode, pass it an argument (Bug#4148).
+
 2009-08-17  Michael Albinus  <address@hidden>
 
        * net/tramp.el (tramp-register-completion-file-name-handler):

Index: files.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/files.el,v
retrieving revision 1.1068
retrieving revision 1.1069
diff -u -b -r1.1068 -r1.1069
--- files.el    16 Aug 2009 00:31:32 -0000      1.1068
+++ files.el    17 Aug 2009 23:40:22 -0000      1.1069
@@ -3191,7 +3191,12 @@
                                     "-mode"))))
           (unless (eq (indirect-function mode)
                       (indirect-function major-mode))
-            (funcall mode))))
+            (if (memq mode minor-mode-list)
+                ;; A minor mode must be passed an argument.
+                ;; Otherwise, if the user enables the minor mode in a
+                ;; major mode hook, this would toggle it off.
+                (funcall mode 1)
+              (funcall mode)))))
        ((eq var 'eval)
         (save-excursion (eval val)))
        (t




reply via email to

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