summaryrefslogtreecommitdiff
path: root/lisp/desktop.el
diff options
context:
space:
mode:
authorArtur Malabarba <am12548@it055607.users.bris.ac.uk>2015-03-05 13:43:27 +0000
committerArtur Malabarba <am12548@it055607.users.bris.ac.uk>2015-03-05 13:43:27 +0000
commit61e06b6cb23a719ad77ab3924beb3a0c21e9c2e9 (patch)
tree7c44cf8e56356009a2a80db215bc37bea5abf5e4 /lisp/desktop.el
parent6065fbe0d212857ecfa58e8a64fc4af3913c24e9 (diff)
downloademacs-61e06b6cb23a719ad77ab3924beb3a0c21e9c2e9.tar.gz
desktop.el (desktop-buffer-info): Use `pushnew'.
Diffstat (limited to 'lisp/desktop.el')
-rw-r--r--lisp/desktop.el17
1 files changed, 7 insertions, 10 deletions
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 8d151a74698..3eca5a6a774 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -784,16 +784,13 @@ buffer, which is (in order):
major-mode
;; minor modes
(let (ret)
- (mapc
- #'(lambda (minor-mode)
- (and (boundp minor-mode)
- (symbol-value minor-mode)
- (let* ((special (assq minor-mode desktop-minor-mode-table))
- (value (cond (special (cadr special))
- ((functionp minor-mode) minor-mode))))
- (when value (add-to-list 'ret value)))))
- (mapcar #'car minor-mode-alist))
- 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))
+ ((functionp minor-mode) minor-mode))))
+ (when value (cl-pushnew value ret))))))
;; point and mark, and read-only status
(point)
(list (mark t) mark-active)