[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Make Emacs print "^J" instead of "\n" with `print-escape-newlines'?
From: |
Thorsten Jolitz |
Subject: |
Re: Make Emacs print "^J" instead of "\n" with `print-escape-newlines'? |
Date: |
Thu, 21 Nov 2013 00:41:40 +0100 |
User-agent: |
Gnus/5.130002 (Ma Gnus v0.2) Emacs/24.3 (gnu/linux) |
Damien Wyart <damien.wyart@free.fr> writes:
> * Thorsten Jolitz <tjolitz@gmail.com> in gnu.emacs.help:
>> > is there any way to make Emacs print "^J" instead of "\n" with
>> > (print-escape-newlines t)?
>
>> But I would still be interested in the first part.
>
> I think you would need to modify the following part of src/print.c:
>
> if (c == '\n' && print_escape_newlines)
> {
> PRINTCHAR ('\\');
> PRINTCHAR ('n');
> }
>
> (not sure how to tell PRINTCHAR to print ^J) and recompile Emacs.
I see, although thats probably a bit too low-level for me. But thanks
for the hint, it motivated me to finally download the Emacs sources, the
C code seems to be quite readable - even when not knowing much about C
at all.
--
cheers,
Thorsten