diff options
| author | Lars Ingebrigtsen | 2022-04-17 20:21:40 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2022-04-17 20:23:05 +0200 |
| commit | c5253aa01eef0f080fdfa53e4b0ada20a6782e53 (patch) | |
| tree | cb492825bb9da285c35632e44a92869b68446237 | |
| parent | 58a0c2e9c3df70079f0839a5c204b6ee29f2d087 (diff) | |
| download | emacs-c5253aa01eef0f080fdfa53e4b0ada20a6782e53.tar.gz 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).
| -rw-r--r-- | lisp/desktop.el | 19 |
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) |