emacs-devel
[Top][All Lists]
Advanced

[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: John Shahid
Subject: Re: Let's make C-M-w in isearch yank symbol, not delete character
Date: Mon, 12 Mar 2018 13:38:52 -0400
User-agent: mu4e 1.0-alpha3; emacs 27.0.50

+1

Juri Linkov <address@hidden> writes:

>> Why only set those properties in the :setter rather tan just do it at
>> top-level?  Also, would it be possible to avoid having to list those
>> commands and instead treat as `isearch-move` any command which uses the
>> handle-shift-selection?
>
> Supporting only commands which use the handle-shift-selection
> makes the most sense.  I tested this to confirm it works as expected:
>
> diff --git a/lisp/isearch.el b/lisp/isearch.el
> index 84b121a..245bf8a 100644
> --- a/lisp/isearch.el
> +++ b/lisp/isearch.el
> @@ -2433,8 +2448,8 @@ isearch-pre-command-hook
>        (setq this-command 'isearch-edit-string))
>       ;; Don't terminate the search for motion commands.
>       ((or (and (eq search-exit-option 'move)
> -               (symbolp this-command)
> -               (eq (get this-command 'isearch-move) t))
> +               (stringp (nth 1 (interactive-form this-command)))
> +               (string-match-p "^^" (nth 1 (interactive-form this-command))))
>            (and (eq search-exit-option 'shift-move)
>                 this-command-keys-shift-translated))
>        (setq this-command-keys-shift-translated nil)




reply via email to

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