diff options
| -rw-r--r-- | lisp/gnus/gnus-art.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-icalendar.el | 4 | ||||
| -rw-r--r-- | lisp/gnus/gnus-score.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 34 | ||||
| -rw-r--r-- | lisp/gnus/gnus-topic.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-util.el | 38 | ||||
| -rw-r--r-- | lisp/gnus/gnus-win.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus.el | 1 | ||||
| -rw-r--r-- | lisp/gnus/nnmail.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/nnmaildir.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/nnrss.el | 2 |
11 files changed, 33 insertions, 58 deletions
diff --git a/lisp/gnus/gnus-art.el b/lisp/gnus/gnus-art.el index 97aa878ab63..6ee0d7b0231 100644 --- a/lisp/gnus/gnus-art.el +++ b/lisp/gnus/gnus-art.el | |||
| @@ -5219,7 +5219,7 @@ available media-types." | |||
| 5219 | (gnus-completing-read | 5219 | (gnus-completing-read |
| 5220 | "View as MIME type" | 5220 | "View as MIME type" |
| 5221 | (if pred | 5221 | (if pred |
| 5222 | (gnus-remove-if-not pred (mailcap-mime-types)) | 5222 | (seq-filter pred (mailcap-mime-types)) |
| 5223 | (mailcap-mime-types)) | 5223 | (mailcap-mime-types)) |
| 5224 | nil nil nil | 5224 | nil nil nil |
| 5225 | (car default))))) | 5225 | (car default))))) |
diff --git a/lisp/gnus/gnus-icalendar.el b/lisp/gnus/gnus-icalendar.el index cca4a81d1c0..38c3ea36d6c 100644 --- a/lisp/gnus/gnus-icalendar.el +++ b/lisp/gnus/gnus-icalendar.el | |||
| @@ -169,7 +169,7 @@ | |||
| 169 | 169 | ||
| 170 | (defun gnus-icalendar-event--get-attendee-names (ical) | 170 | (defun gnus-icalendar-event--get-attendee-names (ical) |
| 171 | (let* ((event (car (icalendar--all-events ical))) | 171 | (let* ((event (car (icalendar--all-events ical))) |
| 172 | (attendee-props (gnus-remove-if-not | 172 | (attendee-props (seq-filter |
| 173 | (lambda (p) (eq (car p) 'ATTENDEE)) | 173 | (lambda (p) (eq (car p) 'ATTENDEE)) |
| 174 | (caddr event)))) | 174 | (caddr event)))) |
| 175 | 175 | ||
| @@ -180,7 +180,7 @@ | |||
| 180 | (or (plist-get (cadr prop) 'CN) | 180 | (or (plist-get (cadr prop) 'CN) |
| 181 | (replace-regexp-in-string "^.*MAILTO:" "" (caddr prop)))) | 181 | (replace-regexp-in-string "^.*MAILTO:" "" (caddr prop)))) |
| 182 | (attendees-by-type (type) | 182 | (attendees-by-type (type) |
| 183 | (gnus-remove-if-not | 183 | (seq-filter |
| 184 | (lambda (p) (string= (attendee-role p) type)) | 184 | (lambda (p) (string= (attendee-role p) type)) |
| 185 | attendee-props)) | 185 | attendee-props)) |
| 186 | (attendee-names-by-type | 186 | (attendee-names-by-type |
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el index 765dfab570a..a2cc07db462 100644 --- a/lisp/gnus/gnus-score.el +++ b/lisp/gnus/gnus-score.el | |||
| @@ -921,7 +921,7 @@ EXTRA is the possible non-standard header." | |||
| 921 | (interactive (list (gnus-completing-read "Header" | 921 | (interactive (list (gnus-completing-read "Header" |
| 922 | (mapcar | 922 | (mapcar |
| 923 | 'car | 923 | 'car |
| 924 | (gnus-remove-if-not | 924 | (seq-filter |
| 925 | (lambda (x) (fboundp (nth 2 x))) | 925 | (lambda (x) (fboundp (nth 2 x))) |
| 926 | gnus-header-index)) | 926 | gnus-header-index)) |
| 927 | t) | 927 | t) |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index e599a8460f3..4dee306c81b 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -12270,21 +12270,27 @@ save those articles instead." | |||
| 12270 | (if (> (length articles) 1) | 12270 | (if (> (length articles) 1) |
| 12271 | (format "these %d articles" (length articles)) | 12271 | (format "these %d articles" (length articles)) |
| 12272 | "this article"))) | 12272 | "this article"))) |
| 12273 | valid-names | ||
| 12273 | (to-newsgroup | 12274 | (to-newsgroup |
| 12274 | (cond | 12275 | (progn |
| 12275 | ((null split-name) | 12276 | (mapatoms (lambda (g) |
| 12276 | (gnus-group-completing-read | 12277 | (when (gnus-valid-move-group-p g) |
| 12277 | prom | 12278 | (push g valid-names))) |
| 12278 | (gnus-remove-if-not 'gnus-valid-move-group-p gnus-active-hashtb t) | 12279 | gnus-active-hashtb) |
| 12279 | nil prefix nil default)) | 12280 | (cond |
| 12280 | ((= 1 (length split-name)) | 12281 | ((null split-name) |
| 12281 | (gnus-group-completing-read | 12282 | (gnus-group-completing-read |
| 12282 | prom | 12283 | prom |
| 12283 | (gnus-remove-if-not 'gnus-valid-move-group-p gnus-active-hashtb t) | 12284 | valid-names |
| 12284 | nil prefix 'gnus-group-history (car split-name))) | 12285 | nil prefix nil default)) |
| 12285 | (t | 12286 | ((= 1 (length split-name)) |
| 12286 | (gnus-completing-read | 12287 | (gnus-group-completing-read |
| 12287 | prom (nreverse split-name) nil nil 'gnus-group-history)))) | 12288 | prom |
| 12289 | valid-names | ||
| 12290 | nil prefix 'gnus-group-history (car split-name))) | ||
| 12291 | (t | ||
| 12292 | (gnus-completing-read | ||
| 12293 | prom (nreverse split-name) nil nil 'gnus-group-history))))) | ||
| 12288 | (to-method (gnus-server-to-method (gnus-group-method to-newsgroup))) | 12294 | (to-method (gnus-server-to-method (gnus-group-method to-newsgroup))) |
| 12289 | encoded) | 12295 | encoded) |
| 12290 | (when to-newsgroup | 12296 | (when to-newsgroup |
diff --git a/lisp/gnus/gnus-topic.el b/lisp/gnus/gnus-topic.el index ba756e0314c..3a37366bd57 100644 --- a/lisp/gnus/gnus-topic.el +++ b/lisp/gnus/gnus-topic.el | |||
| @@ -460,7 +460,7 @@ If LOWEST is non-nil, list all newsgroups of level LOWEST or higher." | |||
| 460 | (unless gnus-killed-hashtb | 460 | (unless gnus-killed-hashtb |
| 461 | (gnus-make-hashtable-from-killed)) | 461 | (gnus-make-hashtable-from-killed)) |
| 462 | (gnus-group-prepare-flat-list-dead | 462 | (gnus-group-prepare-flat-list-dead |
| 463 | (gnus-remove-if (lambda (group) | 463 | (seq-remove (lambda (group) |
| 464 | (or (gnus-group-entry group) | 464 | (or (gnus-group-entry group) |
| 465 | (gnus-gethash group gnus-killed-hashtb))) | 465 | (gnus-gethash group gnus-killed-hashtb))) |
| 466 | not-in-list) | 466 | not-in-list) |
diff --git a/lisp/gnus/gnus-util.el b/lisp/gnus/gnus-util.el index b7477a7fa80..ed112273cab 100644 --- a/lisp/gnus/gnus-util.el +++ b/lisp/gnus/gnus-util.el | |||
| @@ -1117,41 +1117,9 @@ ARG is passed to the first function." | |||
| 1117 | (with-current-buffer gnus-group-buffer | 1117 | (with-current-buffer gnus-group-buffer |
| 1118 | (eq major-mode 'gnus-group-mode)))) | 1118 | (eq major-mode 'gnus-group-mode)))) |
| 1119 | 1119 | ||
| 1120 | (defun gnus-remove-if (predicate sequence &optional hash-table-p) | 1120 | (define-obsolete-function-alias 'gnus-remove-if 'seq-remove "27.1") |
| 1121 | "Return a copy of SEQUENCE with all items satisfying PREDICATE removed. | 1121 | |
| 1122 | SEQUENCE should be a list, a vector, or a string. Returns always a list. | 1122 | (define-obsolete-function-alias 'gnus-remove-if-not 'seq-filter "27.1") |
| 1123 | If HASH-TABLE-P is non-nil, regards SEQUENCE as a hash table." | ||
| 1124 | (let (out) | ||
| 1125 | (if hash-table-p | ||
| 1126 | (mapatoms (lambda (symbol) | ||
| 1127 | (unless (funcall predicate symbol) | ||
| 1128 | (push symbol out))) | ||
| 1129 | sequence) | ||
| 1130 | (unless (listp sequence) | ||
| 1131 | (setq sequence (append sequence nil))) | ||
| 1132 | (while sequence | ||
| 1133 | (unless (funcall predicate (car sequence)) | ||
| 1134 | (push (car sequence) out)) | ||
| 1135 | (setq sequence (cdr sequence)))) | ||
| 1136 | (nreverse out))) | ||
| 1137 | |||
| 1138 | (defun gnus-remove-if-not (predicate sequence &optional hash-table-p) | ||
| 1139 | "Return a copy of SEQUENCE with all items not satisfying PREDICATE removed. | ||
| 1140 | SEQUENCE should be a list, a vector, or a string. Returns always a list. | ||
| 1141 | If HASH-TABLE-P is non-nil, regards SEQUENCE as a hash table." | ||
| 1142 | (let (out) | ||
| 1143 | (if hash-table-p | ||
| 1144 | (mapatoms (lambda (symbol) | ||
| 1145 | (when (funcall predicate symbol) | ||
| 1146 | (push symbol out))) | ||
| 1147 | sequence) | ||
| 1148 | (unless (listp sequence) | ||
| 1149 | (setq sequence (append sequence nil))) | ||
| 1150 | (while sequence | ||
| 1151 | (when (funcall predicate (car sequence)) | ||
| 1152 | (push (car sequence) out)) | ||
| 1153 | (setq sequence (cdr sequence)))) | ||
| 1154 | (nreverse out))) | ||
| 1155 | 1123 | ||
| 1156 | (defun gnus-grep-in-list (word list) | 1124 | (defun gnus-grep-in-list (word list) |
| 1157 | "Find if a WORD matches any regular expression in the given LIST." | 1125 | "Find if a WORD matches any regular expression in the given LIST." |
diff --git a/lisp/gnus/gnus-win.el b/lisp/gnus/gnus-win.el index 8e47ae3f984..4f720463b46 100644 --- a/lisp/gnus/gnus-win.el +++ b/lisp/gnus/gnus-win.el | |||
| @@ -513,7 +513,7 @@ should have point." | |||
| 513 | (memq frame '(t 0 visible))) | 513 | (memq frame '(t 0 visible))) |
| 514 | (car | 514 | (car |
| 515 | (let ((frames (frames-on-display-list))) | 515 | (let ((frames (frames-on-display-list))) |
| 516 | (gnus-remove-if (lambda (win) (not (memq (window-frame win) | 516 | (seq-remove (lambda (win) (not (memq (window-frame win) |
| 517 | frames))) | 517 | frames))) |
| 518 | (get-buffer-window-list buffer nil frame))))) | 518 | (get-buffer-window-list buffer nil frame))))) |
| 519 | (t | 519 | (t |
diff --git a/lisp/gnus/gnus.el b/lisp/gnus/gnus.el index 3458fdea718..597470c3813 100644 --- a/lisp/gnus/gnus.el +++ b/lisp/gnus/gnus.el | |||
| @@ -33,6 +33,7 @@ | |||
| 33 | (require 'wid-edit) | 33 | (require 'wid-edit) |
| 34 | (require 'mm-util) | 34 | (require 'mm-util) |
| 35 | (require 'nnheader) | 35 | (require 'nnheader) |
| 36 | (require 'seq) | ||
| 36 | 37 | ||
| 37 | ;; These are defined afterwards with gnus-define-group-parameter | 38 | ;; These are defined afterwards with gnus-define-group-parameter |
| 38 | (defvar gnus-ham-process-destinations) | 39 | (defvar gnus-ham-process-destinations) |
diff --git a/lisp/gnus/nnmail.el b/lisp/gnus/nnmail.el index ad58d292082..5ed80a9bb6e 100644 --- a/lisp/gnus/nnmail.el +++ b/lisp/gnus/nnmail.el | |||
| @@ -2034,7 +2034,7 @@ If TIME is nil, then return the cutoff time for oldness instead." | |||
| 2034 | "Remove all instances of GROUP from `nnmail-split-history'." | 2034 | "Remove all instances of GROUP from `nnmail-split-history'." |
| 2035 | (let ((history nnmail-split-history)) | 2035 | (let ((history nnmail-split-history)) |
| 2036 | (while history | 2036 | (while history |
| 2037 | (setcar history (gnus-remove-if (lambda (e) (string= (car e) group)) | 2037 | (setcar history (seq-remove (lambda (e) (string= (car e) group)) |
| 2038 | (car history))) | 2038 | (car history))) |
| 2039 | (pop history)) | 2039 | (pop history)) |
| 2040 | (setq nnmail-split-history (delq nil nnmail-split-history)))) | 2040 | (setq nnmail-split-history (delq nil nnmail-split-history)))) |
diff --git a/lisp/gnus/nnmaildir.el b/lisp/gnus/nnmaildir.el index 708a3426af1..3e4a87cee77 100644 --- a/lisp/gnus/nnmaildir.el +++ b/lisp/gnus/nnmaildir.el | |||
| @@ -915,7 +915,7 @@ This variable is set by `nnmaildir-request-article'.") | |||
| 915 | (setq dirs (funcall srv-ls srv-dir nil "\\`[^.]" 'nosort) | 915 | (setq dirs (funcall srv-ls srv-dir nil "\\`[^.]" 'nosort) |
| 916 | dirs (if (zerop (length target-prefix)) | 916 | dirs (if (zerop (length target-prefix)) |
| 917 | dirs | 917 | dirs |
| 918 | (gnus-remove-if | 918 | (seq-remove |
| 919 | (lambda (dir) | 919 | (lambda (dir) |
| 920 | (and (>= (length dir) (length target-prefix)) | 920 | (and (>= (length dir) (length target-prefix)) |
| 921 | (string= (substring dir 0 | 921 | (string= (substring dir 0 |
diff --git a/lisp/gnus/nnrss.el b/lisp/gnus/nnrss.el index 9a3a562a5dd..aa19c376d12 100644 --- a/lisp/gnus/nnrss.el +++ b/lisp/gnus/nnrss.el | |||
| @@ -625,7 +625,7 @@ which RSS 2.0 allows." | |||
| 625 | ;;; Snarf functions | 625 | ;;; Snarf functions |
| 626 | (defun nnrss-make-hash-index (item) | 626 | (defun nnrss-make-hash-index (item) |
| 627 | (gnus-message 9 "nnrss: Making hash index of %s" (gnus-prin1-to-string item)) | 627 | (gnus-message 9 "nnrss: Making hash index of %s" (gnus-prin1-to-string item)) |
| 628 | (setq item (gnus-remove-if | 628 | (setq item (seq-remove |
| 629 | (lambda (field) | 629 | (lambda (field) |
| 630 | (when (listp field) | 630 | (when (listp field) |
| 631 | (memq (car field) nnrss-ignore-article-fields))) | 631 | (memq (car field) nnrss-ignore-article-fields))) |