[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#11934: 24.1; provide variable for pp.el to control max display width
From: |
Michael Heerdegen |
Subject: |
bug#11934: 24.1; provide variable for pp.el to control max display width |
Date: |
Fri, 29 Apr 2016 16:14:56 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) |
Lars Ingebrigtsen <larsi@gnus.org> writes:
> I agree. What pp does now with simple lists isn't optimal.
AFAICT pp.el could be extended easily for handling this problem.
pp is currently very simple - see `pp-to-string'. It does just `prin1'
(which does most of the work already) the object into a temp buffer.
Then it does some simple cleanups: `pp-buffer'. That would be the
function to extend (Drew, wanne give it a try?).
But of course handling this problem is not trivial: we can't distinguish
"simple lists" from code, and what might look good for the first might
look weird for a macro call with a special lisp-indent-function value
(e.g. imagine a `defun' call with a line break inserted just after
"defun").
Another challenge is what to do if we have already nearly exhausted the
width limit.
Michael.