diff options
| author | Lars Hansen | 2004-05-31 21:45:51 +0000 |
|---|---|---|
| committer | Lars Hansen | 2004-05-31 21:45:51 +0000 |
| commit | 7bfa55b3580c3d7d4c77bc67ffd621bf5152a513 (patch) | |
| tree | 93cbb37cc4dbab463403443033293a54926dd0f0 | |
| parent | e8eeaed8cb0a5f8ea16517b1e88da6c230dd1fc3 (diff) | |
| download | emacs-7bfa55b3580c3d7d4c77bc67ffd621bf5152a513.tar.gz emacs-7bfa55b3580c3d7d4c77bc67ffd621bf5152a513.zip | |
(desktop-save): Don't save minor modes without a known mode initialization function.
| -rw-r--r-- | lisp/ChangeLog | 5 | ||||
| -rw-r--r-- | lisp/desktop.el | 21 |
2 files changed, 16 insertions, 10 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index bf08d2643f3..064f7a01f10 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2004-05-31 Lars Hansen <larsh@math.ku.dk> | ||
| 2 | |||
| 3 | * desktop.el (desktop-save): Don't save minor modes without a | ||
| 4 | known mode initialization function. | ||
| 5 | |||
| 1 | 2004-05-30 Luc Teirlinck <teirllm@auburn.edu> | 6 | 2004-05-30 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 7 | ||
| 3 | * replace.el (query-replace-interactive): Convert defvar into | 8 | * replace.el (query-replace-interactive): Convert defvar into |
diff --git a/lisp/desktop.el b/lisp/desktop.el index a21d132e03b..3888262f02f 100644 --- a/lisp/desktop.el +++ b/lisp/desktop.el | |||
| @@ -326,7 +326,7 @@ NAME is the name of the buffer-local variable indicating that the minor | |||
| 326 | mode is active. RESTORE-FUNCTION is the function to activate the minor mode. | 326 | mode is active. RESTORE-FUNCTION is the function to activate the minor mode. |
| 327 | called. RESTORE-FUNCTION nil means don't try to restore the minor mode. | 327 | called. RESTORE-FUNCTION nil means don't try to restore the minor mode. |
| 328 | Only minor modes for which the name of the buffer-local variable | 328 | Only minor modes for which the name of the buffer-local variable |
| 329 | and the name of the minor mode function are different have to added to | 329 | and the name of the minor mode function are different have to be added to |
| 330 | this table." | 330 | this table." |
| 331 | :type 'sexp | 331 | :type 'sexp |
| 332 | :group 'desktop) | 332 | :group 'desktop) |
| @@ -589,16 +589,17 @@ See also `desktop-base-file-name'." | |||
| 589 | major-mode | 589 | major-mode |
| 590 | ;; minor modes | 590 | ;; minor modes |
| 591 | (let (ret) | 591 | (let (ret) |
| 592 | (mapcar | 592 | (mapc |
| 593 | #'(lambda (mim) | 593 | #'(lambda (minor-mode) |
| 594 | (and | 594 | (and |
| 595 | (boundp mim) | 595 | (boundp minor-mode) |
| 596 | (symbol-value mim) | 596 | (symbol-value minor-mode) |
| 597 | (setq ret | 597 | (let ((special (assq minor-mode desktop-minor-mode-table))) |
| 598 | (cons | 598 | (when (or special (functionp minor-mode)) |
| 599 | (let ((special (assq mim desktop-minor-mode-table))) | 599 | (setq ret |
| 600 | (if special (cadr special) mim)) | 600 | (cons |
| 601 | ret)))) | 601 | (if special (cadr special) minor-mode) |
| 602 | ret)))))) | ||
| 602 | (mapcar #'car minor-mode-alist)) | 603 | (mapcar #'car minor-mode-alist)) |
| 603 | ret) | 604 | ret) |
| 604 | (point) | 605 | (point) |