aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lisp/desktop.el19
1 files changed, 10 insertions, 9 deletions
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 7e3d66bdf1f..cd581e028ba 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -847,15 +847,16 @@ buffer, which is (in order):
847 ,(buffer-name) 847 ,(buffer-name)
848 ,major-mode 848 ,major-mode
849 ;; minor modes 849 ;; minor modes
850 ,(let (ret) 850 ,(seq-filter
851 (dolist (minor-mode (mapcar #'car minor-mode-alist) ret) 851 (lambda (minor-mode)
852 (and (boundp minor-mode) 852 ;; Just two sanity checks.
853 (symbol-value minor-mode) 853 (and (boundp minor-mode)
854 (let* ((special (assq minor-mode desktop-minor-mode-table)) 854 (symbol-value minor-mode)
855 (value (cond (special (cadr special)) 855 (let ((special
856 ((get minor-mode :minor-mode-function)) 856 (assq minor-mode desktop-minor-mode-table)))
857 ((functionp minor-mode) minor-mode)))) 857 (or (not special)
858 (when value (cl-pushnew value ret)))))) 858 (cadr special)))))
859 local-minor-modes)
859 ;; point and mark, and read-only status 860 ;; point and mark, and read-only status
860 ,(point) 861 ,(point)
861 ,(list (mark t) mark-active) 862 ,(list (mark t) mark-active)