;ELC ;;; compiled by rms@mole.gnu.ai.mit.edu on Tue Jul 12 02:54:05 1994 ;;; from file /home/fsf/rms/e19/lisp/mailabbrev.el ;;; emacs version 19.25.16. ;;; bytecomp version FSF 2.10 ;;; 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 "`/home/fsf/rms/e19/lisp/mailabbrev.el' was compiled for Emacs 19")) (require (quote sendmail)) (defvar mail-abbrev-mailrc-file nil "\ Name of file with mail aliases. If nil, ~/.mailrc is used.") (defalias (quote mail-abbrev-mailrc-file) (quote (macro . #[nil "À‡" [(or mail-abbrev-mailrc-file (setq mail-abbrev-mailrc-file (or (getenv "MAILRC") "~/.mailrc")))] 1]))) (defvar mail-abbrevs 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.)") (defalias (quote mail-abbrevs-setup) #[nil "À !„ †ÄÅ!†Ɖ!ƒÇ ˆÈÉ!ˆ <ƒ4 @Ê=„4Ë B‚8Ë D ÌÍ!‡" [vectorp mail-abbrevs file-exists-p mail-abbrev-mailrc-file getenv "MAILRC" "~/.mailrc" build-mail-abbrevs make-local-variable pre-abbrev-expand-hook lambda sendmail-pre-abbrev-expand-hook abbrev-mode 1] 3]) (defalias 'build-mail-abbrevs #[(&optional file recursivep) "À †\n†ÃÄ!†ʼn!Æ!„#ÈÉÇÈ\"ˆÊË \"ˆÈp\f ÎŽÏÐ! Ñ !ˆ qˆÒ !ƒSŠÒ !qˆed{)cˆ‚]Ó !ƒ]Ô !ˆdbˆhÕ=„iÖ ˆebˆ×ØÈÙ#ƒ…`ÚZȈ`|ˆ)‚lebˆm„©ÈˆhÜUƒ£ÝÞ!ˆÝß!ˆàcˆ‚ˆßuˆ‚ˆebˆáâÈÙ#ƒñãyˆäå!ƒÎȈæçߔߕ{!Ù\"ˆ‚¬áè!ˆß”ß•{)êÈwˆ`+Ȉì)+`{Ù#ˆ*‚¬-„ùî ˆ+Êï \"‡" [expand-file-name file mail-abbrev-mailrc-file getenv "MAILRC" "~/.mailrc" vectorp mail-abbrevs nil define-abbrev-table message "Parsing %s..." 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-abbrevs substitute-in-file-name "[ ]+\\([^ \n]+\\)" name " " start define-mail-abbrev recursivep mail-resolve-all-aliases "Parsing %s... done"] 4 "\ Read mail aliases from `~/.mailrc' file and set `mail-abbrevs'."]) (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) (defalias 'define-mail-abbrev #[(name definition &optional from-mailrc-file) "À !„\"ÂÃÁÂ\"ˆÄ †ÆÇ!†ȉ!ƒ\"É ˆÊË\f\"ƒ2\fÍ•ÂO\fÊÎ\f\"ƒB\f͉”O\fÂ\fG‰ÍV…Q̓²ƒ‡\fHÔ=ƒ{TÊÕ\f#‚ÊÖ\f#‚Ê×\f#\fOB…¬Í•U?…¬Í•‰„[ØÙŸ#\f,Û—ß \fà$)‡" [vectorp mail-abbrevs nil define-abbrev-table file-exists-p mail-abbrev-mailrc-file getenv "MAILRC" "~/.mailrc" build-mail-abbrevs string-match "\\`[ \n,]+" definition 0 "[ \n,]+\\'" result L start end from-mailrc-file 34 "\"[ ,]*" "[ ,]+" "[ \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-abbrev that translates to DEFINITION. If DEFINITION contains multiple addresses, separate them with commas." "sDefine mail alias: \nsDefine %s as mail alias for: "]) (defalias 'mail-resolve-all-aliases #[nil "…Á\n!ƒÃÄ\n\"ˆÅ‰‡" [mail-abbrev-aliases-need-to-be-resolved vectorp mail-abbrevs mapatoms mail-resolve-all-aliases-1 nil] 3 "\ Resolve all forward references in the mail aliases table."]) (defalias (quote mail-resolve-all-aliases-1) #[(sym &optional so-far) " >ƒÂÃÄÅ BÆ#\"ˆÇ!…J‰ƒ\\ÉÊ \f ƒLÍÎ # O\fB\f…FÊ• )‚%ÄÐ\fŸ#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 \"\f B\"† \n‡" [mail-resolve-all-aliases-1 intern-soft x mail-abbrevs sym so-far] 4] mail-alias-separator-string] 7]) (defalias 'mail-abbrev-expand-hook #[nil "Š`À‰‰Åyˆ`\fbˆ…TiY…TÈÉ Ê#…T`ËuˆÌcˆÍ ˆ`Î ˆ\f`{ÀˆiVƒN †HÏÑ ˆ)\nbˆ‚-‡" [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-abbrevs 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ƒ0\n HUƒ)\n Iˆ S‰‚\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.") (defalias 'mail-abbrev-in-expansion-header-p #[nil "ÀŠÂyˆÃÄ!ƒ`eU„Åyˆ‚Ã!)…2`Š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."]) (defalias (quote sendmail-pre-abbrev-expand-hook) #[nil "…RÁ=?…R ƒE ƒÄ ˆÆ!ˆ¨ƒ,zÉ=„=Ê Æ\f!ˆÍ ˆÆ!ˆ)`p‰‡ÐÑ!…MÆ!‡" [mail-abbrevs t mail-abbrev-in-expansion-header-p mail-abbrev-aliases-need-to-be-resolved mail-resolve-all-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 boundp mail-mode-abbrev-table mail-mode-syntax-table] 2]) (defalias 'merge-mail-abbrevs #[(file) "À !‡" [build-mail-abbrevs file] 2 "\ Merge mail aliases from the given file with existing ones." (list (let ((insert-default-directory t) (default-directory (expand-file-name "~/")) (def (mail-abbrev-mailrc-file))) (read-file-name (format "Read additional aliases from file: (default %s) " def) default-directory (expand-file-name def default-directory) t)))]) (defalias 'rebuild-mail-abbrevs #[(file) "À !‡" [nil mail-abbrevs build-mail-abbrevs file] 2 "\ Rebuild all the mail aliases from the given file." (list (let ((insert-default-directory t) (default-directory (expand-file-name "~/")) (def (mail-abbrev-mailrc-file))) (read-file-name (format "Read mail aliases from file: (default %s) " def) default-directory (expand-file-name def default-directory) t)))]) (defalias 'mail-interactive-insert-alias #[(&optional alias) "À !„  ˆ ƒÄ \"J†Åc‡" [vectorp mail-abbrevs mail-abbrevs-setup alias intern-soft ""] 3 "\ Prompt for and insert a mail alias." (byte-code "À !„  ˆÃÄ ÅÆ$C‡" [vectorp mail-abbrevs mail-abbrevs-setup completing-read "Expand alias: " nil t] 5)]) (defalias 'mail-abbrev-next-line #[(&optional arg) "ÀÁ!ƒ  ˆÃà !‡" [looking-at "[ ]*\n" expand-abbrev next-line this-command arg] 2 "\ Expand any mail abbrev, then move cursor vertically down ARG lines. If there is no character in the target line exactly under the current column, the cursor is positioned after the character in that line which spans this column, or at the end of the line if it is not long enough. If there is no line in the buffer after this one, a newline character is inserted to create a line and the cursor moves to that line. The command \\[set-goal-column] can be used to create a semipermanent goal column to which this command always moves. Then it does not try to move vertically. This goal column is stored in `goal-column', which is nil when there is none. If you are thinking of using this in a Lisp program, consider using `forward-line' instead. It is usually easier to use and more reliable (no dependence on goal column, etc.)." "p"]) (defalias 'mail-abbrev-end-of-buffer #[(&optional arg) "ÀÁ!ƒ  ˆÃà !‡" [looking-at "[ ]*\n" expand-abbrev end-of-buffer this-command arg] 2 "\ Expand any mail abbrev, then move point to end of buffer. Leave mark at previous position. With arg N, put point N/10 of the way from the true end. Don't use this command in Lisp programs! (goto-char (point-max)) is faster and avoids clobbering the mark." "P"]) (byte-code "À ÂÃ#ˆÄÅ!‡" [define-key mail-mode-map "" mail-interactive-insert-alias provide mailabbrev] 4)