summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVinicius Jose Latorre <viniciusjl@ig.com.br>2004-11-15 19:31:54 +0000
committerVinicius Jose Latorre <viniciusjl@ig.com.br>2004-11-15 19:31:54 +0000
commit14b84c94f8daa3c1ef08e972d18e4d035b05fe4a (patch)
tree12983d001d90b28463be39aaab4df45de2d4dadf
parent109b593f2970bb5b0bee0e045b609a2ca54ba8ec (diff)
downloademacs-14b84c94f8daa3c1ef08e972d18e4d035b05fe4a.tar.gz
emacs-14b84c94f8daa3c1ef08e972d18e4d035b05fe4a.tar.bz2
emacs-14b84c94f8daa3c1ef08e972d18e4d035b05fe4a.zip
Fix typos & pr-switches-string
-rw-r--r--lisp/ChangeLog9
-rw-r--r--lisp/printing.el48
2 files changed, 39 insertions, 18 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 88fe3485580..66016d5a3b2 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,12 @@
+2004-11-15 Vinicius Jose Latorre <viniciusjl@ig.com.br>
+
+ * printing.el (pr-ps-file-print, pr-toggle-duplex): Fix typos.
+ Reported by Glenn Morris <gmorris+emacs@ast.cam.ac.uk>.
+ (pr-switches-string): If SWITCHES is nil, return nil. Otherwise,
+ return the list of string in a string.
+ (pr-call-process): Message if calling process returns an error, that
+ is, the exit status is different of zero.
+
2004-11-15 Jay Belanger <belanger@truman.edu>
* calc/calcalg2.el (math-integrate-by-parts): Removed unused
diff --git a/lisp/printing.el b/lisp/printing.el
index 07b641139c4..f988120d037 100644
--- a/lisp/printing.el
+++ b/lisp/printing.el
@@ -5,7 +5,7 @@
;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
-;; Time-stamp: <2004/11/14 14:38:36 vinicius>
+;; Time-stamp: <2004/11/15 17:23:32 vinicius>
;; Keywords: wp, print, PostScript
;; Version: 6.8.3
;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/
@@ -3882,7 +3882,7 @@ image in a file with that name."
;; use `pr-ps-command' to print
(apply 'pr-call-process
pr-ps-command
- (pr-switches-string pr-ps-switches "pr-gs-switches")
+ (pr-switches-string pr-ps-switches "pr-ps-switches")
(if (string-match "cp" pr-ps-command)
;; for "cp" (cmd in out)
(list file
@@ -4000,7 +4000,7 @@ bottom."
(interactive)
(pr-save-interactive
(pr-toggle 'ps-spool-duplex "Printing duplex"
- 'postcsript-options 5 12 'toggle)))
+ 'postscript-options 5 12 'toggle)))
;;;###autoload
@@ -5325,24 +5325,33 @@ non-nil."
(defun pr-call-process (command &rest args)
- (pr-save-file-modes
- (let ((buffer (get-buffer-create "*Printing Command Output*"))
- (cmd (pr-command command))
- status)
- (setq args (pr-remove-nil-from-list args))
- (save-excursion
- (set-buffer buffer)
- (goto-char (point-max))
- (insert (format "%s %S\n" cmd args)))
+ (let ((buffer (get-buffer-create "*Printing Command Output*"))
+ (cmd (pr-command command))
+ status)
+ (setq args (pr-remove-nil-from-list args))
+ ;; *Printing Command Output* == show command & args
+ (save-excursion
+ (set-buffer buffer)
+ (goto-char (point-max))
+ (insert (format "%s %S\n" cmd args)))
+ ;; *Printing Command Output* == show any return message from command
+ (pr-save-file-modes
(setq status
(condition-case data
(apply 'call-process cmd nil buffer nil args)
((quit error)
- (error-message-string data))))
- (save-excursion
- (set-buffer buffer)
- (goto-char (point-max))
- (insert (format "Exit status: %s\n" status))))))
+ (error-message-string data)))))
+ ;; *Printing Command Output* == show exit status
+ (save-excursion
+ (set-buffer buffer)
+ (goto-char (point-max))
+ (insert (format "Exit status: %s\n\n" status)))
+ ;; message if error status
+ (if (or (stringp status)
+ (and (integerp status) (/= status 0)))
+ (message
+ "Printing error status: %s (see *Printing Command Output* buffer)"
+ status))))
(defun pr-txt-print (from to)
@@ -5353,7 +5362,10 @@ non-nil."
(defun pr-switches-string (switches mess)
- (mapconcat 'identity (pr-switches switches mess) " "))
+ ;; If SWITCHES is nil, return nil.
+ ;; Otherwise, return the list of string in a string.
+ (and switches
+ (mapconcat 'identity (pr-switches switches mess) " ")))
(defun pr-switches (switches mess)