Function: mh-alias-ali

mh-alias-ali is a byte-compiled function defined in mh-alias.el.gz.

Signature

(mh-alias-ali ALIAS &optional USER)

Documentation

Return ali expansion for ALIAS.

ALIAS must be a string for a single alias. If USER is t, then assume ALIAS is an address and call ali -user. ali returns the string unchanged if not defined. The same is done here.

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-alias.el.gz
;;; Alias Expansion

(defun mh-alias-ali (alias &optional user)
  "Return ali expansion for ALIAS.
ALIAS must be a string for a single alias.
If USER is t, then assume ALIAS is an address and call ali -user.
ali returns the string unchanged if not defined.  The same is
done here."
  (condition-case err
      (save-excursion
        (let ((user-arg (if user "-user" "-nouser")))
          (mh-exec-cmd-quiet t "ali" user-arg "-nolist" alias))
        (goto-char (point-max))
        (if (looking-at "^$") (delete-char -1))
        (buffer-substring (point-min)(point-max)))
    (error (progn
             (message "%s" (error-message-string err))
             alias))))