;;; ps-print.el --- print text from the buffer as PostScript
;; Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-;; 2003 Free Software Foundation, Inc.
+;; 2003, 2004 Free Software Foundation, Inc.
;; Author: Jim Thompson (was <thompson@wg2.waii.com>)
;; Jacques Duthen (was <duthen@cegelec-red.fr>)
;; Maintainer: Kenichi Handa <handa@etl.go.jp> (multi-byte characters)
;; Vinicius Jose Latorre <viniciusjl@ig.com.br>
;; Keywords: wp, print, PostScript
-;; Time-stamp: <2003/07/10 19:19:12 vinicius>
-;; Version: 6.6.2
+;; Time-stamp: <2004/02/29 00:07:55 vinicius>
+;; Version: 6.6.3
;; X-URL: http://www.cpqd.com.br/~vinicius/emacs/
-(defconst ps-print-version "6.6.2"
- "ps-print.el, v 6.6.2 <2003/07/10 vinicius>
+(defconst ps-print-version "6.6.3"
+ "ps-print.el, v 6.6.3 <2004/02/29 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
;;
;; [vinicius] Vinicius Jose Latorre <viniciusjl@ig.com.br>
;;
+;; 20040229
+;; `ps-time-stamp-yyyy-mm-dd', `ps-time-stamp-iso8601'
+;;
;; 20010619
;; `ps-time-stamp-locale-default'
;;
;;
;; [keinichi] 19990509 Kein'ichi Handa <handa@etl.go.jp>
;;
-;; `ps-print-region-function'
+;; `ps-print-region-function'
;;
;; [vinicius] Vinicius Jose Latorre <viniciusjl@ig.com.br>
;;
;;
;; [keinichi] 19980819 Kein'ichi Handa <handa@etl.go.jp>
;;
-;; Multi-byte buffer handling.
+;; Multi-byte buffer handling.
;;
;; [vinicius] Vinicius Jose Latorre <viniciusjl@ig.com.br>
;;
;; Thanks to David X Callaway <dxc@xprt.net> for helping debugging PostScript
;; level 1 compatibility.
;;
-;; Thanks to Colin Marquardt <colin.marquardt@usa.alcatel.com> for upside-down,
-;; line number step, line number start and zebra stripe follow suggestions, and
-;; for XEmacs beta-tests.
+;; Thanks to Colin Marquardt <colin.marquardt@usa.alcatel.com> for:
+;; - upside-down, line number step, line number start and zebra stripe
+;; follow suggestions.
+;; - `ps-time-stamp-yyyy-mm-dd' and `ps-time-stamp-iso8601' suggestion.
+;; - and for XEmacs beta-tests.
;;
;; Thanks to Klaus Berndl <klaus.berndl@sdm.de> for user defined PostScript
;; prologue code suggestion, for odd/even printing suggestion and for
For symbols with bound functions, the function is called and should return a
string to be inserted into the array. For symbols with bound values, the value
should be a string to be inserted into the array. In either case, function or
-variable, the string value has PostScript string delimiters added to it."
+variable, the string value has PostScript string delimiters added to it.
+
+If symbols are unbounded, they are silently ignored."
:type '(repeat (choice :menu-tag "Left Header"
:tag "Left Header"
string symbol))
`ps-time-stamp-mon-dd-yyyy' Return date as \"Jun 18 2001\".
+ `ps-time-stamp-yyyy-mm-dd' Return date as \"2001-06-18\" (ISO
+ date).
+
+ `ps-time-stamp-iso8601' Alias for `ps-time-stamp-yyyy-mm-dd'.
+
You can also create your own time stamp function by using `format-time-string'
\(which see)."
:type '(repeat (choice :menu-tag "Right Header"
For symbols with bound functions, the function is called and should return a
string to be inserted into the array. For symbols with bound values, the value
should be a string to be inserted into the array. In either case, function or
-variable, the string value has PostScript string delimiters added to it."
+variable, the string value has PostScript string delimiters added to it.
+
+If symbols are unbounded, they are silently ignored."
:version "21.1"
:type '(repeat (choice :menu-tag "Left Footer"
:tag "Left Footer"
`ps-time-stamp-mon-dd-yyyy' Return date as \"Jun 18 2001\".
+ `ps-time-stamp-yyyy-mm-dd' Return date as \"2001-06-18\" (ISO
+ date).
+
+ `ps-time-stamp-iso8601' Alias for `ps-time-stamp-yyyy-mm-dd'.
+
You can also create your own time stamp function by using `format-time-string'
\(which see)."
:version "21.1"
(format-time-string "%b %d %Y"))
+(defun ps-time-stamp-yyyy-mm-dd ()
+ "Return date as \"2001-06-18\" (ISO date)."
+ (format-time-string "%Y-%m-%d"))
+
+
+(defalias 'ps-time-stamp-iso8601 'ps-time-stamp-yyyy-mm-dd
+ "Alias for `ps-time-stamp-yyyy-mm-dd' (which see).")
+
+
(defun ps-time-stamp-hh:mm:ss ()
"Return time as \"17:28:31\"."
(format-time-string "%T"))
(defun ps-kill-emacs-check ()
(let (ps-buffer)
(and (setq ps-buffer (get-buffer ps-spool-buffer-name))
+ (buffer-name ps-buffer) ; check if it's not killed
(buffer-modified-p ps-buffer)
(y-or-n-p "Unprinted PostScript waiting; print now? ")
(ps-despool))
(and (setq ps-buffer (get-buffer ps-spool-buffer-name))
+ (buffer-name ps-buffer) ; check if it's not killed
(buffer-modified-p ps-buffer)
(not (yes-or-no-p "Unprinted PostScript waiting; exit anyway? "))
(error "Unprinted PostScript"))))