diff options
author | Lars Hansen <[email protected]> | 2004-05-31 21:45:51 +0000 |
---|---|---|
committer | Lars Hansen <[email protected]> | 2004-05-31 21:45:51 +0000 |
commit | 7bfa55b3580c3d7d4c77bc67ffd621bf5152a513 (patch) | |
tree | 93cbb37cc4dbab463403443033293a54926dd0f0 /lisp/desktop.el | |
parent | e8eeaed8cb0a5f8ea16517b1e88da6c230dd1fc3 (diff) |
(desktop-save): Don't save minor modes without a known mode initialization function.
Diffstat (limited to 'lisp/desktop.el')
-rw-r--r-- | lisp/desktop.el | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/lisp/desktop.el b/lisp/desktop.el index a21d132e03..3888262f02 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 mode is active. RESTORE-FUNCTION is the function to activate the minor mode. called. RESTORE-FUNCTION nil means don't try to restore the minor mode. Only minor modes for which the name of the buffer-local variable -and the name of the minor mode function are different have to added to +and the name of the minor mode function are different have to be added to this table." :type 'sexp :group 'desktop) @@ -589,16 +589,17 @@ See also `desktop-base-file-name'." major-mode ;; minor modes (let (ret) - (mapcar - #'(lambda (mim) + (mapc + #'(lambda (minor-mode) (and - (boundp mim) - (symbol-value mim) - (setq ret - (cons - (let ((special (assq mim desktop-minor-mode-table))) - (if special (cadr special) mim)) - ret)))) + (boundp minor-mode) + (symbol-value minor-mode) + (let ((special (assq minor-mode desktop-minor-mode-table))) + (when (or special (functionp minor-mode)) + (setq ret + (cons + (if special (cadr special) minor-mode) + ret)))))) (mapcar #'car minor-mode-alist)) ret) (point) |