summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard M. Stallman <rms@gnu.org>1996-03-09 08:03:15 +0000
committerRichard M. Stallman <rms@gnu.org>1996-03-09 08:03:15 +0000
commit725c07f82864d0ecf5352f518cd6b5dfde90abb2 (patch)
treec4029c47ec5bef2870c7e557c6c1b3422d7dd061
parent07d58d289423a4b024504a85b25695f627b04eb9 (diff)
downloademacs-725c07f82864d0ecf5352f518cd6b5dfde90abb2.tar.gz
(mail-get-names): Understand "+username" format for /etc/passwd lines.
-rw-r--r--lisp/mail/mailalias.el12
1 files changed, 8 insertions, 4 deletions
diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el
index e9890c9e721..ba884e75ab0 100644
--- a/lisp/mail/mailalias.el
+++ b/lisp/mail/mailalias.el
@@ -334,10 +334,14 @@ Consults `/etc/passwd' and a directory service if one is set up via
(insert-file-contents "/etc/passwd" nil nil nil t)
(setq mail-local-names)
(while (not (eobp))
- (setq mail-local-names
- `((,(buffer-substring (point)
- (1- (search-forward ":"))))
- ,@mail-local-names))
+ ;;Recognize lines like
+ ;; nobody:*:65534:65534::/:
+ ;; +demo::::::/bin/csh
+ ;; +ethanb
+ ;;while skipping
+ ;; +@SOFTWARE
+ (if (looking-at "\\+?\\([^:@\n+]+\\)")
+ (add-to-list 'mail-local-names (list (match-string 1))))
(beginning-of-line 2))
(kill-buffer (current-buffer))))
(if (or (eq mail-names t)