Function: mh-exec-cmd-output

mh-exec-cmd-output is a byte-compiled function defined in mh-e.el.gz.

Signature

(mh-exec-cmd-output COMMAND DISPLAY &rest ARGS)

Documentation

Execute MH command COMMAND with DISPLAY flag and ARGS.

Put the output into buffer after point. Set mark after inserted text. Output is expected to be shown to user, not parsed by MH-E.

Source Code

;; Defined in /usr/src/emacs/lisp/mh-e/mh-e.el.gz
(defun mh-exec-cmd-output (command display &rest args)
  "Execute MH command COMMAND with DISPLAY flag and ARGS.
Put the output into buffer after point.
Set mark after inserted text.
Output is expected to be shown to user, not parsed by MH-E."
  (push-mark (point) t)
  (apply #'call-process
         (expand-file-name command mh-progs) nil t display
         (mh-list-to-string args))

  ;; The following is used instead of 'exchange-point-and-mark because the
  ;; latter activates the current region (between point and mark), which
  ;; turns on highlighting.  So prior to this bug fix, doing "inc" would
  ;; highlight a region containing the new messages, which is undesirable.
  ;; The bug wasn't seen in emacs21 but still occurred in XEmacs21.4.
  (mh-exchange-point-and-mark-preserving-active-mark))