From: Richard M. Stallman Date: Sat, 9 Mar 1996 08:03:15 +0000 (+0000) Subject: (mail-get-names): Understand "+username" format for /etc/passwd lines. X-Git-Tag: emacs-19.34~1061 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=8bc49f8f86f125698f060c24ff697d6a4a350c6c;p=emacs.git (mail-get-names): Understand "+username" format for /etc/passwd lines. --- 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)