summaryrefslogtreecommitdiff
path: root/lisp/ps-print.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/ps-print.el')
-rw-r--r--lisp/ps-print.el27
1 files changed, 23 insertions, 4 deletions
diff --git a/lisp/ps-print.el b/lisp/ps-print.el
index e60eebe07cf..a7b32e8b264 100644
--- a/lisp/ps-print.el
+++ b/lisp/ps-print.el
@@ -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))))