;ELC ;;; compiled by jwz@thalidomide on Tue Feb 22 16:25:51 1994 ;;; from file /th/jwz/emacs19/lisp/utils/mail-extr.el ;;; emacs version 19.10 Lucid (beta4). ;;; bytecomp version 2.22; 22-dec-93. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19.")) (defvar mail-extr-guess-middle-initial nil "\ *Whether to try to guess middle initial from mail address. If true, then when we see an address like \"John Smith \" we will assume that \"John Q. Smith\" is the fellow's name.") (defvar mail-extr-ignore-single-names t "\ *Whether to ignore a name that is just a single word. If true, then when we see an address like \"Idiot \" we will act as though we couldn't find a full name in the address.") (defvar mail-extr-full-name-prefixes (purecopy "\\(Prof\\|D[Rr]\\|Mrs?\\|Rev\\|Rabbi\\|SysOp\\|LCDR\\)\\.?[ \n]") "\ *Matches prefixes to the full name that identify a person's position. These are stripped from the full name because they do not contribute to uniquely identifying the person.") (defvar mail-extr-@-binds-tighter-than-! nil "\ *Whether the local mail transport agent looks at ! before @.") (defvar mail-extr-mangle-uucp nil "\ *Whether to throw away information in UUCP addresses by translating things like \"foo!bar!baz@host\" into \"baz@bar.UUCP\".") (byte-code "!\nP!!!\"! $! #!!!!! $!\"!!!\n$!!!!&!(!*!,!.!00\"!20\"!40\"!6 8 9 : ; <\"@AMBCMDEMFGMHIMJKLM#KNMOPMQRMSTMUVMWX!XYM" [purecopy "][A-Za-z{|}'~0-9`-" mail-extr-all-letters-but-separators "---" mail-extr-all-letters "A-Za-z" mail-extr-first-letters "[A-Za-z`'." mail-extr-last-letters format "[^%s]+" mail-extr-leading-garbage "\\([%s][%s]\\)\\.+\\([%s]\\)" mail-extr-bad-dot-pattern "\\(,? ?\\([JjSs][Rr]\\.?\\|V?I+V?\\)\\)\\([^%s]\\([^%s]\\|\\'\\)\\|\\'\\)" mail-extr-full-name-suffix-pattern "V?I+V?\\b" mail-extr-roman-numeral-pattern "\\([A-Z]+[-_/]\\|[A-Z][A-Z][A-Z]?\\b\\)" mail-extr-weird-acronym-pattern "\\(aka *\\)?[a-zA-Z.]+[!@][a-zA-Z.]" mail-extr-alternative-address-pattern " [-{]\\|--\\|[+@#>!DDEEEC?#DӯEEF" [no-replace (t nil) error "no-replace must be t or nil, evalable at macroexpand-time." let temp list-symbol ch while (setq ch (car temp)) cond append or > end-symbol < beg-symbol ((mail-extr-nuke-char-at ch)) ((setcar temp nil)) (setq temp (cdr temp)) setq delq nil] 12]) mail-extr-demarkerize #[(marker) " ! ! ĉ ) " [markerp marker marker-position temp nil] 3] mail-extr-markerize #[(pos) " ! !" [markerp pos copy-marker] 2] mail-extr-last (macro . #[(list) " DCF" [let list (while (not (null (cdr list))) (setq list (cdr list))) (car list)] 4]) mail-extr-safe-move-sexp (macro . #[(arg) "EDEF" [condition-case error progn goto-char scan-sexps (point) arg t (error (if (string-equal (nth 1 error) "Unbalanced parentheses") nil (while t (signal (car error) (cdr error)))))] 7]) fboundp buffer-disable-undo buffer-flush-undo] 8) (fset 'mail-extract-address-components #[(address) "!!É \n    !\"#$%&'()*)q )!/!~ 1c3;3c3!3!3\"eb#\"rebwm4`f((=`(=?!@uw`f)A=`BC@u/!`(D=@uw`f)D=`EF@u`(G=H!IJ@u/!(K='`TfL=&'MAMAMuM@)&@W`d|((NA`JBL@u(O=@u(P>`b``@\\|c)@u@v(=(K=m`'A'@b``@\\|c)'A'c&A&A@b``@\\|c)&AA_%G@V$G@= 'eb``@\\|`C'Qc'&db`C&Rc&'&@b``@\\|c)&&@&'@'z%S@S&VS'WàAaT%\"%*\"S@S&VS'WàAaT\"\"\"*!S@S&VS'WàAaT!\"!*$$@$A$'&'V&W%GUW%@V%A@Wb``@\\|c)+%'''W  @ A '&'V&Wb``@\\|c)IV>:4b``@\\|c)b``@\\|c)r\"S@SVSWàAaT\"\"\"*%S@SVSWàAaT%\"%*!S@SVSWàAaT!\"!*#S@SVSWàAaT#\"#*TVTVV#S@S@VS@WSb``@\\|c)àANT#\"#*''bx`ebw`W`\"!V&!&V!&bWX!%@b%A%``@\\|Y !B!Zc&Sb)%@#%@|)%AE`C?%&b``[\\|b``@\\|c)\\!\\&!&]\\!\"!%@%*q *!/!1~ )!''Tbw`&}}dd}%!!S@S%VSeWSb``@\\|c)àAQT!\"!*!\"\"S@S!@VSeWSb``@\\|c)àAPT\"\"\"*%\"!\"S@S%VSeWSb``@\\|c)àAQT\"\"\"*!%!@b``@\\|`%^c!A!_ \" %`%b`!B!%``@\\|Zcd`d!!MAMAMuM@)]a!\"\n!a%!%%%a%!%de }\"@ \"db%\"A`%Wb!`!B!Wc!d@!p\"A@\"A@Te\"@#``@\\|efxh)O=Wxh)O=ghi\"\"A\"h)\nj]\\\n\"!\"!\\%!% Td}!%!@b``@\\|`%^c!A!!!k!@%dd\"!!lme!!@%d)q=XTS}ed}ebno#``[\\|mj@uc*} }} TS}ed}ebno#``[\\|mj@uc*eb} db``}*#ebp#eb_qrst #wmj `f(D=`uv@u`UZd@!``@\\|b``@\\|)}ebno#``[\\|mj@uc*`f=wc.\n(O=`Tfx>@u``@\\|c.\ne`}.\n``@\\|wc.\n(zy>``@\\|wc.\n`@v`b}z{!]|}~E\"x`d|#\"oeb#\"pdb).\n_qrht #!*#ebeb Z=ebz!Ёf f *q1 f\" Sf\"Tf *  z=b deZVZ=db*#We\\fe\\\\f=TYe\\d|``}+eb#``}edU? *qedU? .(D" [get-buffer-create " *canonical address*" " *extract address components*" nil disable-initial-guessing-flag insert-point \.-pos domain-pos saved-@-pos saved-!-pos saved-%-pos li mi fi temp \.-ends-name mbox-end mbox-beg atom-end atom-beg quote-end quote-beg cend cbeg phrase-end phrase-beg last-real-pos first-real-pos record-pos-symbol route-addr-:-pos group-\;-pos group-:-pos \;-pos %-pos !-pos \,-pos :-pos @-pos >-pos <-pos char extraction-buffer canonicalization-buffer fundamental-mode kill-all-local-variables buffer-disable-undo set-syntax-table mail-extr-address-syntax-table erase-buffer case-fold-search 32 address bufferp insert-buffer-substring error "Illegal address: %s" re-search-forward "\\([^\\]\\(\\\\\\\\\\)*\\)\n[ ]" t replace-match "\\1 " " \n " 40 mail-extr-address-comment-syntax-table 1 41 (byte-code "`\"b‡" [scan-sexps 1 t] 3) ((error (byte-code "A@?@A\"w" [error "Unbalanced parentheses" signal] 3))) 34 (byte-code "`\"b‡" [scan-sexps 1 t] 3) ((error (byte-code "A@?@A\"w" [error "Unbalanced parentheses" signal] 3))) 91 mail-extr-address-domain-literal-syntax-table (byte-code "`\"b‡" [scan-sexps 1 t] 3) ((error (byte-code "A@?@A\"w" [error "Unbalanced parentheses" signal] 3))) 44 64 list ((60 . <-pos) (62 . >-pos) (64 . @-pos) (58 . :-pos) (44 . \,-pos) (33 . !-pos) (37 . %-pos) (59 . \;-pos)) 46 (41 93 92) 60 62 ch delq 2 copy-marker insert-before-markers 88 point-marker "%" -1 mail-extr-demarkerize mapcar "@" mail-extr-mangle-uucp mail-extr-@-binds-tighter-than-! mail-extr-markerize "@ " "% " backward-char (byte-code "`\"b" [scan-sexps -1] 3) ((error (byte-code "A@@A\"wÇ" [error "Unbalanced parentheses" signal t] 3))) "" "." "uucp" append downcase-region truncated (byte-code "A@ bxƏ`xh= ) `{ \"  N)e`}@b``\\|`á \"c\"A Ç" [temp @-pos " \n " nil error (byte-code "`\"b" [scan-sexps -1] 3) ((error (byte-code "A@@A\"wÇ" [error "Unbalanced parentheses" signal t] 3))) domain-pos 46 \.-pos intern-soft all-top-level-domains s domain-name 1 delq %-pos "@" throw truncated t] 4) search-forward "\\" "[_0-9]" modify-syntax-entry 33 "w" syntax-table (byte-code "`\"b‡" [scan-sexps 1 t] 3) ((error (byte-code "A@?@A\"w" [error "Unbalanced parentheses" signal] 3))) " " (95 61) (46 92) looking-at mail-extr-x400-encoded-address-pattern #[(field-pattern) " #)pŔŕ#c" [re-search-forward field-pattern nil t insert-buffer-substring 1 " "] 4] mail-extr-x400-encoded-address-given-name-pattern mail-extr-x400-encoded-address-surname-pattern mail-extr-x400-encoded-address-full-name-pattern mail-extr-bad-dot-pattern "\\1 \\2" "\\([^_=]+\\)[_=]" mail-extr-address-text-syntax-table mail-extr-voodoo mail-extr-guess-middle-initial 3 mail-extr-two-name-pattern 0 char-equal 119 ". " names-match-flag i buffer-length mail-extr-ignore-single-names "[- ]" buffer-string] 40 "\ Given an RFC-822 ADDRESS, extract full name and canonical address. Returns a list of the form (FULL-NAME CANONICAL-ADDRESS). If no name can be extracted, FULL-NAME will be nil. ADDRESS may be a string or a buffer. If it is a buffer, the visible (narrowed) portion of the buffer will be interpreted as the address. (This feature exists so that the clever caller might be able to avoid consing a string.) If ADDRESS contains more than one RFC-822 address, only the first is returned. Some day this function may be extended to extract multiple addresses, or perhaps return the position at which parsing stopped."]) (byte-code "M\"\" ) " [mail-extr-voodoo #[(mbox-beg mbox-end canonicalization-buffer) " \n   !#eb#eb#\"r#eb#\"qeb\n \n\nw=`d}` =!b`d}Y!!x` g=ucg=cwg>!g=uc!!b`d}\ng==u g=cg>`+,!g>g=ઁ$``\\|򏬃db!`3=!3+ZY+T3S}eb3+ZU3+ZU+\\f=!+Tf  +3|  oh=!``\\|`;<=#`\">?!؁@\"A!b=B!b`d}YC!D!E!F!G!H!|I!gg=ug=ucg=c=J!}K!`YށL! Sf= ځM # bځN # bpTp ށO!d be `} ebށP!Q ) ebԁR!`S dbh=cpe # bSw`d}ebځT#m@\"h." [0 nil name-done-flag name-end name-beg last-word-beg this-word-beg word-found-flag drop-last-word-if-trailing-flag drop-this-word-if-trailing-flag begin-again-flag initial last-name-comma-flag suffix-flag lower-case-flag mixed-case-flag case-fold-search word-count set-syntax-table mail-extr-address-text-syntax-table search-forward " " t "_" replace-match "." re-search-forward mail-extr-bad-dot-pattern "\\1 \\2" " \n " looking-at mail-extr-full-name-prefixes 2 mail-extr-full-name-suffix-pattern 44 1 32 (106 74 115 83) capitalize-word 46 upcase-word "MKA \\(.+\\)" (40 123 91 34 39 96) cbeg mail-extr-address-text-comment-syntax-table (39 96) "'" 39 error (byte-code "`\"b‡" [scan-sexps 1 t] 3) ((error (byte-code "A@?@A\"w" [error "Unbalanced parentheses" signal] 3))) cend " *\\'" 3 4 ". " "&\\( \\|\\'\\)" capitalize-region insert-buffer-substring canonicalization-buffer mbox-beg mbox-end disable-initial-guessing-flag mail-extr-stupid-vms-date-stamp-pattern "" mail-extr-hz-embedded-gb-encoded-chinese-pattern mail-extr-leading-garbage mail-extr-weird-acronym-pattern mail-extr-roman-numeral-pattern mail-extr-alternative-address-pattern mail-extr-trailing-comment-start-pattern mail-extr-telephone-extension-pattern mail-extr-ham-call-sign-pattern mail-extr-initial-pattern mail-extr-listserv-list-name-pattern mail-extr-name-pattern "[a-z][a-z][a-z][a-z]+[ ]*\\'" "[a-z]" "[A-Z]" "\\(\\.+\\|[?!;:.][?!;:.]+\\|[?!;:][?!;:.]*\\)\\'" "[-A-Za-z_]+[. ]\\(PARC\\|ADOC\\)\\'" erase-buffer "," " ," "[ \n]+"] 16] make-vector 509 0 ob mapcar #[(x) "\n@ \"\n8\n8\nA@\"\nA@#" [put intern x ob domain-name 2 format] 6] (("ag" "Antigua") ("ar" "Argentina" "Argentine Republic") ("arpa" t "Advanced Projects Research Agency") ("at" "Austria" "The Republic of %s") ("au" "Australia") ("bb" "Barbados") ("be" "Belgium" "The Kingdom of %s") ("bg" "Bulgaria") ("bitnet" t "Because It's Time NET") ("bo" "Bolivia" "Republic of %s") ("br" "Brazil" "The Federative Republic of %s") ("bs" "Bahamas") ("bz" "Belize") ("ca" "Canada") ("ch" "Switzerland" "The Swiss Confederation") ("cl" "Chile" "The Republic of %s") ("cn" "China" "The People's Republic of %s") ("co" "Columbia") ("com" t "Commercial") ("cr" "Costa Rica" "The Republic of %s") ("cs" "Czechoslovakia") ("de" "Germany") ("dk" "Denmark") ("dm" "Dominica") ("do" "Dominican Republic" "The %s") ("ec" "Ecuador" "The Republic of %s") ("edu" t "Educational") ("eg" "Egypt" "The Arab Republic of %s") ("es" "Spain" "The Kingdom of %s") ("fi" "Finland" "The Republic of %s") ("fj" "Fiji") ("fr" "France") ("gov" t "Government (U.S.A.)") ("gr" "Greece" "The Hellenic Republic (%s)") ("hk" "Hong Kong") ("hu" "Hungary" "The Hungarian People's Republic") ("ie" "Ireland") ("il" "Israel" "The State of %s") ("in" "India" "The Republic of %s") ("int" t "(something British, don't know what)") ("is" "Iceland" "The Republic of %s") ("it" "Italy" "The Italian Republic") ("jm" "Jamaica") ("jp" "Japan") ("kn" "St. Kitts and Nevis") ("kr" "South Korea") ("lc" "St. Lucia") ("lk" "Sri Lanka" "The Democratic Socialist Republic of %s") ("mil" t "Military (U.S.A.)") ("mx" "Mexico" "The United Mexican States") ("my" "Malaysia" "%s (changed to Myanmar?)") ("na" "Namibia") ("nato" t "North Atlantic Treaty Organization") ("net" t "Network") ("ni" "Nicaragua" "The Republic of %s") ("nl" "Netherlands" "The Kingdom of the %s") ("no" "Norway" "The Kingdom of %s") ("nz" "New Zealand") ("org" t "Organization") ("pe" "Peru") ("pg" "Papua New Guinea") ("ph" "Philippines" "The Republic of the %s") ("pl" "Poland") ("pr" "Puerto Rico") ("pt" "Portugal" "The Portugese Republic") ("py" "Paraguay") ("se" "Sweden" "The Kingdom of %s") ("sg" "Singapore" "The Republic of %s") ("sr" "Suriname") ("su" "Soviet Union") ("th" "Thailand" "The Kingdom of %s") ("tn" "Tunisia") ("tr" "Turkey" "The Republic of %s") ("tt" "Trinidad and Tobago") ("tw" "Taiwan") ("uk" "United Kingdom" "The %s of Great Britain") ("unter-dom" t "(something German)") ("us" "U.S.A." "The United States of America") ("uucp" t "Unix to Unix CoPy") ("uy" "Uruguay" "The Eastern Republic of %s") ("vc" "St. Vincent and the Grenadines") ("ve" "Venezuela" "The Republic of %s") ("yu" "Yugoslavia" "The Socialist Federal Republic of %s") ("za" "South Africa" "The Republic of %s (or Zambia? Zaire?)") ("zw" "Zimbabwe" "Republic of %s")) all-top-level-domains] 3) (fset 'what-domain #[(x) " \n\"! ! N#" [intern-soft x all-top-level-domains error "no such domain" message "%s: %s" symbol-name domain-name] 5 "\ Prompts for a mail domain, and prints the country it corresponds to in the minibuffer." (byte-code " $)C" [t completion-ignore-case completing-read "Domain: " all-top-level-domains nil] 5)]) (provide 'mail-extr)