summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorJuri Linkov <juri@linkov.net>2018-12-11 02:36:46 +0200
committerJuri Linkov <juri@linkov.net>2018-12-11 02:36:46 +0200
commit0054961acf319378a588bda1df7d32d2bc0f284d (patch)
tree65a73d39cb5992aa74a017235980544cfc452882 /lisp
parent712e74a9fbd24fe350b860238b152f297d16aa5e (diff)
downloademacs-0054961acf319378a588bda1df7d32d2bc0f284d.tar.gz
emacs-0054961acf319378a588bda1df7d32d2bc0f284d.tar.bz2
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)
Diffstat (limited to 'lisp')
-rw-r--r--lisp/isearch.el25
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."
If `shift', extend the search string by motion commands while holding down
the shift key. The search string is extended by yanking text that
ends at the new position after moving point in the current buffer.
-If t, extend the search string without the shift key pressed
-by motion commands that have the `isearch-move' property on their
-symbols equal to `enabled', or for which the shift-translated command
-is not disabled by the value `disabled' of property `isearch-move'."
+If t, extend the search string without the shift key pressed.
+To enable motion commands, put the `isearch-move' property on their
+symbols to `enabled', or to disable an automatically detected
+shift-translated command, use the property value `disabled'."
:type '(choice (const :tag "Motion keys exit Isearch" nil)
(const :tag "Motion keys extend the search string" t)
(const :tag "Shifted motion keys extend the search string" shift))
@@ -2864,14 +2864,15 @@ See more for options in `search-exit-option'."
(read-event)
(setq this-command 'isearch-edit-string))
;; Don't terminate the search for motion commands.
- ((or (and (eq isearch-yank-on-move t)
- (symbolp this-command)
- (or (eq (get this-command 'isearch-move) 'enabled)
- (and (not (eq (get this-command 'isearch-move) 'disabled))
- (stringp (nth 1 (interactive-form this-command)))
- (string-match-p "^^" (nth 1 (interactive-form this-command))))))
- (and (eq isearch-yank-on-move 'shift)
- this-command-keys-shift-translated))
+ ((and isearch-yank-on-move
+ (symbolp this-command)
+ (not (eq (get this-command 'isearch-move) 'disabled))
+ (or (eq (get this-command 'isearch-move) 'enabled)
+ (and (eq isearch-yank-on-move t)
+ (stringp (nth 1 (interactive-form this-command)))
+ (string-match-p "^^" (nth 1 (interactive-form this-command))))
+ (and (eq isearch-yank-on-move 'shift)
+ this-command-keys-shift-translated)))
(setq this-command-keys-shift-translated nil)
(setq isearch-pre-move-point (point)))
;; Append control characters to the search string