X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/197d4ebcbcc24adcaa1a5e6995bef8be15ea76ae..88e15d0eca7546c5f42e9d06771b391d5f05f28a:/lisp/ps-print.el diff --git a/lisp/ps-print.el b/lisp/ps-print.el index e60eebe07c..a7b32e8b26 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))))