From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Benjamin Lewis Newsgroups: gmane.emacs.help Subject: Re: Deleting chunks of whitespace Date: Fri, 15 Nov 2002 12:02:18 -0800 Sender: help-gnu-emacs-admin@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1037391880 2508 80.91.224.249 (15 Nov 2002 20:24:40 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 15 Nov 2002 20:24:40 +0000 (UTC) Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18Cn13-0000eA-00 for ; Fri, 15 Nov 2002 21:24:37 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18Cn1O-0001lW-00; Fri, 15 Nov 2002 15:24:58 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!news.tele.dk!news.tele.dk!small.news.tele.dk!newsfeed1.bredband.com!bredband!uio.no!quimby.gnus.org!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 31 Original-NNTP-Posting-Host: css.css.sfu.ca Original-X-Trace: quimby.gnus.org 1037391239 31373 199.60.1.20 (15 Nov 2002 20:13:59 GMT) Original-X-Complaints-To: usenet@quimby.gnus.org Original-NNTP-Posting-Date: 15 Nov 2002 20:13:59 GMT X-Attribution: Benjamin Lewis X-Yow: Here we are in America... when do we collect unemployment? User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.1 (sparc-sun-solaris2.8) Cancel-Lock: sha1:zTES2jVAKBAwGIhIMY0SCH9E/cc= Original-Xref: shelby.stanford.edu gnu.emacs.help:107098 Original-To: help-gnu-emacs@gnu.org Errors-To: help-gnu-emacs-admin@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.emacs.help:3648 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:3648 On 15 Nov 2002, Richard V. Molen wrote: > Benjamin Lewis writes: > >> Not quite what you want, but you could check out >> `delete-horizontal-space' and 'just-one-space', bound by default to >> `M-\' and 'M-' respectively. > > These key bindings are nice since they mesh well with M-d. > > On another editor there was a function like that I miss... > > if the cursor is at the end of line, pull up the next line (like C-k) > else > if the cursor is on non-whitespace, delete all characters to end of line > that are non-whitespace. > else > if the cursor is on whitespace, delete all characters to the end of line > that are whitespace. > > Does anyone have such a function? Not sure I understand. Where would you use this that C-k doesn't do what you want? Is the function `delete-trailing-whitespace' helpful? -- Benjamin Lewis F u cn rd ths u cnt spl wrth a dm!