]> git.eshelyaron.com Git - emacs.git/commitdiff
(mail-get-names): Understand "+username" format for /etc/passwd lines.
authorRichard M. Stallman <rms@gnu.org>
Sat, 9 Mar 1996 08:03:15 +0000 (08:03 +0000)
committerRichard M. Stallman <rms@gnu.org>
Sat, 9 Mar 1996 08:03:15 +0000 (08:03 +0000)
lisp/mail/mailalias.el

index e9890c9e7217edd601843fbbd6d8437ba4739128..ba884e75ab09db43fe7d789d3479bd7db079ba6e 100644 (file)
@@ -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)