From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: kai.grossjohann@gmx.net (=?iso-8859-1?q?Kai_Gro=DFjohann?=) Newsgroups: gmane.emacs.help Subject: Re: I don't want Ctrl-Backspace to span different lines... Date: Thu, 15 May 2003 13:45:53 +0200 Organization: University of Duisburg, Germany Sender: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <84llx8whzi.fsf@lucy.is.informatik.uni-duisburg.de> References: <445cd6bf.0305150239.2b255a59@posting.google.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1052999494 738 80.91.224.249 (15 May 2003 11:51:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 15 May 2003 11:51:34 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Thu May 15 13:51:32 2003 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 19GHFR-000086-00 for ; Thu, 15 May 2003 13:50:09 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 19GHG2-00060P-08 for gnu-help-gnu-emacs@m.gmane.org; Thu, 15 May 2003 07:50:46 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!nntp.cs.ubc.ca!fu-berlin.de!uni-berlin.de!pd951fe3c.dip.t-dialin.NET!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 24 Original-NNTP-Posting-Host: pd951fe3c.dip.t-dialin.net (217.81.254.60) Original-X-Trace: fu-berlin.de 1052999158 23727550 217.81.254.60 (16 [73968]) Mail-Copies-To: never User-Agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:EAbtIReyjvs2d7j9+vcLRhly/q8= Original-Xref: shelby.stanford.edu gnu.emacs.help:113260 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1b5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Help: List-Post: List-Subscribe: , List-Archive: List-Unsubscribe: , Errors-To: help-gnu-emacs-bounces+gnu-help-gnu-emacs=m.gmane.org@gnu.org Xref: main.gmane.org gmane.emacs.help:9756 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:9756 j_del_strother@hotmail.com (Jon) writes: > Is there any way to prevent Ctrl-Backspace & Ctrl-Delete from spanning > lines? You have to write Lisp code. For example, (defun jon-kill-word (n) "Kill N words or to end of line, whichever comes first." (interactive "p") (let ((eol (point-at-eol)) (nwords (save-excursion (forward-word n) (point)))) (kill-region (point) (min eol nwords)))) (defun jon-backward-kill-word (n) "Kill N words backward or to beginning of line, whichever comes first." (interactive "p") (let ((bol (point-at-bol)) (nwords (save-excursion (backward-word n) (point)))) (kill-region (point) (max (bol nwords))))) If these commands do what you want, you can bind them to keys you like. -- This line is not blank.