Revision: miles@gnu.org--gnu-2005/gnus--devo--0--patch-242
[gnus] / lisp / message.el
index 756cc44..4f93901 100644 (file)
@@ -2087,14 +2087,6 @@ With prefix-argument just set Follow-Up, don't cross-post."
 
 ;;; End of functions adopted from `message-utils.el'.
 
-(defun message-remove-duplicates (list)
-  (let (new)
-    (while list
-      (or (member (car list) new)
-         (setq new (cons (car list) new)))
-      (setq list (cdr list)))
-    (nreverse new)))
-
 (defun message-remove-header (header &optional is-regexp first reverse)
   "Remove HEADER in the narrowed buffer.
 If IS-REGEXP, HEADER is a regular expression.
@@ -2739,6 +2731,11 @@ M-RET    `message-newline-and-reformat' (break the line and reformat)."
   (message-goto-body)
   (forward-line -1))
 
+(defun message-in-body-p ()
+  "Return t if point is in the message body."
+  (let ((body (save-excursion (message-goto-body) (point))))
+    (>= (point) body)))
+
 (defun message-goto-signature ()
   "Move point to the beginning of the message signature.
 If there is no signature in the article, go to the end and
@@ -5054,7 +5051,7 @@ subscribed address (and not the additional To and Cc header contents)."
        rhs ace  address)
     (when field
       (dolist (rhs
-              (message-remove-duplicates
+              (mm-delete-duplicates
                (mapcar (lambda (rhs) (or (cadr (split-string rhs "@")) ""))
                        (mapcar 'downcase
                                (mapcar
@@ -6687,9 +6684,8 @@ which specify the range to operate on."
 
 (defun message-tool-bar-local-item-from-menu (command icon in-map &optional from-map &rest props)
   ;; We need to make tool bar entries in local keymaps with
-  ;; `tool-bar-local-item-from-menu' in Emacs > 21.3
+  ;; `tool-bar-local-item-from-menu' in Emacs >= 22
   (if (fboundp 'tool-bar-local-item-from-menu)
-      ;; This is for Emacs 21.3
       (tool-bar-local-item-from-menu command icon in-map from-map props)
     (tool-bar-add-item-from-menu command icon from-map props)))