(provide (quote mail-utils)) (defvar mail-use-rfc822 nil "\ *If non-nil, use a full, hairy RFC822 parser on mail addresses. Otherwise, (the default) use a smaller, somewhat faster and often-correct parser.") (defun mail-string-delete (string start end) "\ Returns a string containing all of STRING except the part from START (inclusive) to END (exclusive)." (byte-code "? O O OP" [end string start nil 0] 4)) (defun mail-strip-quoted-names (address) "\ Delete comments and quoted strings in an address list ADDRESS. Also delete leading/trailing whitespace and replace FOO with just BAR. Return a modified address list." (byte-code "! !# \" ! !#O \"> !#(Љ #u G!V] !HUh!q !#C \"!!! S # #+v )" [mail-use-rfc822 address pos junk-beg junk-end close require rfc822 mapconcat identity rfc822-addresses ", " nil string-match "\\`[ ]*" match-end 0 "[ ]*\\'" "[ ]*(\\([^)\"\\]\\|\\\\.\\|\\\\ \\)*)" mail-string-delete "[ ]*\"\\([^\"\\]\\|\\\\.\\|\\\\ \\)*\"[ ]*" 64 "\\(,\\|\\`\\)[^,]*<\\([^>,]*>\\)" 1 match-beginning 2] 26)) (or (and (boundp (quote rmail-default-dont-reply-to-names)) (not (null rmail-default-dont-reply-to-names))) (setq rmail-default-dont-reply-to-names "info-")) (defun rmail-dont-reply-to (userids) "\ Returns string of mail addresses USERIDS sans any recipients that start with matches for rmail-dont-reply-to-names. Usenet paths ending in an element that matches are removed also." (byte-code "?%  P!! !PPQ \"m VF T!#X![G #2\" O\"!O," [rmail-dont-reply-to-names rmail-default-dont-reply-to-names match case-fold-search t pos epos userids "\\|" "" regexp-quote getenv "USER" "LOGNAME" user-login-name "\\>" "\\(^\\|,\\)[ ]*\\([^, ]*!\\|\\)\\(" "\\)" nil string-match 0 "[ ,]+" match-end mail-string-delete "[ , ]*\\'" "\\s *"] 15)) (defun mail-fetch-field (field-name &optional last all) "\ Return the value of the header field FIELD. The buffer is expected to be narrowed to just the headers of the message. If 2nd arg LAST is non-nil, use the last such field if there are several. If 3rd arg ALL is non-nil, concatenate all such fields, with commas between." (byte-code "eb !Qeb Z #L`!!0ƈ! \"=̂>`S\"Q) \"?V ) #t #tƈg`!!ƈx`S\")*)" [case-fold-search t name field-name all value nil opoint last "^" regexp-quote "[ ]*:[ ]*" "" re-search-forward forward-line 1 looking-at "[ ]" string= ", " buffer-substring] 14)) (defun mail-parse-comma-list nil (byte-code "!m?-`!! `\"B!!*" [accumulated beg nil skip-chars-forward " " "^," skip-chars-backward buffer-substring ", "] 8)) (defun mail-comma-list-regexp (labels) (byte-code " \" ʼn  #O \"3 O !OQ) " [pos labels nil string-match "[^ ]" 0 "[ ]*$" "[ ]*,[ ]*" "\\|" match-end] 10))