aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuri Linkov2007-12-09 23:47:59 +0000
committerJuri Linkov2007-12-09 23:47:59 +0000
commit6e3057bbed906aaeae458b2e4ac5f81f3986edfa (patch)
tree7a736a59e96154310c0018f5829211a31dc30dc1
parent3be42fcdfbb97a7fb33a9c1394e86245e9867bc5 (diff)
downloademacs-6e3057bbed906aaeae458b2e4ac5f81f3986edfa.tar.gz
emacs-6e3057bbed906aaeae458b2e4ac5f81f3986edfa.zip
(search-upper-case): Doc fix.
(isearch-mode-map): Bind `M-s o' to isearch-occur. (isearch-query-replace): Doc fix. Let-bind search-upper-case to nil. (isearch-query-replace-regexp): Doc fix. (isearch-occur): New function.
-rw-r--r--lisp/ChangeLog15
-rw-r--r--lisp/isearch.el27
2 files changed, 38 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b69b8780d20..7c0d17380f3 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,18 @@
12007-12-09 Juri Linkov <juri@jurta.org>
2
3 * replace.el (keep-lines, flush-lines, how-many): Doc fix.
4 Check search-upper-case before calling isearch-no-upper-case-p
5 to set case-fold-search.
6 (occur): Doc fix.
7 (occur-1, perform-replace): Check search-upper-case before calling
8 isearch-no-upper-case-p to set case-fold-search.
9
10 * isearch.el (search-upper-case): Doc fix.
11 (isearch-mode-map): Bind `M-s o' to isearch-occur.
12 (isearch-query-replace): Doc fix. Let-bind search-upper-case to nil.
13 (isearch-query-replace-regexp): Doc fix.
14 (isearch-occur): New function.
15
12007-12-09 Reiner Steib <Reiner.Steib@gmx.de> 162007-12-09 Reiner Steib <Reiner.Steib@gmx.de>
2 17
3 * pgg.el, pgg-parse.el (declare-function): Add new no-op macro for 18 * pgg.el, pgg-parse.el (declare-function): Add new no-op macro for
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 7c5585d6ea6..2c88fea4526 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -96,7 +96,8 @@ that the search has reached."
96That is, upper and lower case chars must match exactly. 96That is, upper and lower case chars must match exactly.
97This applies no matter where the chars come from, but does not 97This applies no matter where the chars come from, but does not
98apply to chars in regexps that are prefixed with `\\'. 98apply to chars in regexps that are prefixed with `\\'.
99If this value is `not-yanks', yanked text is always downcased." 99If this value is `not-yanks', text yanked into the search string
100in Isearch mode is always downcased."
100 :type '(choice (const :tag "off" nil) 101 :type '(choice (const :tag "off" nil)
101 (const not-yanks) 102 (const not-yanks)
102 (other :tag "on" t)) 103 (other :tag "on" t))
@@ -411,6 +412,7 @@ A value of nil means highlight all matches."
411 412
412 (define-key map [?\M-%] 'isearch-query-replace) 413 (define-key map [?\M-%] 'isearch-query-replace)
413 (define-key map [?\C-\M-%] 'isearch-query-replace-regexp) 414 (define-key map [?\C-\M-%] 'isearch-query-replace-regexp)
415 (define-key map "\M-so" 'isearch-occur)
414 416
415 map) 417 map)
416 "Keymap for `isearch-mode'.") 418 "Keymap for `isearch-mode'.")
@@ -1230,11 +1232,14 @@ Use `isearch-exit' to quit without signaling."
1230 (isearch-update)) 1232 (isearch-update))
1231 1233
1232(defun isearch-query-replace (&optional regexp-flag) 1234(defun isearch-query-replace (&optional regexp-flag)
1233 "Start query-replace with string to replace from last search string." 1235 "Start `query-replace' with string to replace from last search string."
1234 (interactive) 1236 (interactive)
1235 (barf-if-buffer-read-only) 1237 (barf-if-buffer-read-only)
1236 (if regexp-flag (setq isearch-regexp t)) 1238 (if regexp-flag (setq isearch-regexp t))
1237 (let ((case-fold-search isearch-case-fold-search)) 1239 (let ((case-fold-search isearch-case-fold-search)
1240 ;; set `search-upper-case' to nil to not call
1241 ;; `isearch-no-upper-case-p' in `perform-replace'
1242 (search-upper-case nil))
1238 (isearch-done) 1243 (isearch-done)
1239 (isearch-clean-overlays) 1244 (isearch-clean-overlays)
1240 (if (and isearch-other-end 1245 (if (and isearch-other-end
@@ -1256,10 +1261,24 @@ Use `isearch-exit' to quit without signaling."
1256 (if (and transient-mark-mode mark-active) (region-end))))) 1261 (if (and transient-mark-mode mark-active) (region-end)))))
1257 1262
1258(defun isearch-query-replace-regexp () 1263(defun isearch-query-replace-regexp ()
1259 "Start query-replace-regexp with string to replace from last search string." 1264 "Start `query-replace-regexp' with string to replace from last search string."
1260 (interactive) 1265 (interactive)
1261 (isearch-query-replace t)) 1266 (isearch-query-replace t))
1262 1267
1268(defun isearch-occur (regexp &optional nlines)
1269 "Run `occur' with regexp to search from the current search string.
1270Interactively, REGEXP is the current search regexp or a quoted search
1271string. NLINES has the same meaning as in `occur'."
1272 (interactive
1273 (list
1274 (if isearch-regexp isearch-string (regexp-quote isearch-string))
1275 (if current-prefix-arg (prefix-numeric-value current-prefix-arg))))
1276 (let ((case-fold-search isearch-case-fold-search)
1277 ;; set `search-upper-case' to nil to not call
1278 ;; `isearch-no-upper-case-p' in `occur-1'
1279 (search-upper-case nil))
1280 (occur regexp nlines)))
1281
1263 1282
1264(defun isearch-delete-char () 1283(defun isearch-delete-char ()
1265 "Discard last input item and move point back. 1284 "Discard last input item and move point back.