unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* kill-line when show-trailing-spaces is t
@ 2004-02-07 23:25 Alexander Pohoyda
  2004-02-09  9:38 ` Richard Stallman
  0 siblings, 1 reply; 2+ messages in thread
From: Alexander Pohoyda @ 2004-02-07 23:25 UTC (permalink / raw)


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 <alexander.pohoyda@gmx.net>
PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72  15 54 5F 62 20 23 C6 44

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: kill-line when show-trailing-spaces is t
  2004-02-07 23:25 kill-line when show-trailing-spaces is t Alexander Pohoyda
@ 2004-02-09  9:38 ` Richard Stallman
  0 siblings, 0 replies; 2+ messages in thread
From: Richard Stallman @ 2004-02-09  9:38 UTC (permalink / raw)
  Cc: emacs-devel

I will do this in a cleaner way.  Thanks.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2004-02-09  9:38 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-07 23:25 kill-line when show-trailing-spaces is t Alexander Pohoyda
2004-02-09  9:38 ` Richard Stallman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).