aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman1998-03-05 02:28:44 +0000
committerRichard M. Stallman1998-03-05 02:28:44 +0000
commitbd6a841426024265cd0860bb954b80eb55592846 (patch)
tree5072a17efb6e8269fe114e5d09209bade7726b7a
parente13322a0d943728730d9b0e92bd424e24ffe3532 (diff)
downloademacs-bd6a841426024265cd0860bb954b80eb55592846.tar.gz
emacs-bd6a841426024265cd0860bb954b80eb55592846.zip
(isearch-*-char): Do nothing special if quoted with \.
-rw-r--r--lisp/isearch.el37
1 files changed, 20 insertions, 17 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 1bc4341d1cc..bcc82b79b8b 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -1008,9 +1008,9 @@ If no previous match was done, just beep."
1008 (looking-at (if isearch-regexp isearch-string 1008 (looking-at (if isearch-regexp isearch-string
1009 (regexp-quote isearch-string)))) 1009 (regexp-quote isearch-string))))
1010 (error nil)) 1010 (error nil))
1011 (or isearch-yank-flag 1011 (or isearch-yank-flag
1012 (<= (match-end 0) 1012 (<= (match-end 0)
1013 (min isearch-opoint isearch-barrier)))) 1013 (min isearch-opoint isearch-barrier))))
1014 (progn 1014 (progn
1015 (setq isearch-success t 1015 (setq isearch-success t
1016 isearch-invalid-regexp nil 1016 isearch-invalid-regexp nil
@@ -1042,20 +1042,23 @@ If no previous match was done, just beep."
1042 "Handle * and ? specially in regexps." 1042 "Handle * and ? specially in regexps."
1043 (interactive) 1043 (interactive)
1044 (if isearch-regexp 1044 (if isearch-regexp
1045 1045 (let ((idx (length isearch-string)))
1046 (progn 1046 (while (and (> idx 0)
1047 (setq isearch-adjusted t) 1047 (eq (aref isearch-string (1- idx)) ?\\))
1048 ;; Get the isearch-other-end from before the last search. 1048 (setq idx (1- idx)))
1049 ;; We want to start from there, 1049 (when (= (mod (- (length isearch-string) idx) 2) 0)
1050 ;; so that we don't retreat farther than that. 1050 (setq isearch-adjusted t)
1051 ;; (car isearch-cmds) is after last search; 1051 ;; Get the isearch-other-end from before the last search.
1052 ;; (car (cdr isearch-cmds)) is from before it. 1052 ;; We want to start from there,
1053 (let ((cs (nth 5 (car (cdr isearch-cmds))))) 1053 ;; so that we don't retreat farther than that.
1054 (setq cs (or cs isearch-barrier)) 1054 ;; (car isearch-cmds) is after last search;
1055 (goto-char 1055 ;; (car (cdr isearch-cmds)) is from before it.
1056 (if isearch-forward 1056 (let ((cs (nth 5 (car (cdr isearch-cmds)))))
1057 (max cs isearch-barrier) 1057 (setq cs (or cs isearch-barrier))
1058 (min cs isearch-barrier)))))) 1058 (goto-char
1059 (if isearch-forward
1060 (max cs isearch-barrier)
1061 (min cs isearch-barrier)))))))
1059 (isearch-process-search-char (isearch-last-command-char))) 1062 (isearch-process-search-char (isearch-last-command-char)))
1060 1063
1061 1064