summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorLars Ingebrigtsen <larsi@gnus.org>2022-04-17 20:21:40 +0200
committerLars Ingebrigtsen <larsi@gnus.org>2022-04-17 20:23:05 +0200
commitc5253aa01eef0f080fdfa53e4b0ada20a6782e53 (patch)
treecb492825bb9da285c35632e44a92869b68446237 /lisp
parent58a0c2e9c3df70079f0839a5c204b6ee29f2d087 (diff)
downloademacs-c5253aa01eef0f080fdfa53e4b0ada20a6782e53.tar.gz
emacs-c5253aa01eef0f080fdfa53e4b0ada20a6782e53.tar.bz2
emacs-c5253aa01eef0f080fdfa53e4b0ada20a6782e53.zip
Make desktop.el use local-minor-modes when saving
* lisp/desktop.el (desktop-buffer-info): Use a more reliable way to get minor modes (bug#29972).
Diffstat (limited to 'lisp')
-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):
,(buffer-name)
,major-mode
;; minor modes
- ,(let (ret)
- (dolist (minor-mode (mapcar #'car minor-mode-alist) ret)
- (and (boundp minor-mode)
- (symbol-value minor-mode)
- (let* ((special (assq minor-mode desktop-minor-mode-table))
- (value (cond (special (cadr special))
- ((get minor-mode :minor-mode-function))
- ((functionp minor-mode) minor-mode))))
- (when value (cl-pushnew value ret))))))
+ ,(seq-filter
+ (lambda (minor-mode)
+ ;; Just two sanity checks.
+ (and (boundp minor-mode)
+ (symbol-value minor-mode)
+ (let ((special
+ (assq minor-mode desktop-minor-mode-table)))
+ (or (not special)
+ (cadr special)))))
+ local-minor-modes)
;; point and mark, and read-only status
,(point)
,(list (mark t) mark-active)