X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/e8757f091a502b858912a4c267210e009227d6e6..0fac75fed1c7d61858bef15e951bf9a0835d5bac:/lisp/mail/mailalias.el diff --git a/lisp/mail/mailalias.el b/lisp/mail/mailalias.el index c7943fe40c..59670a7dcb 100644 --- a/lisp/mail/mailalias.el +++ b/lisp/mail/mailalias.el @@ -1,9 +1,9 @@ ;;; mailalias.el --- expand and complete mailing address aliases -*- lexical-binding: t -*- -;; Copyright (C) 1985, 1987, 1995-1997, 2001-2012 -;; Free Software Foundation, Inc. +;; Copyright (C) 1985, 1987, 1995-1997, 2001-2016 Free Software +;; Foundation, Inc. -;; Maintainer: FSF +;; Maintainer: emacs-devel@gnu.org ;; Keywords: mail ;; This file is part of GNU Emacs. @@ -77,7 +77,7 @@ If not on matching header, `mail-complete-function' gets called instead." ;;;###autoload (defcustom mail-complete-style 'angles "Specifies how \\[mail-complete] formats the full name when it completes. -If `nil', they contain just the return address like: +If nil, they contain just the return address like: king@grassland.com If `parens', they look like: king@grassland.com (Elvis Parsley) @@ -119,18 +119,23 @@ completed. `pattern' is nil when `mail-directory-requery' is nil. The value might look like this: - '(remote-shell-program \"HOST\" \"-nl\" \"USER\" \"COMMAND\") + (remote-shell-program \"HOST\" \"-nl\" \"USER\" \"COMMAND\") or like this: - '(remote-shell-program \"HOST\" \"-n\" \"COMMAND '^\" pattern \"'\")" + (remote-shell-program \"HOST\" \"-n\" \"COMMAND \\='^\" pattern \"\\='\")" :type 'sexp :group 'mailalias) (put 'mail-directory-process 'risky-local-variable t) (defcustom mail-directory-stream nil "List of (HOST SERVICE) for stream connection to mail directory." - :type 'sexp + :type '(choice (const nil) + (list (string :tag "Host name or ip address") + (choice (integer :tag "Service port number") + (string :tag "Service name")) + (plist :inline t + :tag "Additional open-network-stream parameters"))) :group 'mailalias) (put 'mail-directory-stream 'risky-local-variable t) @@ -209,7 +214,9 @@ removed from alias expansions." (if (re-search-forward "[ \t]*[\n,][ \t]*" end1 t) (setq epos (match-beginning 0) seplen (- (point) epos)) - (setq epos (marker-position end1) seplen 0)) + ;; Handle the last name in this header field. + ;; We already moved END1 back across whitespace after it. + (setq epos (marker-position end1) seplen 0)) (let ((string (buffer-substring-no-properties pos epos)) translation) (if (and (not (assoc string disabled-aliases)) @@ -510,7 +517,7 @@ PREFIX is the string we want to complete." mail-aliases)) (if (consp mail-local-names) mail-local-names) - (or directory + (or directory (when (consp mail-directory-names) mail-directory-names))) (lambda (a b)