a minor mode, pass it an argument (Bug#4148).
+2009-08-17 Chong Yidong <cyd@stupidchicken.com>
+
+ * 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 <michael.albinus@gmx.de>
* net/tramp.el (tramp-register-completion-file-name-handler):
"-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