;; Maintainer: Kenichi Handa <handa@etl.go.jp> (multi-byte characters)
;; Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Keywords: wp, print, PostScript
-;; Time-stamp: <2004/02/29 00:07:55 vinicius>
-;; Version: 6.6.3
+;; Time-stamp: <2004/03/10 18:57:00 vinicius>
+;; Version: 6.6.4
;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/
-(defconst ps-print-version "6.6.3"
- "ps-print.el, v 6.6.3 <2004/02/29 vinicius>
+(defconst ps-print-version "6.6.4"
+ "ps-print.el, v 6.6.4 <2004/03/10 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
#'ps-print-quote
(list
(concat "\n;;; ps-print version " ps-print-version "\n")
+ ";; internal vars"
+ (ps-comment-string "ps-print-emacs-type" ps-print-emacs-type)
+ (ps-comment-string "ps-windows-system " ps-windows-system)
+ (ps-comment-string "ps-lp-system " ps-lp-system)
+ nil
'(25 . ps-print-color-p)
'(25 . ps-lpr-command)
'(25 . ps-lpr-switches)
(if (> col len)
(make-string (- col len) ?\ )
" ")
- (cond ((null val) "nil")
- ((eq val t) "t")
- ((or (symbolp val) (listp val)) (format "'%S" val))
- (t (format "%S" val))))))
+ (ps-value-string val))))
(t "")
))
+(defun ps-value-string (val)
+ "Return a string representation of VAL. Used by `ps-print-quote'."
+ (cond ((null val)
+ "nil")
+ ((eq val t)
+ "t")
+ ((or (symbolp val) (listp val))
+ (format "'%S" val))
+ (t
+ (format "%S" val))))
+
+
+(defun ps-comment-string (str value)
+ "Return a comment string like \";; STR = VALUE\"."
+ (format ";; %s = %s" str (ps-value-string value)))
+
+
(defun ps-value (alist-sym key)
"Return value from association list ALIST-SYM which car is `eq' to KEY."
(cdr (assq key (symbol-value alist-sym))))
;; Internal functions and variables
+(defun ps-message-log-max ()
+ (and (not (string= (buffer-name) "*Messages*"))
+ message-log-max))
+
+
(defvar ps-print-hook nil)
(defvar ps-print-begin-sheet-hook nil)
(defvar ps-print-begin-page-hook nil)
(defun ps-spool-without-faces (from to &optional region-p)
- (run-hooks 'ps-print-hook)
- (ps-printing-region region-p from to)
- (ps-generate (current-buffer) from to 'ps-generate-postscript))
+ (let ((message-log-max (ps-message-log-max))) ; to print *Messages* buffer
+ (run-hooks 'ps-print-hook)
+ (ps-printing-region region-p from to)
+ (ps-generate (current-buffer) from to 'ps-generate-postscript)))
(defun ps-print-with-faces (from to &optional filename region-p)
(defun ps-spool-with-faces (from to &optional region-p)
- (run-hooks 'ps-print-hook)
- (ps-printing-region region-p from to)
- (ps-generate (current-buffer) from to 'ps-generate-postscript-with-faces))
+ (let ((message-log-max (ps-message-log-max))) ; to print *Messages* buffer
+ (run-hooks 'ps-print-hook)
+ (ps-printing-region region-p from to)
+ (ps-generate (current-buffer) from to 'ps-generate-postscript-with-faces)))
(defun ps-count-lines-preprint (from to)
- (or (and from to)
- (error "The mark is not set now"))
- (list (count-lines from to)))
+ (or (and from to)
+ (error "The mark is not set now"))
+ (let ((message-log-max (ps-message-log-max))) ; to count lines of *Messages*
+ (list (count-lines from to))))
(defun ps-count-lines (from to)