diff options
| author | Juri Linkov | 2018-12-11 02:36:46 +0200 |
|---|---|---|
| committer | Juri Linkov | 2018-12-11 02:36:46 +0200 |
| commit | 0054961acf319378a588bda1df7d32d2bc0f284d (patch) | |
| tree | 65a73d39cb5992aa74a017235980544cfc452882 | |
| parent | 712e74a9fbd24fe350b860238b152f297d16aa5e (diff) | |
| download | emacs-0054961acf319378a588bda1df7d32d2bc0f284d.tar.gz emacs-0054961acf319378a588bda1df7d32d2bc0f284d.zip | |
* lisp/isearch.el (isearch-pre-command-hook): Support `isearch-move'
command properties with values `enabled' and `disabled'
also for the value `shift' of isearch-yank-on-move. (Bug#15839)
| -rw-r--r-- | lisp/isearch.el | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el index dcd119a517c..dd0973d4ea6 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -2811,10 +2811,10 @@ the bottom." | |||
| 2811 | If `shift', extend the search string by motion commands while holding down | 2811 | If `shift', extend the search string by motion commands while holding down |
| 2812 | the shift key. The search string is extended by yanking text that | 2812 | the shift key. The search string is extended by yanking text that |
| 2813 | ends at the new position after moving point in the current buffer. | 2813 | ends at the new position after moving point in the current buffer. |
| 2814 | If t, extend the search string without the shift key pressed | 2814 | If t, extend the search string without the shift key pressed. |
| 2815 | by motion commands that have the `isearch-move' property on their | 2815 | To enable motion commands, put the `isearch-move' property on their |
| 2816 | symbols equal to `enabled', or for which the shift-translated command | 2816 | symbols to `enabled', or to disable an automatically detected |
| 2817 | is not disabled by the value `disabled' of property `isearch-move'." | 2817 | shift-translated command, use the property value `disabled'." |
| 2818 | :type '(choice (const :tag "Motion keys exit Isearch" nil) | 2818 | :type '(choice (const :tag "Motion keys exit Isearch" nil) |
| 2819 | (const :tag "Motion keys extend the search string" t) | 2819 | (const :tag "Motion keys extend the search string" t) |
| 2820 | (const :tag "Shifted motion keys extend the search string" shift)) | 2820 | (const :tag "Shifted motion keys extend the search string" shift)) |
| @@ -2864,14 +2864,15 @@ See more for options in `search-exit-option'." | |||
| 2864 | (read-event) | 2864 | (read-event) |
| 2865 | (setq this-command 'isearch-edit-string)) | 2865 | (setq this-command 'isearch-edit-string)) |
| 2866 | ;; Don't terminate the search for motion commands. | 2866 | ;; Don't terminate the search for motion commands. |
| 2867 | ((or (and (eq isearch-yank-on-move t) | 2867 | ((and isearch-yank-on-move |
| 2868 | (symbolp this-command) | 2868 | (symbolp this-command) |
| 2869 | (or (eq (get this-command 'isearch-move) 'enabled) | 2869 | (not (eq (get this-command 'isearch-move) 'disabled)) |
| 2870 | (and (not (eq (get this-command 'isearch-move) 'disabled)) | 2870 | (or (eq (get this-command 'isearch-move) 'enabled) |
| 2871 | (stringp (nth 1 (interactive-form this-command))) | 2871 | (and (eq isearch-yank-on-move t) |
| 2872 | (string-match-p "^^" (nth 1 (interactive-form this-command)))))) | 2872 | (stringp (nth 1 (interactive-form this-command))) |
| 2873 | (and (eq isearch-yank-on-move 'shift) | 2873 | (string-match-p "^^" (nth 1 (interactive-form this-command)))) |
| 2874 | this-command-keys-shift-translated)) | 2874 | (and (eq isearch-yank-on-move 'shift) |
| 2875 | this-command-keys-shift-translated))) | ||
| 2875 | (setq this-command-keys-shift-translated nil) | 2876 | (setq this-command-keys-shift-translated nil) |
| 2876 | (setq isearch-pre-move-point (point))) | 2877 | (setq isearch-pre-move-point (point))) |
| 2877 | ;; Append control characters to the search string | 2878 | ;; Append control characters to the search string |