emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: address@hidden: C-k must be repeated in shell to kill a line that ha


From: Ehud Karni
Subject: Re: address@hidden: C-k must be repeated in shell to kill a line that has a prompt]
Date: Tue, 30 Oct 2001 20:55:50 +0200

On Tue, 30 Oct 2001 11:10:26 -0700 (MST), Richard Stallman <address@hidden> 
wrote:
> 
> What do people think about this issue?  I agree this behavior is bad,
> but can we think of an alternative that really is better?
> 
DO> Daniel Ortmann <address@hidden> wrote:
DO> 
DO> In the "shell" buffer, the new emacs forces me to repeat C-k in order to
DO> kill a line that has a prompt.  This is so contrary to *ALL* historical
DO> emacs behavior that it must only be  considered a blatant bug.

I agree. Here is my del-line function:

(defun del-line (&optional arg)
  "Delete arg (def=1) lines (kill)"
  (interactive "P")
       (barf-if-buffer-read-only)
       (let ((inhibit-field-text-motion nil)) 
           (and (eq major-mode 'shell-mode)
                (setq inhibit-field-text-motion t))
           (delete-region (line-beginning-position 1) (line-end-position (or 
arg 1)))
           (or (eobp)
               (delete-char 1))))

Of course I have different key (S-delete) for this function (and I use
it in all buffers - it deletes a whole line with 1 key).

Ehud.


-- 
 Ehud Karni     Mivtach - Simon  Insurance   /"\
 Tel: +972-3-7966-561 Fax: +972-3-7966-667   \ /  ASCII Ribbon Campaign
 (USA) Fax and  voice  mail: 1-815-5509341    X   Against  HTML  Mail
     Better     Safe     Than     Sorry      / \
     mailto:address@hidden    http://www.simonwiesel.co.il



reply via email to

[Prev in Thread] Current Thread [Next in Thread]