1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-11 09:20:51 +00:00

* lisp/cus-edit.el (custom-save-variables): Pretty-print long values.

Fixes: debbugs:14187
This commit is contained in:
Adam Spiers 2013-05-07 23:59:41 -07:00 committed by Glenn Morris
parent 9ecf672a9f
commit dc7466df67
2 changed files with 14 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2013-05-08 Adam Spiers <emacs@adamspiers.org>
* cus-edit.el (custom-save-variables):
Pretty-print long values. (Bug#14187)
2013-05-08 Glenn Morris <rgm@gnu.org>
* progmodes/m4-mode.el (m4-program): Assume it is in PATH.

View File

@ -4531,7 +4531,15 @@ This function does not save the buffer."
(princ " '(")
(prin1 symbol)
(princ " ")
(prin1 (car value))
(let ((val (prin1-to-string (car value))))
(if (< (length val) 60)
(insert val)
(newline-and-indent)
(let ((beginning-of-val (point)))
(insert val)
(save-excursion
(goto-char beginning-of-val)
(indent-pp-sexp 1)))))
(when (or now requests comment)
(princ " ")
(prin1 now)