help-gnu-emacs
[Top][All Lists]
Advanced

[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: Damien Wyart
Subject: Re: Make Emacs print "^J" instead of "\n" with `print-escape-newlines'?
Date: Wed, 20 Nov 2013 21:48:48 +0100
User-agent: Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.3.50

* 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.

-- 
DW


reply via email to

[Prev in Thread] Current Thread [Next in Thread]