(require 'mm-uu)
(require 'message)
(require 'mouse)
+(require 'seq)
(autoload 'gnus-msg-mail "gnus-msg" nil t)
(autoload 'gnus-button-mailto "gnus-msg")
nil)
(gnus-treat-condition
(eq gnus-treat-condition val))
- ((and (listp val)
- (stringp (car val)))
- (apply #'gnus-or (mapcar `(lambda (s)
- (string-match s ,(or gnus-newsgroup-name "")))
- val)))
+ ((stringp (car-safe val))
+ (let ((name (or gnus-newsgroup-name "")))
+ (seq-some (lambda (s) (string-match-p s name)) val)))
((listp val)
(let ((pred (pop val)))
(cond
(eval-when-compile (require 'cl-lib))
+(require 'seq)
(require 'time-date)
(require 'text-property-search)
(eq (cadr (memq 'gnus-undeletable (text-properties-at b))) t)
(text-property-any b e 'gnus-undeletable t)))
-(defun gnus-or (&rest elems)
- "Return non-nil if any of the elements are non-nil."
- (catch 'found
- (while elems
- (when (pop elems)
- (throw 'found t)))))
-
-(defun gnus-and (&rest elems)
- "Return non-nil if all of the elements are non-nil."
- (catch 'found
- (while elems
- (unless (pop elems)
- (throw 'found nil)))
- t))
+(defun gnus-or (&rest elements)
+ "Return non-nil if any one of ELEMENTS is non-nil."
+ (seq-drop-while #'null elements))
+
+(defun gnus-and (&rest elements)
+ "Return non-nil if all ELEMENTS are non-nil."
+ (not (memq nil elements)))
;; gnus.el requires mm-util.
(declare-function mm-disable-multibyte "mm-util")