emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 6d47613 3/6: Remove the gnus-delete-alist alias


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 6d47613 3/6: Remove the gnus-delete-alist alias
Date: Sat, 13 Feb 2016 06:43:52 +0000

branch: master
commit 6d4761330d7e2cf94ce8df07744c7b297bebb79e
Author: Lars Ingebrigtsen <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    Remove the gnus-delete-alist alias
    
    * lisp/gnus/gnus-util.el (gnus-run-mode-hooks): Remove compat code.
    (gnus-delete-alist): Remove.
---
 lisp/gnus/gnus-group.el |    2 +-
 lisp/gnus/gnus-score.el |    2 +-
 lisp/gnus/gnus-util.el  |   17 ++---------------
 3 files changed, 4 insertions(+), 17 deletions(-)

diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el
index 1602c47..7e48fbf 100644
--- a/lisp/gnus/gnus-group.el
+++ b/lisp/gnus/gnus-group.el
@@ -4488,7 +4488,7 @@ and the second element is the address."
        (if force
            (if (null articles)
                (setcar (nthcdr 3 info)
-                       (gnus-delete-alist type (car marked)))
+                       (assq-delete-all type (car marked)))
              (setcdr m (gnus-compress-sequence articles t)))
          (setcdr m (gnus-compress-sequence
                     (sort (nconc (gnus-uncompress-range (cdr m))
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el
index 22ff7b9..14059ac 100644
--- a/lisp/gnus/gnus-score.el
+++ b/lisp/gnus/gnus-score.el
@@ -1431,7 +1431,7 @@ If FORMAT, also format the current score file."
                (and (file-exists-p file)
                     (not (file-writable-p file))))
            ()
-         (setq score (setcdr entry (gnus-delete-alist 'touched score)))
+         (setq score (setcdr entry (assq-delete-all 'touched score)))
          (erase-buffer)
          (let (emacs-lisp-mode-hook)
            (if (and (not gnus-adaptive-pretty-print)
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el
index 23a1676..ff98041 100644
--- a/lisp/gnus/gnus-util.el
+++ b/lisp/gnus/gnus-util.el
@@ -1115,11 +1115,8 @@ ARG is passed to the first function."
     (apply 'run-hook-with-args hook args)))
 
 (defun gnus-run-mode-hooks (&rest funcs)
-  "Run `run-mode-hooks' if it is available, otherwise `run-hooks'.
-This function saves the current buffer."
-  (if (fboundp 'run-mode-hooks)
-      (save-current-buffer (apply 'run-mode-hooks funcs))
-    (save-current-buffer (apply 'run-hooks funcs))))
+  "Run `run-mode-hooks', saving the current buffer."
+  (save-current-buffer (apply 'run-mode-hooks funcs)))
 
 ;;; Various
 
@@ -1167,16 +1164,6 @@ If HASH-TABLE-P is non-nil, regards SEQUENCE as a hash 
table."
        (setq sequence (cdr sequence))))
     (nreverse out)))
 
-(if (fboundp 'assq-delete-all)
-    (defalias 'gnus-delete-alist 'assq-delete-all)
-  (defun gnus-delete-alist (key alist)
-    "Delete from ALIST all elements whose car is KEY.
-Return the modified alist."
-    (let (entry)
-      (while (setq entry (assq key alist))
-       (setq alist (delq entry alist)))
-      alist)))
-
 (defun gnus-grep-in-list (word list)
   "Find if a WORD matches any regular expression in the given LIST."
   (when (and word list)



reply via email to

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