bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#13175: 24.3.50; Isearch: doc of `C-M-w' and interaction with Backspa


From: Juri Linkov
Subject: bug#13175: 24.3.50; Isearch: doc of `C-M-w' and interaction with Backspace (`DEL')
Date: Fri, 14 Dec 2012 02:35:36 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3.50 (x86_64-pc-linux-gnu)

> The doc should, in addition to mentioning this, document `DEL' and
> `C-M-w' together.  Do not document `C-M-w' only in the context of
> yanking - that makes no sense.
>
> And that doc of both together should point out clearly what the
> differences are, including the fact that `DEL' can cancel searching but
> `C-M-w' never does that.

`DEL' can't cancel searching, it can cancel only last input.
Maybe a better word is "discard" instead of "cancel"
like in the docstring of `isearch-delete-char'.

The first line of the current docstring of `isearch-delete-char' already
is quite clear, it says: "Discard last input item and move point back".
So when last input was `C-M-w', DEL discards it and moves point back.

But I agree that a possible confusion between these two commands
could be clarified.  The following patch does this:

=== modified file 'lisp/isearch.el'
--- lisp/isearch.el     2012-12-13 23:00:05 +0000
+++ lisp/isearch.el     2012-12-14 00:35:21 +0000
@@ -1746,6 +1746,9 @@ (defun isearch-highlight-regexp ()
 
 (defun isearch-delete-char ()
   "Discard last input item and move point back.
+Last input means the last character or the last isearch command
+that added or deleted characters from the search string,
+moved point, toggled regexp mode or case-sensitivity, etc.
 If no previous match was done, just beep."
   (interactive)
   (if (null (cdr isearch-cmds))
@@ -1755,6 +1758,8 @@ (defun isearch-delete-char ()
 
 (defun isearch-del-char (&optional arg)
   "Delete character from end of search string and search again.
+Unlike `isearch-delete-char', it only deletes the last character,
+but doesn't cancel the effect of other isearch command.
 If search string is empty, just beep."
   (interactive "p")
   (if (= 0 (length isearch-string))






reply via email to

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