Path: utzoo!attcan!uunet!steinmetz!iraq!halvers From: halvers@iraq.steinmetz (Pete Halverson) Newsgroups: comp.emacs Subject: Re: assorted questions Message-ID: <12205@steinmetz.ge.com> Date: 23 Sep 88 13:56:37 GMT References:<38598@yale-celray.yale.UUCP> Sender: news@steinmetz.ge.com Reply-To: halvers@iraq.steinmetz.ge.com (Pete Halverson) Lines: 41 In article <38598@yale-celray.yale.UUCP> spolsky@yale.edu (Joel Spolsky) writes > >While we're on the subject, when I first started using emacs, I thought >I would get used to ^K not deleting the newlines. Needless to say I >still haven't gotten use to this: I generally delete paragraphs and >other such regions by hitting ^K a few times (which is more >instinctive, I think, than blocking it off), and the "stutter" effect >is aggravating. Especially since this means that M-5 C-k does not mean >the same thing as C-k C-k C-k C-k C-k ... > >Any suggestions for fixes? How about the following, which I bind to "M-k": (defun kill-entire-line (&optional arg) "Kill the entire line that the cursor is on. With prefix argument, kill that many lines from point. Negative arguments kill lines backward. When calling from a program, nil means \"no arg\", a number counts as a prefix arg." (interactive "*P") (beginning-of-line) (kill-region (point) (progn (if arg (forward-line (prefix-numeric-value arg)) (if (eobp) (signal 'end-of-buffer nil) (forward-line 1))) (point)))) >Joel Spolsky ~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~=~ Pete Halverson ARPA: halverson@ge-crd.ARPA GE Corporate R&D Center UUCP: uunet!steinmetz!iraq!halvers Schenectady, NY halvers@iraq.steinmetz.UUCP "IBM supports UNIX like a rope supports a hanged man" -- net quote