aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1997-06-07 23:12:19 +0000
committerRichard M. Stallman1997-06-07 23:12:19 +0000
commit31407d5d6ea78e278ee60e2cf5be1a6dc6339e9e (patch)
treeb1a338e4a769232aaf1adcc1b447af2da0e11c83
parent534a6edf9b8214c99e8c41e079362ca3a8b3b143 (diff)
downloademacs-31407d5d6ea78e278ee60e2cf5be1a6dc6339e9e.tar.gz
emacs-31407d5d6ea78e278ee60e2cf5be1a6dc6339e9e.zip
Customize. Doc fixes.
Mark some risky local variables.
-rw-r--r--lisp/mail/mailalias.el118
1 files changed, 75 insertions, 43 deletions
diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el
index 54362f11014..f30402f7c9e 100644
--- a/lisp/mail/mailalias.el
+++ b/lisp/mail/mailalias.el
@@ -32,21 +32,19 @@
32 32
33(require 'sendmail) 33(require 'sendmail)
34 34
35(defvar mail-names t 35(defgroup mailalias nil
36 "Alist of local users, aliases and directory entries as available. 36 "Expanding mail aliases"
37Elements have the form (MAILNAME) or (MAILNAME . FULLNAME). 37 :group 'mail)
38If the value means t, it means the real value should be calculated
39for the next use. this is used in `mail-complete'.")
40 38
41(defvar mail-local-names t 39(defcustom mail-passwd-files '("/etc/passwd")
42 "Alist of local users. 40 "*List of files from which to determine valid user names."
43When t this still needs to be initialized.") 41 :type '(repeat string)
44 42 :group 'mailalias)
45(defvar mail-passwd-files '("/etc/passwd")
46 "List of files from which to determine valid user names.")
47 43
48(defvar mail-passwd-command nil 44(defcustom mail-passwd-command nil
49 "Shell command to retrieve text to add to `/etc/passwd', or nil.") 45 "*Shell command to retrieve text to add to `/etc/passwd', or nil."
46 :type '(choice string (const nil))
47 :group 'mailalias)
50 48
51(defvar mail-directory-names t 49(defvar mail-directory-names t
52 "Alist of mail address directory entries. 50 "Alist of mail address directory entries.
@@ -55,7 +53,7 @@ When t this still needs to be initialized.")
55(defvar mail-address-field-regexp 53(defvar mail-address-field-regexp
56 "^\\(Resent-\\)?\\(To\\|From\\|CC\\|BCC\\|Reply-to\\):") 54 "^\\(Resent-\\)?\\(To\\|From\\|CC\\|BCC\\|Reply-to\\):")
57 55
58(defvar mail-complete-alist 56(defcustom mail-complete-alist
59 `((,mail-address-field-regexp mail-get-names pattern) 57 `((,mail-address-field-regexp mail-get-names pattern)
60 ("Newsgroups:" . (if (boundp 'gnus-active-hashtb) 58 ("Newsgroups:" . (if (boundp 'gnus-active-hashtb)
61 gnus-active-hashtb 59 gnus-active-hashtb
@@ -64,60 +62,94 @@ When t this still needs to be initialized.")
64 ("Followup-To:" . (mail-sentto-newsgroups)) 62 ("Followup-To:" . (mail-sentto-newsgroups))
65 ;;("Distribution:" ???) 63 ;;("Distribution:" ???)
66 ) 64 )
67 "Alist of header field and expression to return alist for completion. 65 "*Alist of header field and expression to return alist for completion.
68Expression may reference variable `pattern' which is the string being completed. 66The expression may reference the variable `pattern'
69If not on matching header, `mail-complete-function' gets called instead.") 67which will hold the string being completed.
68If not on matching header, `mail-complete-function' gets called instead."
69 :type 'sexp
70 :group 'mailalias)
71(put 'mail-complete-alist 'risky-local-variable t)
70 72
71;;;###autoload 73;;;###autoload
72(defvar mail-complete-style 'angles 74(defcustom mail-complete-style 'angles
73 "*Specifies how \\[mail-complete] formats the full name when it completes. 75 "*Specifies how \\[mail-complete] formats the full name when it completes.
74If `nil', they contain just the return address like: 76If `nil', they contain just the return address like:
75 king@grassland.com 77 king@grassland.com
76If `parens', they look like: 78If `parens', they look like:
77 king@grassland.com (Elvis Parsley) 79 king@grassland.com (Elvis Parsley)
78If `angles', they look like: 80If `angles', they look like:
79 Elvis Parsley <king@grassland.com>") 81 Elvis Parsley <king@grassland.com>"
80 82 :type '(choice (const angles) (const parens) (const nil))
81(defvar mail-complete-function 'ispell-complete-word 83 :group 'mailalias)
82 "Function to call when completing outside `mail-complete-alist'-header.")
83
84 84
85(defvar mail-directory-function nil 85(defcustom mail-complete-function 'ispell-complete-word
86 "Function to get completions from directory service or `nil' for none. 86 "*Function to call when completing outside `mail-complete-alist'-header."
87See `mail-directory-requery'.") 87 :type '(choice function (const nil))
88 :group 'mailalias)
88 89
90(defcustom mail-directory-function nil
91 "*Function to get completions from directory service or `nil' for none.
92See `mail-directory-requery'."
93 :type '(choice function (const nil))
94 :group 'mailalias)
89 95
90;; This is for when the directory is huge, or changes frequently. 96;; This is for when the directory is huge, or changes frequently.
91(defvar mail-directory-requery nil 97(defcustom mail-directory-requery nil
92 "When non-`nil' call `mail-directory-function' for each completion. 98 "*When non-`nil' call `mail-directory-function' for each completion.
93In that case, one argument gets passed to the function, the partial string 99In that case, one argument gets passed to the function, the partial string
94entered so far.") 100entered so far."
101 :type 'boolean
102 :group 'mailalias)
95 103
104(defcustom mail-directory-process nil
105 "*Shell command to get the list of names from a mail directory.
106This value is used when the value of `mail-directory-function'
107is `mail-directory-process'. The value should be a list
108of the form (COMMAND ARG ...), where each of the list elements
109is evaluated. When `mail-directory-requery' is non-nil, during
110evaluation of these elements, the variable `pattern' contains
111the partial input being completed.
96 112
97(defvar mail-directory-process nil 113The value might look like this:
98 "Unix command when `mail-directory-function' is `mail-directory-process'.
99This is a list of the form (COMMAND ARG ...), where each of the list elements
100is evaluated. When `mail-directory-requery' is non-`nil', during
101evaluation the variable `pattern' contains the partial input being completed.
102This might look like
103 114
104 '(remote-shell-program \"HOST\" \"-nl\" \"USER\" \"COMMAND\") 115 '(remote-shell-program \"HOST\" \"-nl\" \"USER\" \"COMMAND\")
105 116
106or 117or like this:
107 118
108 '(remote-shell-program \"HOST\" \"-n\" \"COMMAND '^\" pattern \"'\")") 119 '(remote-shell-program \"HOST\" \"-n\" \"COMMAND '^\" pattern \"'\")"
120 :type 'sexp
121 :group 'mailalias)
122(put 'mail-directory-process 'risky-local-variable t)
109 123
110(defvar mail-directory-stream () 124(defcustom mail-directory-stream nil
111 "List of (HOST SERVICE) for stream connection to mail directory.") 125 "*List of (HOST SERVICE) for stream connection to mail directory."
126 :type 'sexp
127 :group 'mailalias)
128(put 'mail-directory-stream 'risky-local-variable t)
112 129
113(defvar mail-directory-parser nil 130(defcustom mail-directory-parser nil
114 "How to interpret the output of `mail-directory-function'. 131 "*How to interpret the output of `mail-directory-function'.
115Three types of values are possible: 132Three types of values are possible:
116 133
117 - nil means to gather each line as one name 134 - nil means to gather each line as one name
118 - regexp means first \\(grouping\\) in successive matches is name 135 - regexp means first \\(grouping\\) in successive matches is name
119 - function called at beginning of buffer that returns an alist of names") 136 - function called at beginning of buffer that returns an alist of names"
137 :type '(choice (cosnt nil) regexp function)
138 :group 'mailalias)
139(put 'mail-directory-parser 'risky-local-variable t)
120 140
141;; Internal variables.
142
143(defvar mail-names t
144 "Alist of local users, aliases and directory entries as available.
145Elements have the form (MAILNAME) or (MAILNAME . FULLNAME).
146If the value means t, it means the real value should be calculated
147for the next use. this is used in `mail-complete'.")
148
149(defvar mail-local-names t
150 "Alist of local users.
151When t this still needs to be initialized.")
152
121 153
122;; Called from sendmail-send-it, or similar functions, 154;; Called from sendmail-send-it, or similar functions,
123;; only if some mail aliases are defined. 155;; only if some mail aliases are defined.
@@ -451,7 +483,7 @@ Calls `mail-directory-function' and applies `mail-directory-parser' to output."
451 483
452 484
453(defun mail-directory-process (pattern) 485(defun mail-directory-process (pattern)
454 "Call a Unix process to output names in directory. 486 "Run a shell command to output names in directory.
455See `mail-directory-process'." 487See `mail-directory-process'."
456 (apply 'call-process (eval (car mail-directory-process)) nil t nil 488 (apply 'call-process (eval (car mail-directory-process)) nil t nil
457 (mapcar 'eval (cdr mail-directory-process)))) 489 (mapcar 'eval (cdr mail-directory-process))))