;;; 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.
(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
rhs ace address)
(when field
(dolist (rhs
- (message-remove-duplicates
+ (mm-delete-duplicates
(mapcar (lambda (rhs) (or (cadr (split-string rhs "@")) ""))
(mapcar 'downcase
(mapcar
(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)))