aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2005-03-26 02:13:35 +0000
committerRichard M. Stallman2005-03-26 02:13:35 +0000
commitf62504368a56b3170b623e2331a4cecd17dfe8c5 (patch)
treefd2960cbf03f3313716d67389d01885767b6632b
parentc7c63bf77e070cf9d271ff1141eb47604da7b713 (diff)
downloademacs-f62504368a56b3170b623e2331a4cecd17dfe8c5.tar.gz
emacs-f62504368a56b3170b623e2331a4cecd17dfe8c5.zip
(mail-directory-process): Do nothing if mail-directory-process is an atom.
(mail-get-names): Ignore mail-directory-names if it is an atom. (mail-directory-process defvar): Doc fix. (mail-names): Doc fix.
-rw-r--r--lisp/mail/mailalias.el24
1 files changed, 15 insertions, 9 deletions
diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el
index 18f52e6434f..b520841db3d 100644
--- a/lisp/mail/mailalias.el
+++ b/lisp/mail/mailalias.el
@@ -111,9 +111,10 @@ entered so far."
111This value is used when the value of `mail-directory-function' 111This value is used when the value of `mail-directory-function'
112is `mail-directory-process'. The value should be a list 112is `mail-directory-process'. The value should be a list
113of the form (COMMAND ARG ...), where each of the list elements 113of the form (COMMAND ARG ...), where each of the list elements
114is evaluated. When `mail-directory-requery' is non-nil, during 114is evaluated. COMMAND should evaluate to a string. When
115evaluation of these elements, the variable `pattern' contains 115`mail-directory-requery' is non-nil, during evaluation of these
116the partial input being completed. 116elements, the variable `pattern' contains the partial input being
117completed. `pattern' is nil when `mail-directory-requery' is nil.
117 118
118The value might look like this: 119The value might look like this:
119 120
@@ -149,7 +150,7 @@ Three types of values are possible:
149 "Alist of local users, aliases and directory entries as available. 150 "Alist of local users, aliases and directory entries as available.
150Elements have the form (MAILNAME) or (MAILNAME . FULLNAME). 151Elements have the form (MAILNAME) or (MAILNAME . FULLNAME).
151If the value means t, it means the real value should be calculated 152If the value means t, it means the real value should be calculated
152for the next use. this is used in `mail-complete'.") 153for the next use. This is used in `mail-complete'.")
153 154
154(defvar mail-local-names t 155(defvar mail-local-names t
155 "Alist of local users. 156 "Alist of local users.
@@ -469,7 +470,9 @@ PATTERN is the string we want to complete."
469 mail-aliases)) 470 mail-aliases))
470 (if (consp mail-local-names) 471 (if (consp mail-local-names)
471 mail-local-names) 472 mail-local-names)
472 (or directory mail-directory-names)) 473 (or directory
474 (when (consp mail-directory-names)
475 mail-directory-names)))
473 (lambda (a b) 476 (lambda (a b)
474 ;; should cache downcased strings 477 ;; should cache downcased strings
475 (string< (downcase (car a)) 478 (string< (downcase (car a))
@@ -478,8 +481,10 @@ PATTERN is the string we want to complete."
478 481
479 482
480(defun mail-directory (pattern) 483(defun mail-directory (pattern)
481 "Call directory to get names matching PATTERN or all if nil. 484 "Use mail-directory facility to get user names matching PATTERN.
482Calls `mail-directory-function' and applies `mail-directory-parser' to output." 485If PATTERN is nil, get all the defined user names.
486This function calls `mail-directory-function' to query the directory,
487then uses `mail-directory-parser' to parse the output it returns."
483 (save-excursion 488 (save-excursion
484 (message "Querying directory...") 489 (message "Querying directory...")
485 (set-buffer (generate-new-buffer " *mail-directory*")) 490 (set-buffer (generate-new-buffer " *mail-directory*"))
@@ -509,8 +514,9 @@ Calls `mail-directory-function' and applies `mail-directory-parser' to output."
509(defun mail-directory-process (pattern) 514(defun mail-directory-process (pattern)
510 "Run a shell command to output names in directory. 515 "Run a shell command to output names in directory.
511See `mail-directory-process'." 516See `mail-directory-process'."
512 (apply 'call-process (eval (car mail-directory-process)) nil t nil 517 (when (consp mail-directory-process)
513 (mapcar 'eval (cdr mail-directory-process)))) 518 (apply 'call-process (eval (car mail-directory-process)) nil t nil
519 (mapcar 'eval (cdr mail-directory-process)))))
514 520
515;; This should handle a dialog. Currently expects port to spit out names. 521;; This should handle a dialog. Currently expects port to spit out names.
516(defun mail-directory-stream (pattern) 522(defun mail-directory-stream (pattern)