Mercurial > emacs
comparison lisp/desktop.el @ 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 | b92f1b7ca228 |
children | 791b0637af6d 4c90ffeb71c5 |
comparison
equal
deleted
inserted
replaced
55870:e87259cc21fe | 55871:27173676bedf |
---|---|
324 Each entry has the form (NAME RESTORE-FUNCTION). | 324 Each entry has the form (NAME RESTORE-FUNCTION). |
325 NAME is the name of the buffer-local variable indicating that the minor | 325 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) |
333 | 333 |
334 ;; ---------------------------------------------------------------------------- | 334 ;; ---------------------------------------------------------------------------- |
587 (desktop-file-name (buffer-file-name) dirname) | 587 (desktop-file-name (buffer-file-name) dirname) |
588 (buffer-name) | 588 (buffer-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) |
605 (list (mark t) mark-active) | 606 (list (mark t) mark-active) |
606 buffer-read-only | 607 buffer-read-only |