aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVinicius Jose Latorre2004-11-15 19:31:54 +0000
committerVinicius Jose Latorre2004-11-15 19:31:54 +0000
commit14b84c94f8daa3c1ef08e972d18e4d035b05fe4a (patch)
tree12983d001d90b28463be39aaab4df45de2d4dadf
parent109b593f2970bb5b0bee0e045b609a2ca54ba8ec (diff)
downloademacs-14b84c94f8daa3c1ef08e972d18e4d035b05fe4a.tar.gz
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 @@
12004-11-15 Vinicius Jose Latorre <viniciusjl@ig.com.br>
2
3 * printing.el (pr-ps-file-print, pr-toggle-duplex): Fix typos.
4 Reported by Glenn Morris <gmorris+emacs@ast.cam.ac.uk>.
5 (pr-switches-string): If SWITCHES is nil, return nil. Otherwise,
6 return the list of string in a string.
7 (pr-call-process): Message if calling process returns an error, that
8 is, the exit status is different of zero.
9
12004-11-15 Jay Belanger <belanger@truman.edu> 102004-11-15 Jay Belanger <belanger@truman.edu>
2 11
3 * calc/calcalg2.el (math-integrate-by-parts): Removed unused 12 * 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 @@
5 5
6;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br> 6;; Author: Vinicius Jose Latorre <viniciusjl@ig.com.br>
7;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br> 7;; Maintainer: Vinicius Jose Latorre <viniciusjl@ig.com.br>
8;; Time-stamp: <2004/11/14 14:38:36 vinicius> 8;; Time-stamp: <2004/11/15 17:23:32 vinicius>
9;; Keywords: wp, print, PostScript 9;; Keywords: wp, print, PostScript
10;; Version: 6.8.3 10;; Version: 6.8.3
11;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/ 11;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/
@@ -3882,7 +3882,7 @@ image in a file with that name."
3882 ;; use `pr-ps-command' to print 3882 ;; use `pr-ps-command' to print
3883 (apply 'pr-call-process 3883 (apply 'pr-call-process
3884 pr-ps-command 3884 pr-ps-command
3885 (pr-switches-string pr-ps-switches "pr-gs-switches") 3885 (pr-switches-string pr-ps-switches "pr-ps-switches")
3886 (if (string-match "cp" pr-ps-command) 3886 (if (string-match "cp" pr-ps-command)
3887 ;; for "cp" (cmd in out) 3887 ;; for "cp" (cmd in out)
3888 (list file 3888 (list file
@@ -4000,7 +4000,7 @@ bottom."
4000 (interactive) 4000 (interactive)
4001 (pr-save-interactive 4001 (pr-save-interactive
4002 (pr-toggle 'ps-spool-duplex "Printing duplex" 4002 (pr-toggle 'ps-spool-duplex "Printing duplex"
4003 'postcsript-options 5 12 'toggle))) 4003 'postscript-options 5 12 'toggle)))
4004 4004
4005 4005
4006;;;###autoload 4006;;;###autoload
@@ -5325,24 +5325,33 @@ non-nil."
5325 5325
5326 5326
5327(defun pr-call-process (command &rest args) 5327(defun pr-call-process (command &rest args)
5328 (pr-save-file-modes 5328 (let ((buffer (get-buffer-create "*Printing Command Output*"))
5329 (let ((buffer (get-buffer-create "*Printing Command Output*")) 5329 (cmd (pr-command command))
5330 (cmd (pr-command command)) 5330 status)
5331 status) 5331 (setq args (pr-remove-nil-from-list args))
5332 (setq args (pr-remove-nil-from-list args)) 5332 ;; *Printing Command Output* == show command & args
5333 (save-excursion 5333 (save-excursion
5334 (set-buffer buffer) 5334 (set-buffer buffer)
5335 (goto-char (point-max)) 5335 (goto-char (point-max))
5336 (insert (format "%s %S\n" cmd args))) 5336 (insert (format "%s %S\n" cmd args)))
5337 ;; *Printing Command Output* == show any return message from command
5338 (pr-save-file-modes
5337 (setq status 5339 (setq status
5338 (condition-case data 5340 (condition-case data
5339 (apply 'call-process cmd nil buffer nil args) 5341 (apply 'call-process cmd nil buffer nil args)
5340 ((quit error) 5342 ((quit error)
5341 (error-message-string data)))) 5343 (error-message-string data)))))
5342 (save-excursion 5344 ;; *Printing Command Output* == show exit status
5343 (set-buffer buffer) 5345 (save-excursion
5344 (goto-char (point-max)) 5346 (set-buffer buffer)
5345 (insert (format "Exit status: %s\n" status)))))) 5347 (goto-char (point-max))
5348 (insert (format "Exit status: %s\n\n" status)))
5349 ;; message if error status
5350 (if (or (stringp status)
5351 (and (integerp status) (/= status 0)))
5352 (message
5353 "Printing error status: %s (see *Printing Command Output* buffer)"
5354 status))))
5346 5355
5347 5356
5348(defun pr-txt-print (from to) 5357(defun pr-txt-print (from to)
@@ -5353,7 +5362,10 @@ non-nil."
5353 5362
5354 5363
5355(defun pr-switches-string (switches mess) 5364(defun pr-switches-string (switches mess)
5356 (mapconcat 'identity (pr-switches switches mess) " ")) 5365 ;; If SWITCHES is nil, return nil.
5366 ;; Otherwise, return the list of string in a string.
5367 (and switches
5368 (mapconcat 'identity (pr-switches switches mess) " ")))
5357 5369
5358 5370
5359(defun pr-switches (switches mess) 5371(defun pr-switches (switches mess)