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).
This commit is contained in:
parent
58a0c2e9c3
commit
c5253aa01e
1 changed files with 10 additions and 9 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue