Mercurial > emacs
changeset 55871:27173676bedf
(desktop-save): Don't save minor modes without a known mode initialization function.
author | Lars Hansen <larsh@soem.dk> |
---|---|
date | Mon, 31 May 2004 21:44:59 +0000 |
parents | e87259cc21fe |
children | f48e0e8c2740 |
files | lisp/desktop.el |
diffstat | 1 files changed, 11 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/desktop.el Mon May 31 14:19:27 2004 +0000 +++ b/lisp/desktop.el Mon May 31 21:44:59 2004 +0000 @@ -326,7 +326,7 @@ 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 @@ 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)