diff --git a/lisp/ps-print.el b/lisp/ps-print.el index e60eebe07cf..620398ac3b9 100644 --- a/lisp/ps-print.el +++ b/lisp/ps-print.el @@ -3657,14 +3657,23 @@ 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-value (alist-sym key) "Return value from association list ALIST-SYM which car is `eq' to KEY." (cdr (assq key (symbol-value alist-sym))))