;ELC ;;; compiled by jwz@thalidomide on Thu May 5 16:27:26 1994 ;;; from file /th/jwz/emacs19/lisp/modes/mail-abbrevs.el ;;; emacs version 19.10 Lucid (beta20). ;;; bytecomp version 2.24; 26-Apr-94. ;;; 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.")) (require 'sendmail) (defvar mail-abbrev-mailrc-file nil "\ Name of file with mail aliases. If nil, ~/.mailrc is used.") (fset 'mail-abbrev-mailrc-file '(macro . #[nil "" [(or mail-abbrev-mailrc-file (setq mail-abbrev-mailrc-file (or (getenv "MAILRC") "~/.mailrc")))] 1])) (defvar mail-aliases nil "\ Word-abbrev table of mail address aliases. If this is nil, it means the aliases have not yet been initialized and should be read from the .mailrc file. (This is distinct from there being no aliases, which is represented by this being a table with no entries.)") (fset 'mail-aliases-setup #[nil " ! !Ɖ! ! < @= B D !" [vectorp mail-aliases file-exists-p mail-abbrev-mailrc-file getenv "MAILRC" "~/.mailrc" build-mail-aliases make-local-variable pre-abbrev-expand-hook lambda sendmail-pre-abbrev-expand-hook abbrev-mode 1] 3]) (fset 'build-mail-aliases #[(&optional file recursivep) " \n!ʼn!!  \"p  Ύ!  ! q ! !qed{)c ! !dbh= eb#`Z`|)iebmhU!!chuceb#y!ߔߕ{!\"a!ߔߕ{)w`+)+`{#*?- + \"" [expand-file-name file mail-abbrev-mailrc-file getenv "MAILRC" "~/.mailrc" vectorp mail-aliases make-abbrev-table message "Parsing %s..." nil obuf buffer ((byte-code "!\nq" [buffer kill-buffer obuf] 2)) generate-new-buffer "mailrc" buffer-disable-undo get-file-buffer file-exists-p insert-file-contents 10 newline search-forward "# " t 2 p 92 delete-char -1 1 32 re-search-forward "^\\(a\\(lias\\)?\\|g\\(roup\\)?\\|source\\)[ ]+" 0 looking-at "source[ ]+\\([^ \n]+\\)" build-mail-aliases substitute-in-file-name "[ ]+\\([^ \n]+\\)" name " " start define-mail-alias recursivep mail-resolve-all-aliases "Parsing %s... done"] 4 "\ Read mail aliases from .mailrc and set mail-aliases."]) (defvar mail-alias-separator-string ", " "\ *A string inserted between addresses in multi-address mail aliases. This has to contain a comma, so \", \" is a reasonable value. You might also want something like \",\\n \" to get each address on its own line.") (byte-code "!" [boundp mail-abbrev-aliases-need-to-be-resolved t] 2) (fset 'define-mail-alias #[(name definition &optional from-mailrc-file) " !  !lj!  \" ̕O  \" ̉O  G H=T # H=T # # # OB̕U?̕# ,   $)" [vectorp mail-aliases make-abbrev-table file-exists-p mail-abbrev-mailrc-file getenv "MAILRC" "~/.mailrc" build-mail-aliases string-match "\\`[ \n,]+" definition 0 nil "[ \n,]+\\'" end L start result from-mailrc-file 34 "\"[ ,]*" 39 "'[ ,]*" "[ ,]+" "[ \n,]*,[ \n,]*" mapconcat identity mail-alias-separator-string t mail-abbrev-aliases-need-to-be-resolved name abbrevs-changed define-abbrev mail-abbrev-expand-hook] 6 "\ Define NAME as a mail-alias that translates to DEFINITION. If DEFINITION contains multiple addresses, separate them with commas." "sDefine mail alias: \nsDefine %s as mail alias for: "]) (fset 'mail-resolve-all-aliases #[nil "\n!\n\"ʼn" [mail-abbrev-aliases-need-to-be-resolved vectorp mail-aliases mapatoms mail-resolve-all-aliases-1 nil] 3 "\ Resolve all forward references in the mail aliases table."]) (fset 'mail-resolve-all-aliases-1 #[(sym &optional so-far) " > B#\"!J    # O B ʕ )\\ #L*)J" [sym so-far error "mail alias loop detected: %s" mapconcat symbol-name " <- " boundp definition nil 0 start result string-match "[ \n]*,[, \n]*" end #[(x) "\n \" B\"\n" [mail-resolve-all-aliases-1 intern-soft x mail-aliases sym so-far] 4] mail-alias-separator-string] 7]) (fset 'mail-abbrev-expand-hook #[nil "`y` biY #`uc ` `{iV  )\nbC-" [nil fp comma bol p 0 auto-fill-function fill-column search-backward "," t 1 "\n" delete-horizontal-space indent-relative " " fill-prefix do-auto-fill] 4 "\ For use as the fourth arg to define-abbrev. After expanding a mail-abbrev, if fill-mode is on and we're past the fill-column, break the line at the previous comma, and indent the next line."]) (defvar mail-abbrev-mode-regexp "^\\(Resent-\\)?\\(To\\|From\\|CC\\|BCC\\|Reply-to\\):" "\ *Regexp to select mail-headers in which mail aliases should be expanded. This string it will be handed to `looking-at' with the point at the beginning of the current line; if it matches, abbrev mode will be turned on, otherwise it will be turned off. (You don't need to worry about continuation lines.) This should be set to match those mail fields in which you want abbreviations turned on.") (defvar mail-mode-syntax-table (copy-syntax-table text-mode-syntax-table) "\ The syntax table which is used in send-mail mode message bodies.") (defvar mail-mode-header-syntax-table (byte-code " !\n#\n#\n#\n#\n#\n#\n#\n#\n)" [copy-syntax-table text-mode-syntax-table tab modify-syntax-entry 64 "_" 37 33 46 95 45 60 "(>" 62 ")<"] 4) "\ The syntax table used in send-mail mode when in a mail-address header. mail-mode-syntax-table is used when the cursor is in the message body or in non-address headers.") (defvar mail-abbrev-syntax-table (byte-code " !GS H H Y\n HU\n I Sh\n," [copy-syntax-table mail-mode-header-syntax-table tab i standard-syntax-table 95 _ 119 w 0] 4) "\ The syntax-table used for abbrev-expansion purposes; this is not actually made the current syntax table of the buffer, but simply controls the set of characters which may be a part of the name of a mail-alias.") (fset 'mail-abbrev-in-expansion-header-p #[nil "y!`eUyq!)`eb Q#`)W)" [t case-fold-search 0 looking-at "^[ ]" -1 mail-abbrev-mode-regexp search-forward "\n" mail-header-separator nil] 5 "\ Whether point is in a mail-address header field."]) (byte-code "MM" [sendmail-pre-abbrev-expand-hook #[nil " \n\n=? ! !\n\n!  z=! \n!)`p" [mail-abbrev-aliases-need-to-be-resolved mail-resolve-all-aliases mail-aliases t mail-abbrev-in-expansion-header-p boundp mail-mode-abbrev-table local-abbrev-table set-syntax-table mail-mode-syntax-table mail-mode-header-syntax-table last-command-char 95 nil pre-abbrev-expand-hook mail-abbrev-syntax-table expand-abbrev abbrev-start-location abbrev-start-location-buffer] 2] mail-abbrev-minibuffer-setup-hook #[nil " ! !Ɖ! ! !" [vectorp mail-aliases file-exists-p mail-abbrev-mailrc-file getenv "MAILRC" "~/.mailrc" build-mail-aliases make-local-variable pre-abbrev-expand-hook #[nil " ! z=! !)`\np " [mail-aliases local-abbrev-table set-syntax-table mail-mode-header-syntax-table last-command-char 95 nil pre-abbrev-expand-hook mail-abbrev-syntax-table expand-abbrev abbrev-start-location abbrev-start-location-buffer] 2] abbrev-mode 1] 3]] 2) (fset 'merge-mail-aliases #[(file) " !" [build-mail-aliases file] 2 "\ Merge mail aliases from the given file with existing ones." (byte-code "! !Ɖ \"\"$+C" [t expand-file-name "~/" mail-abbrev-mailrc-file getenv "MAILRC" "~/.mailrc" def default-directory insert-default-directory read-file-name format "Read additional aliases from file: (default %s) "] 6)]) (fset 'rebuild-mail-aliases #[(file) " !" [nil mail-aliases build-mail-aliases file] 2 "\ Rebuild all the mail aliases from the given file." (byte-code "! !Ɖ \"\"$+C" [t expand-file-name "~/" mail-abbrev-mailrc-file getenv "MAILRC" "~/.mailrc" def default-directory insert-default-directory read-file-name format "Read mail aliases from file: (default %s) "] 6)]) (fset 'mail-interactive-insert-alias #[(&optional alias) " ! \"Jc" [vectorp mail-aliases mail-aliases-setup alias intern-soft ""] 3 "\ Prompt for and insert a mail alias." (byte-code " ! $C" [vectorp mail-aliases mail-aliases-setup completing-read "Expand alias: " nil t] 5)]) (fset 'abbrev-hacking-next-line #[nil "!hzU !" [looking-at "[ ]*\n" 119 expand-abbrev next-line this-command call-interactively] 2 "\ Just like `next-line' (\\\\[next-line]) but expands abbrevs when at end of line." nil]) (fset 'abbrev-hacking-end-of-buffer #[nil "!hzU !" [looking-at "[ ]*\n" 119 expand-abbrev end-of-buffer this-command call-interactively] 2 "\ Just like `end-of-buffer' (\\\\[end-of-buffer]) but expands abbrevs when at end of line." nil]) (byte-code " # @@ \" @@!\"  @ @A# A n) AS)!" [define-key mail-mode-map "" mail-interactive-insert-alias ((next-line . abbrev-hacking-next-line) (fkey-next-line . abbrev-hacking-next-line) (end-of-buffer . abbrev-hacking-end-of-buffer) (fkey-end-of-buffer . abbrev-hacking-end-of-buffer)) subst delq nil where-is-internal keys provide mail-abbrevs] 6) (fset 'sendmail-v18-self-insert-command #[(arg) "z=  ?!)" [last-command-char 119 sendmail-pre-abbrev-expand-hook nil abbrev-start-location mail-abbrev-in-expansion-header-p abbrev-mode self-insert-command arg] 2 "\ Just like self-insert-command, but runs sendmail-pre-abbrev-expand-hook." "p"]) (byte-code "MM!M" [abbrev-hacking-next-line-v18 #[(arg) "!  !" [looking-at "[ ]*\n" sendmail-pre-abbrev-expand-hook next-line this-command arg] 2] abbrev-hacking-end-of-buffer-v18 #[(arg) "!  !" [looking-at "[ ]*\n" sendmail-pre-abbrev-expand-hook end-of-buffer this-command arg] 2] boundp mail-abbrevs-v18-map-munged nil mail-abbrevs-v18-munge-map #[nil "  W A H= B B Tb! +ˉ " [current-global-map nil 0 i new-bindings global-map 128 mail-mode-map self-insert-command sendmail-v18-self-insert-command copy-keymap t mail-abbrevs-v18-map-munged] 4]] 2) (fset 'mail-aliases-setup-v18 #[nil "=??\n \n=!! !̉ !  \n!!" [major-mode mail-mode mail-mode-map current-local-map error "shut 'er down clancy, she's suckin' mud" vectorp mail-aliases file-exists-p mail-abbrev-mailrc-file getenv "MAILRC" "~/.mailrc" build-mail-aliases mail-abbrevs-v18-map-munged mail-abbrevs-v18-munge-map use-local-map abbrev-mode 1] 3 "\ Put this on `mail-setup-hook' to use mail-abbrevs."]) (byte-code "\n\"! !M!KMMMMM!KMM!K=KA@\"׫!KMM= !" [string-match "^18\\." emacs-version boundp epoch::version fboundp buffer-disable-undo buffer-flush-undo mail-abbrev-expand-hook-v19 mail-abbrev-expand-hook #[nil " )" [auto-fill-hook auto-fill-function mail-abbrev-expand-hook-v19] 1] expand-mail-aliases (lambda (&rest args) "Obsoleted by mail-abbrevs. Does nothing." nil) abbrev-hacking-next-line #[(p) " !" [abbrev-hacking-next-line-v18 p] 2 nil "p"] abbrev-hacking-end-of-buffer #[(p) " !" [abbrev-hacking-end-of-buffer-v18 p] 2 nil "P"] mail-setup-v18 mail-setup #[(&rest args) " \"" [mail-aliases-setup-v18 apply mail-setup-v18 args] 3] vm-mail autoload load t vm-mail-internal-v18 vm-mail-internal #[(&rest args) "\n\" " [apply vm-mail-internal-v18 args mail-aliases-setup-v18] 3] major-mode mail-mode mail-aliases-setup-v18 fmakunbound] 3)