Revision: miles@gnu.org--gnu-2004/emacs--unicode--0--patch-15
[bpt/emacs.git] / lisp / ps-print.el
index 50d7f1d..5c019b4 100644 (file)
@@ -1262,7 +1262,7 @@ Please send all bug fixes and enhancements to
 ;;      N-up printing.
 ;;      Hook: `ps-print-begin-sheet-hook'.
 ;;
-;; [keinichi] 19990509 Kein'ichi Handa <handa@etl.go.jp>
+;; [kenichi] 19990509 Ken'ichi Handa <handa@m17n.org>
 ;;
 ;;    `ps-print-region-function'
 ;;
@@ -1275,7 +1275,7 @@ Please send all bug fixes and enhancements to
 ;;      PostScript prologue header comment insertion.
 ;;      Skip invisible text better.
 ;;
-;; [keinichi] 19980819 Kein'ichi Handa <handa@etl.go.jp>
+;; [kenichi] 19980819 Ken'ichi Handa <handa@m17n.org>
 ;;
 ;;    Multi-byte buffer handling.
 ;;
@@ -1383,7 +1383,7 @@ Please send all bug fixes and enhancements to
 ;; prologue code suggestion, for odd/even printing suggestion and for
 ;; `ps-prologue-file' enhancement.
 ;;
-;; Thanks to Kein'ichi Handa <handa@etl.go.jp> for multi-byte buffer handling.
+;; Thanks to Ken'ichi Handa <handa@m17n.org> for multi-byte buffer handling.
 ;;
 ;; Thanks to Matthew O Persico <Matthew.Persico@lazard.com> for line number on
 ;; empty columns.
@@ -3501,6 +3501,11 @@ The table depends on the current ps-print setup."
      #'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)
@@ -3657,14 +3662,28 @@ If `ps-prefix-quote' is nil, it's set to t after generating string."
              (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))))
@@ -3718,8 +3737,8 @@ It can be retrieved with `(ps-get ALIST-SYM KEY)'."
   (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).")
+;; Alias for `ps-time-stamp-yyyy-mm-dd' (which see).
+(defalias 'ps-time-stamp-iso8601 'ps-time-stamp-yyyy-mm-dd)
 
 
 (defun ps-time-stamp-hh:mm:ss ()