|
From: | Stefan Monnier |
Subject: | Re: improvement for `delete-indentation' |
Date: | 06 Jan 2004 19:22:23 -0500 |
User-agent: | Gnus/5.09 (Gnus v5.9.0) Emacs/21.3.50 |
> (delete-region (point) (+ (point) (length fill-prefix)))) > + (if (eq ?\\ (char-syntax (preceding-char))) ; assume continued line > + (delete-backward-char)) > (fixup-whitespace)))) It might not be a bad idea but I think it deserve more care. The above code can lead to surprises with cases such as (string ?\\ ?1) in elisp or line 1. \\ line 2. in TeX. I suggest we only remove such a \ if it was followed by a \n and if it is not preceded by an odd number of \. Stefan PS: Luckily TeX uses / syntax rather than \ syntax for the backslash char so the above code won't trigger. But then your code might want to also trigger in the case of / syntax (which is exactly the same from the C code's point of view).
[Prev in Thread] | Current Thread | [Next in Thread] |