summaryrefslogtreecommitdiff
path: root/lisp/isearch.el
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-05-16 12:58:56 +0300
committerEli Zaretskii <eliz@gnu.org>2013-05-16 12:58:56 +0300
commita9519e2685d19b13ce4e3e1ba13f97569013627e (patch)
tree6a9e0e35514c400749f23c891e9a95577fb9bfc1 /lisp/isearch.el
parent3946d31b7bcf2a7dceacb86598823360f457cd19 (diff)
parent2d4bf34b5b83b3728b2fb18a72536f3e14afcf34 (diff)
downloademacs-a9519e2685d19b13ce4e3e1ba13f97569013627e.tar.gz
emacs-a9519e2685d19b13ce4e3e1ba13f97569013627e.tar.bz2
emacs-a9519e2685d19b13ce4e3e1ba13f97569013627e.zip
Merge from trunk.
Diffstat (limited to 'lisp/isearch.el')
-rw-r--r--lisp/isearch.el25
1 files changed, 16 insertions, 9 deletions
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 72a125fcecb..fe73bf7d6a4 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -47,7 +47,7 @@
;; modify the search string before executing the search. There are
;; three commands to terminate the editing: C-s and C-r exit the
;; minibuffer and search forward and reverse respectively, while C-m
-;; exits and does a nonincremental search.
+;; exits and searches in the last search direction.
;; Exiting immediately from isearch uses isearch-edit-string instead
;; of nonincremental-search, if search-nonincremental-instead is non-nil.
@@ -515,12 +515,12 @@ This is like `describe-bindings', but displays only Isearch keys."
(define-key map "\M-so" 'isearch-occur)
(define-key map "\M-shr" 'isearch-highlight-regexp)
- ;; The key translations defined in the C-x 8 prefix should insert
- ;; characters into the search string. See iso-transl.el.
+ ;; The key translations defined in the C-x 8 prefix should add
+ ;; characters to the search string. See iso-transl.el.
(define-key map "\C-x" nil)
(define-key map [?\C-x t] 'isearch-other-control-char)
(define-key map "\C-x8" nil)
- (define-key map "\C-x8\r" 'isearch-insert-char-by-name)
+ (define-key map "\C-x8\r" 'isearch-char-by-name)
map)
"Keymap for `isearch-mode'.")
@@ -528,7 +528,7 @@ This is like `describe-bindings', but displays only Isearch keys."
(defvar minibuffer-local-isearch-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map minibuffer-local-map)
- (define-key map "\r" 'isearch-nonincremental-exit-minibuffer)
+ (define-key map "\r" 'exit-minibuffer)
(define-key map "\M-\t" 'isearch-complete-edit)
(define-key map "\C-s" 'isearch-forward-exit-minibuffer)
(define-key map "\C-r" 'isearch-reverse-exit-minibuffer)
@@ -679,6 +679,8 @@ Type \\[isearch-yank-kill] to yank the last string of killed text.
Type \\[isearch-yank-pop] to replace string just yanked into search prompt
with string killed before it.
Type \\[isearch-quote-char] to quote control character to search for it.
+Type \\[isearch-char-by-name] to add a character to search by Unicode name,\
+ with completion.
\\[isearch-abort] while searching or when search has failed cancels input\
back to what has
been found successfully.
@@ -1273,7 +1275,6 @@ You can update the global isearch variables by setting new values to
The following additional command keys are active while editing.
\\<minibuffer-local-isearch-map>
\\[exit-minibuffer] to resume incremental searching with the edited string.
-\\[isearch-nonincremental-exit-minibuffer] to do one nonincremental search.
\\[isearch-forward-exit-minibuffer] to resume isearching forward.
\\[isearch-reverse-exit-minibuffer] to resume isearching backward.
\\[isearch-complete-edit] to complete the search string using the search ring."
@@ -1307,13 +1308,18 @@ The following additional command keys are active while editing.
(interactive)
(setq isearch-nonincremental t)
(exit-minibuffer))
+;; Changing the value of `isearch-nonincremental' has no effect here,
+;; because `isearch-edit-string' ignores this change. Thus marked as obsolete.
+(make-obsolete 'isearch-nonincremental-exit-minibuffer 'exit-minibuffer "24.4")
(defun isearch-forward-exit-minibuffer ()
+ "Resume isearching forward from the minibuffer that edits the search string."
(interactive)
(setq isearch-new-forward t)
(exit-minibuffer))
(defun isearch-reverse-exit-minibuffer ()
+ "Resume isearching backward from the minibuffer that edits the search string."
(interactive)
(setq isearch-new-forward nil)
(exit-minibuffer))
@@ -1866,11 +1872,12 @@ Subword is used when `subword-mode' is activated. "
(lambda () (let ((inhibit-field-text-motion t))
(line-end-position (if (eolp) 2 1))))))
-(defun isearch-insert-char-by-name ()
- "Read a character by its Unicode name and insert it into search string."
+(defun isearch-char-by-name ()
+ "Read a character by its Unicode name and add it to the search string.
+Completion is available like in `read-char-by-name' used by `insert-char'."
(interactive)
(with-isearch-suspended
- (let ((char (read-char-by-name "Insert character (Unicode name or hex): ")))
+ (let ((char (read-char-by-name "Add character to search (Unicode name or hex): ")))
(when char
(setq isearch-new-string (concat isearch-string (string char))
isearch-new-message (concat isearch-message