;ELC ;;; compiled by erik@naggum.no on Tue Jun 25 14:41:20 1996 ;;; from file /home/gd/gnu/emacs/19.0/lisp/mailalias.el ;;; emacs version 19.31.4. ;;; 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.29"))) (error "`mailalias.el' was compiled for Emacs 19.29 or later")) (require (quote sendmail)) #@149 Alist of local users, aliases and directory entries as available. When t this still needs to be initialized. This is the basis for `mail-complete'. (defvar mail-names t (#$ . 498)) #@66 Alist of local users. When t this still needs to be initialized. (defvar mail-local-names t (#$ . 685)) #@85 Alist of mail address directory entries. When t this still needs to be initialized. (defvar mail-directory-names t (#$ . 795)) (byte-code "! B" [boundp mail-address-field-regexp "^\\(Resent-\\)?\\(To\\|From\\|CC\\|BCC\\|Reply-to\\):" current-load-list] 2) #@224 Alist of header field and expression to return alist for completion. Expression may reference variable `pattern' which is the string being completed. If not on matching header, `mail-complete-function' gets called instead. (defvar mail-complete-alist (byte-code "BB" [mail-address-field-regexp (mail-get-names pattern) (("Newsgroups:" if (boundp (quote gnus-active-hashtb)) gnus-active-hashtb (if (boundp news-group-article-assoc) news-group-article-assoc)) ("Followup-To:" mail-sentto-newsgroups))] 2) (#$ . 1069)) #@72 Function to call when completing outside `mail-complete-alist'-header. (defvar mail-complete-function (quote ispell-complete-word) (#$ . 1595)) #@101 Function to get completions from directory service or `nil' for none. See `mail-directory-requery'. (defvar mail-directory-function nil (#$ . 1746)) #@159 When non-`nil' call `mail-directory-function' for each completion. In that case, one argument gets passed to the function, the partial string entered so far. (defvar mail-directory-requery nil (#$ . 1902)) #@442 Unix command when `mail-directory-function' is `mail-directory-process'. This is a list of the form (COMMAND ARG ...), where each of the list elements is evaluated. When `mail-directory-requery' is non-`nil', during evaluation the variable `pattern' contains the partial input being completed. This might look like '(remote-shell-program "HOST" "-nl" "USER" "COMMAND") or '(remote-shell-program "HOST" "-n" "COMMAND '^" pattern "'") (defvar mail-directory-process nil (#$ . 2115)) #@65 List of (HOST SERVICE) for stream connection to mail directory. (defvar mail-directory-stream nil (#$ . 2610)) #@282 How to interpret the output of `mail-directory-function'. Three types of values are possible: - nil means to gather each line as one name - regexp means first \(grouping\) in successive matches is name - function called at beginning of buffer that returns an alist of names (defvar mail-directory-parser nil (#$ . 2728)) #@285 Expand all mail aliases in suitable header fields found between BEG and END. Suitable header fields are `To', `From', `CC' and `BCC', `Reply-to', and their `Resent-' variants. Optional second arg EXCLUDE may be a regular expression defining text to be removed from alias expansions. (defalias 'expand-mail-aliases #[(beg end &optional exclude) " = b Ó\n#)!w`É\f #yx b`W`\f{\f@AZV{\fA\fe#Ԕ`Z ! \"\f\"\n \"A\nZB\fB\fbcQ  b #!b*``Z\\|bb u*VÉ.É)" [sendmail-sync-aliases mail-aliases t nil build-mail-aliases beg make-marker end case-fold-search re-search-forward mail-address-field-regexp " " disabled-aliases seplen epos pos end1 beg1 "^[^ ]" move 0 " \n" point-marker "[ ]*[\n,][ ]*" marker-position buffer-substring-no-properties string translation assoc exclude "\\b\\(" "\\)\\b" regexp replace-match ""] 7 (#$ . 3063)]) #@140 Read mail aliases from personal aliases file and set `mail-aliases'. By default, this is the file specified by `mail-personal-alias-file'. (defalias 'build-mail-aliases #[(&optional file) " \n!pƎ!q !/ !qed\")cO !< !O P!M !Odbh=[ ebmhUy!!c^u^eb#!ٕٔ\"ycyÉeb#!w`  `\"#*\"+" [expand-file-name file mail-personal-alias-file nil obuf buffer ((byte-code "!\nq" [buffer kill-buffer obuf] 2)) generate-new-buffer " mailrc" get-file-buffer buffer-substring-no-properties file-exists-p insert-file-contents "~/" 10 newline 92 delete-char -1 1 32 re-search-forward "^source[ ]+" t "\\S-+" 0 "# " "^\\(a\\|alias\\|g\\|group\\)[ ]+\\([^ ]+\\)" match-string 2 name " " start define-mail-alias mail-aliases] 6 (#$ . 4112)]) #@360 Define NAME as a mail alias that translates to DEFINITION. This means that sending a message to NAME will actually send to DEFINITION. Normally, the addresses in DEFINITION must be separated by commas. If FROM-MAILRC-FILE is non-nil, then addresses in DEFINITION can be separated by spaces; an address can contain spaces if it is quoted with double-quotes. (defalias 'define-mail-alias #[(name definition &optional from-mailrc-file) " = !  \"$ ʕO  \"4 ʉO  ̚?> GÉ ~ H=rT # # # OBʕU?ʕR#  \"    B B‰-" [sendmail-sync-aliases mail-aliases t nil file-exists-p mail-personal-alias-file build-mail-aliases string-match "\\`[ \n,]+" definition 0 "[ \n,]+\\'" "" tem end L start result from-mailrc-file 34 "\"[ ,]*" "[ ,]+" "[ \n,]*,[ \n,]*" mapconcat identity ", " assoc name mail-names] 6 (#$ . 4976) "sDefine mail alias: \nsDefine %s as mail alias for: "]) #@215 Perform completion on header field or word preceding point. Completable headers are according to `mail-complete-alist'. If none matches current header, calls `mail-complete-function' and passes prefix arg if any. (defalias 'mail-complete #[(arg) " = !  Q#)#SS@@!J@AÉ1A4)`x`){!\"=\" |c!ې\"!\", !)" [sendmail-sync-aliases mail-aliases t nil file-exists-p mail-personal-alias-file build-mail-aliases mail-complete-alist list search-forward "\n" mail-header-separator re-search-backward "^[^ ]" looking-at arg end "^ <,:" beg pattern completion eval try-completion message "Can't find completion for \"%s\"" ding "Making completion list..." "*Completions*" display-completion-list all-completions "Making completion list...%s" "done" mail-complete-function] 6 (#$ . 5993) "P"]) #@155 Fetch local users and global mail adresses for completion. Consults `/etc/passwd' and a directory service if one is set up via `mail-directory-function'. (defalias 'mail-get-names #[(pattern) "=3!qƉ%m.!(!C\"yp!) =A=[=[X!g =~:q:w#\" ) " [mail-local-names t generate-new-buffer " passwd" insert-file-contents "/etc/passwd" nil looking-at "\\+?\\([^:@\n+]+\\)" add-to-list match-string 1 kill-buffer mail-names mail-directory-names directory mail-directory-function mail-directory mail-directory-requery pattern sort append mail-aliases #[(a b) "@ @" [a b] 2]] 6 (#$ . 6929)]) #@142 Call directory to get names matching PATTERN or all if `nil'. Calls `mail-directory-function' and applies `mail-directory-parser' to output. (defalias 'mail-directory #[(pattern) "!!q\f !b ;/ #X!CB < XmX`ynM`SN`{CB<p!!*" [message "Querying directory..." generate-new-buffer " *mail-directory*" mail-directory-function pattern 1 nil directory mail-directory-parser re-search-forward t match-string kill-buffer "Querying directory...done"] 4 (#$ . 7615)]) #@81 Call a Unix process to output names in directory. See `mail-directory-process'. (defalias 'mail-directory-process #[(pattern) " @! A\"&" [apply call-process eval mail-directory-process nil t mapcar] 9 (#$ . 8137)]) #@76 Open a stream to retrieve names in directory. See `mail-directory-stream'. (defalias 'mail-directory-stream #[(pattern) "p$\" ?! )" [nil mailalias-done set-process-sentinel apply open-network-stream "mailalias" mail-directory-stream #[(x x) "" [t mailalias-done] 2] sit-for 0.10000000000000001] 6 (#$ . 8368)]) #@65 Return all entries from Newsgroups: header as completion alist. (defalias 'mail-sentto-newsgroups #[nil "\"&`xW$` {C\fBx`\f\f*)" [mail-position-on-field "newsgroups" t nil list point "^:, \n" 0 ", \n"] 3 (#$ . 8708)]) (provide (quote mailalias))