comparison lisp/mail/mh-utils.el @ 14426:9f18c1b097ce

(mh-handle-process-error): Fix error format string.
author Karl Heuer <kwzh@gnu.org>
date Mon, 29 Jan 1996 23:17:16 +0000
parents 83f275dcd93a
children 84b8ad02c07c
comparison
equal deleted inserted replaced
14425:8109feeaf627 14426:9f18c1b097ce
24 24
25 ;; Internal support for mh-e package. 25 ;; Internal support for mh-e package.
26 26
27 ;;; Change Log: 27 ;;; Change Log:
28 28
29 ;; $Id: mh-utils.el,v 1.7 1996/01/09 23:19:28 kwzh Exp erik $ 29 ;; $Id: mh-utils.el,v 1.8 1996/01/14 07:34:30 erik Exp kwzh $
30 30
31 ;;; Code: 31 ;;; Code:
32 32
33 ;;; Set for local environment: 33 ;;; Set for local environment:
34 ;;; mh-progs and mh-lib used to be set in paths.el, which tried to 34 ;;; mh-progs and mh-lib used to be set in paths.el, which tried to
891 ;; Program output is in current buffer. 891 ;; Program output is in current buffer.
892 ;; If output is too long to include in error message, display the buffer. 892 ;; If output is too long to include in error message, display the buffer.
893 (cond ((eql status 0) ;success 893 (cond ((eql status 0) ;success
894 status) 894 status)
895 ((stringp status) ;kill string 895 ((stringp status) ;kill string
896 (error (format "%s: %s" command status))) 896 (error "%s: %s" command status))
897 (t ;exit code 897 (t ;exit code
898 (cond 898 (cond
899 ((= (buffer-size) 0) ;program produced no error message 899 ((= (buffer-size) 0) ;program produced no error message
900 (error (format "%s: exit code %d" command status))) 900 (error "%s: exit code %d" command status))
901 (t 901 (t
902 ;; will error message fit on one line? 902 ;; will error message fit on one line?
903 (goto-line 2) 903 (goto-line 2)
904 (if (and (< (buffer-size) (screen-width)) 904 (if (and (< (buffer-size) (screen-width))
905 (eobp)) 905 (eobp))
906 (error (buffer-substring 1 (progn (goto-char 1) 906 (error "%s"
907 (buffer-substring 1 (progn (goto-char 1)
907 (end-of-line) 908 (end-of-line)
908 (point)))) 909 (point))))
909 (display-buffer (current-buffer)) 910 (display-buffer (current-buffer))
910 (error (format 911 (error "%s failed with status %d. See error message in other window."
911 "%s failed with status %d. See error message in other window." 912 command status)))))))
912 command status))))))))
913 913
914 914
915 (defun mh-expand-file-name (filename &optional default) 915 (defun mh-expand-file-name (filename &optional default)
916 ;; Just like `expand-file-name', but also handles MH folder names. 916 ;; Just like `expand-file-name', but also handles MH folder names.
917 ;; Assumes that any filename that starts with '+' is a folder name. 917 ;; Assumes that any filename that starts with '+' is a folder name.