emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 61e06b6: desktop.el (desktop-buffer-info): Use `pus


From: Artur Malabarba
Subject: [Emacs-diffs] master 61e06b6: desktop.el (desktop-buffer-info): Use `pushnew'.
Date: Thu, 05 Mar 2015 13:44:11 +0000

branch: master
commit 61e06b6cb23a719ad77ab3924beb3a0c21e9c2e9
Author: Artur Malabarba <address@hidden>
Commit: Artur Malabarba <address@hidden>

    desktop.el (desktop-buffer-info): Use `pushnew'.
---
 lisp/ChangeLog  |    2 ++
 lisp/desktop.el |   17 +++++++----------
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index d810ee8..ef010d4 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,6 +1,8 @@
 2015-03-05  Artur Malabarba  <address@hidden>
 
        * desktop.el (desktop-buffer-info): Write docstring.
+       (desktop-buffer-info): Use `pushnew' instead of `add-to-list' and
+       unquote lamda.
 
        * emacs-lisp/package.el (package-refresh-contents): Update doc.
 
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 8d151a7..3eca5a6 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)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]