[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[AUCTeX] Re: Trailing whitespace and RET
From: |
Ralf Angeli |
Subject: |
[AUCTeX] Re: Trailing whitespace and RET |
Date: |
Fri, 17 Mar 2006 11:11:43 +0100 |
* Uwe Siart (2006-03-17) writes:
> I found that AUCTeX eats up trailing whitespace in the current line
> after pressing RET. In case this is a wanted behaviour: Can it be
> customized if it was undesired?
>
> 'TeX-newline-function' is the only function I found to deal with the
> behaviour of RET. But as I understand it affects indentation, not
> trailing whitespace.
>
> My AUCTeX version is 2006-03-14 and the value of 'TeX-newline-function'
> is 'newline-and-indent'.
Whitespace deletion in `newline-and-indent' cannot be customized.
It could be considered a bug that this deletion is not documented.
And the stanza
,----[ (info "(emacs)Basic Indent") ]
| When entering lines of new code, use `C-j' (`newline-and-indent'),
| which is equivalent to <RET> followed by <TAB>. `C-j' at the end of a
| line creates a blank line and then gives it the appropriate indentation.
`----
in the Emacs manual is obviously wrong.
Could you please send a bug report to emacs-pretest-bug?
Regarding your problem: You could write your own function doing what
`newline-and-indent' does without eating whitespace. Just copy its
definition, change the name, remove the call to
`delete-horizontal-space', save it in your init file and specify it as
the function to be used with `TeX-newline'.
--
Ralf