diff options
| author | Chong Yidong | 2009-08-17 23:40:19 +0000 |
|---|---|---|
| committer | Chong Yidong | 2009-08-17 23:40:19 +0000 |
| commit | 645b9326771220c10a7e33e18704f5668bece100 (patch) | |
| tree | a3a7e3aab315d6b62e250b4fd625302cf7ac4c4a | |
| parent | e42bdf015920ea52431927ddcc3a61d204f5918e (diff) | |
| download | emacs-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/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/files.el | 7 |
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 @@ | |||
| 1 | 2009-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 | |||
| 1 | 2009-08-17 Michael Albinus <michael.albinus@gmx.de> | 6 | 2009-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 |