summaryrefslogtreecommitdiff
path: root/lisp/gnus
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/gnus')
-rw-r--r--lisp/gnus/gnus-sum.el10
-rw-r--r--lisp/gnus/message.el12
-rw-r--r--lisp/gnus/nnimap.el2
3 files changed, 8 insertions, 16 deletions
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index 4baf4bc8263..3f5362ba17a 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -4773,7 +4773,7 @@ If LINE, insert the rebuilt thread starting on line LINE."
(let (headers thread last-id)
;; First go up in this thread until we find the root.
(setq last-id (gnus-root-id id)
- headers (message-flatten-list (gnus-id-to-thread last-id)))
+ headers (flatten-tree (gnus-id-to-thread last-id)))
;; We have now found the real root of this thread. It might have
;; been gathered into some loose thread, so we have to search
;; through the threads to find the thread we wanted.
@@ -5069,7 +5069,7 @@ Unscored articles will be counted as having a score of zero."
"Return the highest article number in THREAD."
(apply 'max (mapcar (lambda (header)
(mail-header-number header))
- (message-flatten-list thread))))
+ (flatten-tree thread))))
(defun gnus-article-sort-by-most-recent-date (h1 h2)
"Sort articles by number."
@@ -5087,9 +5087,9 @@ Unscored articles will be counted as having a score of zero."
"Return the highest article date in THREAD."
(apply 'max
(mapcar (lambda (header) (float-time
- (gnus-date-get-time
- (mail-header-date header))))
- (message-flatten-list thread))))
+ (gnus-date-get-time
+ (mail-header-date header))))
+ (flatten-tree thread))))
(defun gnus-thread-total-score-1 (root)
;; This function find the total score of the thread below ROOT.
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index fdaa4e82727..03f80616d9e 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -8051,7 +8051,7 @@ regular text mode tabbing command."
If SHOW is non-nil, the arguments TEXT... are displayed in a temp buffer.
The following arguments may contain lists of values."
(if (and show
- (setq text (message-flatten-list text)))
+ (setq text (flatten-tree text)))
(save-window-excursion
(with-output-to-temp-buffer " *MESSAGE information message*"
(with-current-buffer " *MESSAGE information message*"
@@ -8061,15 +8061,7 @@ The following arguments may contain lists of values."
(funcall ask question))
(funcall ask question)))
-(defun message-flatten-list (list)
- "Return a new, flat list that contains all elements of LIST.
-
-\(message-flatten-list \\='(1 (2 3 (4 5 (6))) 7))
-=> (1 2 3 4 5 6 7)"
- (cond ((consp list)
- (apply 'append (mapcar 'message-flatten-list list)))
- (list
- (list list))))
+(define-obsolete-function-alias 'message-flatten-list #'flatten-tree "27.1")
(defun message-generate-new-buffer-clone-locals (name &optional varstr)
"Create and return a buffer with name based on NAME using `generate-new-buffer'.
diff --git a/lisp/gnus/nnimap.el b/lisp/gnus/nnimap.el
index 1a3b05ddb37..adbce25530d 100644
--- a/lisp/gnus/nnimap.el
+++ b/lisp/gnus/nnimap.el
@@ -804,7 +804,7 @@ textual parts.")
(insert "\n--" boundary "--\n")))
(defun nnimap-find-wanted-parts (structure)
- (message-flatten-list (nnimap-find-wanted-parts-1 structure "")))
+ (flatten-tree (nnimap-find-wanted-parts-1 structure "")))
(defun nnimap-find-wanted-parts-1 (structure prefix)
(let ((num 1)