[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Let's make C-M-w in isearch yank symbol, not delete character
From: |
Juri Linkov |
Subject: |
Re: Let's make C-M-w in isearch yank symbol, not delete character |
Date: |
Sat, 10 Mar 2018 23:15:19 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.0.50 (x86_64-pc-linux-gnu) |
> Does it make sense to set the `isearch-move' property on some common
> forward commands, e.g. `forward-char', `forward-symbol' &
> `forward-word'. I just compiled and tried the latest master to test this
> feature and it wasn't immediately obvious that I had to set the property
> for those commands. I was confused because I expected the built-in
> functions to work out of the box with this new feature.
Maybe better to put the `isearch-move' property on the common commands
only when you customize `search-exit-option' to `move' like in this patch:
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 4f5f494..c0f9025 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -86,6 +86,14 @@ search-exit-option
(const :tag "Extend the search string by shifted motion keys"
shift-move)
(const :tag "Append control characters to the search string"
append)
(const :tag "Don't terminate incremental search" nil))
+ :set #'(lambda (sym val)
+ (when (eq val 'move)
+ (dolist (sym '(right-char right-word forward-char forward-word
+ forward-symbol forward-sexp next-line
move-end-of-line
+ left-char left-word backward-char backward-word
+ backward-symbol backward-sexp previous-line))
+ (put sym 'isearch-move t)))
+ (set-default sym val))
:version "27.1")
(defcustom search-slow-window-lines 1
- Re: Let's make C-M-w in isearch yank symbol, not delete character, (continued)
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Juri Linkov, 2018/03/03
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Eli Zaretskii, 2018/03/04
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Juri Linkov, 2018/03/04
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Eli Zaretskii, 2018/03/04
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Eli Zaretskii, 2018/03/05
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Juri Linkov, 2018/03/05
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Eli Zaretskii, 2018/03/05
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Juri Linkov, 2018/03/06
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Eli Zaretskii, 2018/03/10
- Re: Let's make C-M-w in isearch yank symbol, not delete character, John Shahid, 2018/03/10
- Re: Let's make C-M-w in isearch yank symbol, not delete character,
Juri Linkov <=
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Stefan Monnier, 2018/03/10
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Juri Linkov, 2018/03/11
- Re: Let's make C-M-w in isearch yank symbol, not delete character, John Shahid, 2018/03/12
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Alan Mackenzie, 2018/03/12
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Juri Linkov, 2018/03/12
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Juri Linkov, 2018/03/12
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Eli Zaretskii, 2018/03/10
- Re: Let's make C-M-w in isearch yank symbol, not delete character, Herring, Davis, 2018/03/11