Function: eudc-capf-message-expand-name

eudc-capf-message-expand-name is an autoloaded and byte-compiled function defined in eudc-capf.el.gz.

Signature

(eudc-capf-message-expand-name)

Documentation

Email address completion function for message-completion-alist.

When this function is added to message-completion-alist, replacing any existing entry for message-expand-name there, with an appropriate regular expression such as for example message-email-recipient-header-regexp, then EUDC will be queried for email addresses, and the results delivered to completion-at-point.

Source Code

;; Defined in /usr/src/emacs/lisp/net/eudc-capf.el.gz
;;;###autoload
(defun eudc-capf-message-expand-name ()
  "Email address completion function for `message-completion-alist'.

When this function is added to `message-completion-alist',
replacing any existing entry for `message-expand-name' there,
with an appropriate regular expression such as for example
`message-email-recipient-header-regexp', then EUDC will be
queried for email addresses, and the results delivered to
`completion-at-point'."
  (if (or eudc-server eudc-server-hotlist)
      (progn
        (let* ((beg (save-excursion
                      (re-search-backward "\\([:,]\\|^\\)[ \t]*")
                      (match-end 0)))
               (end (point))
               (prefix (save-excursion (buffer-substring-no-properties beg end))))
          (let ((result
                 (eudc-query-with-words (split-string prefix "[ \t]+") t)))
            (when result
              (list beg end
                    (completion-table-with-cache
                     (lambda (_) result) t))))))))