From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Alexander Pohoyda Newsgroups: gmane.emacs.devel Subject: kill-line when show-trailing-spaces is t Date: Sun, 8 Feb 2004 00:25:13 +0100 (CET) Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <200402072325.i17NPDcC001668@oak.pohoyda.family> NNTP-Posting-Host: deer.gmane.org X-Trace: sea.gmane.org 1076196366 12800 80.91.224.253 (7 Feb 2004 23:26:06 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 7 Feb 2004 23:26:06 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Sun Feb 08 00:26:03 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Apbpr-0006us-00 for ; Sun, 08 Feb 2004 00:26:03 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1Apbpq-0000Gr-00 for ; Sun, 08 Feb 2004 00:26:02 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Apbpp-0000kr-VC for emacs-devel@quimby.gnus.org; Sat, 07 Feb 2004 18:26:01 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.24) id 1Apbpk-0000kY-1q for emacs-devel@gnu.org; Sat, 07 Feb 2004 18:25:56 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.24) id 1ApbpD-0000Pf-QZ for emacs-devel@gnu.org; Sat, 07 Feb 2004 18:25:55 -0500 Original-Received: from [213.165.64.20] (helo=mail.gmx.net) by monty-python.gnu.org with smtp (Exim 4.24) id 1ApbpC-0000K2-SE for emacs-devel@gnu.org; Sat, 07 Feb 2004 18:25:23 -0500 Original-Received: (qmail 7874 invoked by uid 65534); 7 Feb 2004 23:25:19 -0000 Original-Received: from p50842117.dip0.t-ipconnect.de (EHLO oak.pohoyda.family) (80.132.33.23) by mail.gmx.net (mp026) with SMTP; 08 Feb 2004 00:25:19 +0100 X-Authenticated: #14602519 Original-Received: from oak.pohoyda.family (oak.pohoyda.family [127.0.0.1]) by oak.pohoyda.family (8.12.10/8.12.9) with ESMTP id i17NPEkD001671 for ; Sun, 8 Feb 2004 00:25:14 +0100 (CET) (envelope-from apog@oak.pohoyda.family) Original-Received: (from apog@localhost) by oak.pohoyda.family (8.12.10/8.12.9/Submit) id i17NPDcC001668; Sun, 8 Feb 2004 00:25:13 +0100 (CET) (envelope-from apog) Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:19793 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:19793 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 PGP Key fingerprint: 7F C9 CC 5A 75 CD 89 72 15 54 5F 62 20 23 C6 44