+2006-04-12 Lars Magne Ingebrigtsen <larsi@gnus.org>
+
+ * gnus-art.el (gnus-ignored-headers): Add some more headers.
+
+ * ietf-drums.el (ietf-drums-parse-addresses): Take a RAWP
+ parameter to say whether to actually parse the individual
+ addresses.
+
+ * message.el (message-put-addresses-in-ecomplete): New function.
+ (ecomplete): Require.
+ (message-mail-alias-type): Add ecomplete as an option.
+
2006-04-12 Ralf Angeli <angeli@iwi.uni-sb.de>
* flow-fill.el (fill-flowed): Remove trailing space from blank
"X-Virus-Scanned" "X-Delivery-Agent" "Posted-Date" "X-Gateway"
"X-Local-Origin" "X-Local-Destination" "X-UserInfo1"
"X-Received-Date" "X-Hashcash" "Face" "X-DMCA-Notifications"
- "X-Abuse-and-DMCA-Info" "X-Postfilter" "X-Gpg-.*" "X-Disclaimer"))
+ "X-Abuse-and-DMCA-Info" "X-Postfilter" "X-Gpg-.*" "X-Disclaimer"
+ "Envelope-To" "X-Spam-Score" "System-Type" "X-Injected-Via-Gmane"
+ "X-Gmane-NNTP-Posting-Host" "Jabber-ID" "Archived-At"
+ "Envelope-Sender" "Envelope-Recipients"))
"*All headers that start with this regexp will be hidden.
This variable can also be a list of regexps of headers to be ignored.
If `gnus-visible-headers' is non-nil, this variable will be ignored."
(ietf-drums-get-comment string)))
(cons mailbox display-string)))))
-(defun ietf-drums-parse-addresses (string)
- "Parse STRING and return a list of MAILBOX / DISPLAY-NAME pairs."
+(defun ietf-drums-parse-addresses (string &optional rawp)
+ "Parse STRING and return a list of MAILBOX / DISPLAY-NAME pairs.
+If RAWP, don't actually parse the addresses, but instead return
+a list of address strings."
(if (null string)
nil
(with-temp-buffer
(skip-chars-forward "^,"))))
((eq c ?,)
(setq address
- (condition-case nil
- (ietf-drums-parse-address
- (buffer-substring beg (point)))
- (error nil)))
+ (if rawp
+ (buffer-substring beg (point))
+ (condition-case nil
+ (ietf-drums-parse-address
+ (buffer-substring beg (point)))
+ (error nil))))
(if address (push address pairs))
(forward-char 1)
(setq beg (point)))
(t
(forward-char 1))))
(setq address
- (condition-case nil
- (ietf-drums-parse-address
- (buffer-substring beg (point)))
- (error nil)))
+ (if rawp
+ (buffer-substring beg (point))
+ (condition-case nil
+ (ietf-drums-parse-address
+ (buffer-substring beg (point)))
+ (error nil))))
(if address (push address pairs))
(nreverse pairs)))))
(require 'mail-parse)
(require 'mml)
(require 'rfc822)
+(require 'ecomplete)
(defgroup message '((user-mail-address custom-variable)
(user-full-name custom-variable))
:group 'message
:link '(custom-manual "(message)Mail Aliases")
:type '(choice (const :tag "Use Mailabbrev" abbrev)
+ (const :tag "Use ecomplete" ecomplete)
(const :tag "No expansion" nil)))
(defcustom message-auto-save-directory
(save-excursion
(run-hooks 'message-sent-hook))
(message "Sending...done")
+ ;; Do ecomplete address snarfing.
+ (when (eq message-mail-alias-type 'ecomplete)
+ (message-put-addresses-in-ecomplete))
;; Mark the buffer as unmodified and delete auto-save.
(set-buffer-modified-p nil)
(delete-auto-save-file-if-necessary t)
(not result)
result)))
+(defun message-put-addresses-in-ecomplete ()
+ (dolist (header '("to" "cc" "from" "reply-to"))
+ (let ((value (message-fetch-field header)))
+ (dolist (string (mail-header-parse-addresses value 'raw))
+ (ecomplete-add-item 'mail (car (mail-header-parse-address string))
+ string)))))
+
(when (featurep 'xemacs)
(require 'messagexmas)
(message-xmas-redefine))