aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChong Yidong2009-08-17 23:40:19 +0000
committerChong Yidong2009-08-17 23:40:19 +0000
commit645b9326771220c10a7e33e18704f5668bece100 (patch)
treea3a7e3aab315d6b62e250b4fd625302cf7ac4c4a
parente42bdf015920ea52431927ddcc3a61d204f5918e (diff)
downloademacs-645b9326771220c10a7e33e18704f5668bece100.tar.gz
emacs-645b9326771220c10a7e33e18704f5668bece100.zip
* files.el (hack-one-local-variable): If the mode function is for
a minor mode, pass it an argument (Bug#4148).
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/files.el7
2 files changed, 11 insertions, 1 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 24e5fa9eae3..814370a6570 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12009-08-17 Chong Yidong <cyd@stupidchicken.com>
2
3 * files.el (hack-one-local-variable): If the mode function is for
4 a minor mode, pass it an argument (Bug#4148).
5
12009-08-17 Michael Albinus <michael.albinus@gmx.de> 62009-08-17 Michael Albinus <michael.albinus@gmx.de>
2 7
3 * net/tramp.el (tramp-register-completion-file-name-handler): 8 * net/tramp.el (tramp-register-completion-file-name-handler):
diff --git a/lisp/files.el b/lisp/files.el
index 6f8ff69caef..825ff250449 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -3191,7 +3191,12 @@ already the major mode."
3191 "-mode")))) 3191 "-mode"))))
3192 (unless (eq (indirect-function mode) 3192 (unless (eq (indirect-function mode)
3193 (indirect-function major-mode)) 3193 (indirect-function major-mode))
3194 (funcall mode)))) 3194 (if (memq mode minor-mode-list)
3195 ;; A minor mode must be passed an argument.
3196 ;; Otherwise, if the user enables the minor mode in a
3197 ;; major mode hook, this would toggle it off.
3198 (funcall mode 1)
3199 (funcall mode)))))
3195 ((eq var 'eval) 3200 ((eq var 'eval)
3196 (save-excursion (eval val))) 3201 (save-excursion (eval val)))
3197 (t 3202 (t