From: Lars Ingebrigtsen Date: Sat, 13 Feb 2016 06:31:10 +0000 (+1100) Subject: Remove the gnus-delete-alist alias X-Git-Tag: emacs-26.0.90~2579 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6d4761330d7e2cf94ce8df07744c7b297bebb79e;p=emacs.git Remove the gnus-delete-alist alias * lisp/gnus/gnus-util.el (gnus-run-mode-hooks): Remove compat code. (gnus-delete-alist): Remove. --- diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 1602c475361..7e48fbf5560 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 22ff7b9eba3..14059ac566b 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 23a16763202..ff980416a28 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)