[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
kill-line when show-trailing-spaces is t
From: |
Alexander Pohoyda |
Subject: |
kill-line when show-trailing-spaces is t |
Date: |
Sun, 8 Feb 2004 00:25:13 +0100 (CET) |
Hi!
Everybody knows a great feature of the kill-line function which skips
blank and tab characters as if they were not present in the end of the
line.
What I find frustrating is that when show-trailing-spaces is t,
these characters are still ignored by the function even though they
are visible.
Here's a patch to fix this.
Index: simple.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/simple.el,v
retrieving revision 1.627
diff -u -r1.627 simple.el
--- simple.el 31 Jan 2004 15:05:25 -0000 1.627
+++ simple.el 7 Feb 2004 23:16:05 -0000
@@ -2233,7 +2233,10 @@
(save-excursion
(end-of-visible-line) (point))))
(if (or (save-excursion
- (skip-chars-forward " \t" end)
+ ;; Skip invisible characters
+ (skip-chars-forward
+ (if show-trailing-whitespace
+ "" " \t") end)
(= (point) end))
(and kill-whole-line (bolp)))
(forward-visible-line 1)
I'm sorry if this change was offered before and rejected.
--
Alexander Pohoyda <address@hidden>
PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72 15 54 5F 62 20 23 C6 44
- kill-line when show-trailing-spaces is t,
Alexander Pohoyda <=