Commits

steveb  committed 61be017

Add mail-rewrite-address-function hook

  • Participants
  • Parent commits 124ffea

Comments (0)

Files changed (3)

+1998-04-28  SL Baur  <steve@altair.xemacs.org>
+
+	* mail-utils.el (mail-rewrite-address-function): New variable.
+	(mail-strip-quoted-names): Use it.
+	
 1998-04-22  Didier Verna  <verna@inf.enst.fr>
 
 	* browse-url.el (browse-url-cci): ;;;###autoload was missing.
 
 # This XEmacs package contains independent single file lisp packages
 
-VERSION = 1.10
+VERSION = 1.11
 AUTHOR_VERSION =
 MAINTAINER = XEmacs Development Team <xemacs-beta@xemacs.org>
 PACKAGE = mail-lib

File mail-utils.el

     (concat (substring string 0 start)
 	    (substring string end nil))))
 
+(defvar mail-rewrite-address-function nil
+  "Function called at the end of `mail-strip-quoted-names' if defined.
+May be used for X.400 rewriting, etc.")
+
 (defun mail-strip-quoted-names (address)
   "Delete comments and quoted strings in an address list ADDRESS.
 Also delete leading/trailing whitespace and replace FOO <BAR> with just BAR.
 	       (close (match-end 0)))
 	   (setq address (mail-string-delete address (1- close) close))
 	   (setq address (mail-string-delete address junk-beg junk-end))))
-       address))))
+       (if (fboundp mail-rewrite-address-function)
+	   (funcall mail-rewrite-address-function address)
+	 address)))))
   
 (or (and (boundp 'rmail-default-dont-reply-to-names)
 	 (not (null rmail-default-dont-reply-to-names)))