;;; ps-print.el --- print text from the buffer as PostScript
;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
-;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+;; 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
;; Free Software Foundation, Inc.
;; Author: Jim Thompson (was <thompson@wg2.waii.com>)
;; Maintainer: Kenichi Handa <handa@m17n.org> (multi-byte characters)
;; Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Keywords: wp, print, PostScript
-;; Version: 7.3.4
+;; Version: 7.3.5
;; X-URL: http://www.emacswiki.org/cgi-bin/wiki/ViniciusJoseLatorre
-(defconst ps-print-version "7.3.4"
- "ps-print.el, v 7.3.4 <2009/01/24 vinicius>
+(defconst ps-print-version "7.3.5"
+ "ps-print.el, v 7.3.5 <2009/12/23 vinicius>
Vinicius's last change version -- this file may have been edited as part of
Emacs without changes to the version number. When reporting bugs, please also
;;; Interface to the command system
(defgroup postscript nil
- "PostScript Group."
+ "Support for printing and PostScript."
:tag "PostScript"
:version "20"
:group 'emacs)
;;;###autoload
(defcustom ps-page-dimensions-database
+ (purecopy
(list (list 'a4 (/ (* 72 21.0) 2.54) (/ (* 72 29.7) 2.54) "A4")
(list 'a3 (/ (* 72 29.7) 2.54) (/ (* 72 42.0) 2.54) "A3")
(list 'letter (* 72 8.5) (* 72 11.0) "Letter")
'(topcoatedpaper 396.0 136.0 "TopcoatedPaper150")
'(vhsface 205.0 127.0 "VHSFace")
'(vhsspine 400.0 50.0 "VHSSpine")
- '(zipdisk 156.0 136.0 "ZipDisk"))
+ '(zipdisk 156.0 136.0 "ZipDisk")))
"List associating a symbolic paper type to its width, height and doc media.
See `ps-paper-type'."
:type '(repeat (list :tag "Paper Type"
(ps-output 'prologue (if (stringp args) (list args) args)))
(defun ps-flush-output ()
- (save-excursion
- (set-buffer ps-spool-buffer)
+ (with-current-buffer ps-spool-buffer
(goto-char (point-max))
(while ps-output-head
(let ((it (car ps-output-head)))
(defun ps-insert-file (fname)
(ps-flush-output)
- (save-excursion
- (set-buffer ps-spool-buffer)
+ (with-current-buffer ps-spool-buffer
(goto-char (point-max))
(insert-file-contents fname)))
(defun ps-get-boundingbox ()
- (save-excursion
- (set-buffer ps-spool-buffer)
+ (with-current-buffer ps-spool-buffer
(save-excursion
(if (re-search-forward ps-boundingbox-re nil t)
(vector (string-to-number ; lower x
;; coordinate adjustment to center image
;; around x and y position
(let ((box (ps-get-boundingbox)))
- (save-excursion
- (set-buffer ps-spool-buffer)
+ (with-current-buffer ps-spool-buffer
(save-excursion
(if (re-search-backward "^--back--" nil t)
(replace-match
ps-line-number-step
ps-zebra-stripe-height))))
;; spooling buffer
- (save-excursion
- (set-buffer ps-spool-buffer)
+ (with-current-buffer ps-spool-buffer
(goto-char (point-max))
(and (re-search-backward "^%%Trailer$" nil t)
(delete-region (match-beginning 0) (point-max))))
return the attribute vector.
If FACE is not a valid face name, use default face."
+ (and (stringp face) (facep face) (setq face (intern face)))
(cond
(ps-black-white-faces-alist
(or (and (symbolp face)
(and ps-razzle-dazzle (message "Wrote %s" filename)))
;; Else, spool to the printer
(and ps-razzle-dazzle (message "Printing..."))
- (save-excursion
- (set-buffer ps-spool-buffer)
+ (with-current-buffer ps-spool-buffer
(let* ((coding-system-for-write 'raw-text-unix)
(ps-printer-name (or ps-printer-name
(and (boundp 'printer-name)
;; But autoload them here to make the separation invisible.
\f
;;;### (autoloads (ps-mule-end-job ps-mule-begin-job ps-mule-initialize
-;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" "fba1322a48e0d8f2109629ea0c4dd734")
+;;;;;; ps-multibyte-buffer) "ps-mule" "ps-mule.el" "9187df3473401876e0df4937c311fbaf")
;;; Generated autoloads from ps-mule.el
(defvar ps-multibyte-buffer nil "\