]> git.eshelyaron.com Git - emacs.git/commitdiff
(search-upper-case): Doc fix.
authorJuri Linkov <juri@jurta.org>
Sun, 9 Dec 2007 23:47:59 +0000 (23:47 +0000)
committerJuri Linkov <juri@jurta.org>
Sun, 9 Dec 2007 23:47:59 +0000 (23:47 +0000)
(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.

lisp/ChangeLog
lisp/isearch.el

index b69b8780d20f1cd068cf318bdfe24ca86d2c7f8f..7c0d17380f3981ac66733ce12635f96052682127 100644 (file)
@@ -1,3 +1,18 @@
+2007-12-09  Juri Linkov  <juri@jurta.org>
+
+       * replace.el (keep-lines, flush-lines, how-many): Doc fix.
+       Check search-upper-case before calling isearch-no-upper-case-p
+       to set case-fold-search.
+       (occur): Doc fix.
+       (occur-1, perform-replace): Check search-upper-case before calling
+       isearch-no-upper-case-p to set case-fold-search.
+
+       * isearch.el (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.
+
 2007-12-09  Reiner Steib  <Reiner.Steib@gmx.de>
 
        * pgg.el, pgg-parse.el (declare-function): Add new no-op macro for
index 7c5585d6ea6f1fff5b7b84aa128a1f5460144ef8..2c88fea452620bf4976ffd5709194f69134d39c0 100644 (file)
@@ -96,7 +96,8 @@ that the search has reached."
 That is, upper and lower case chars must match exactly.
 This applies no matter where the chars come from, but does not
 apply to chars in regexps that are prefixed with `\\'.
-If this value is `not-yanks', yanked text is always downcased."
+If this value is `not-yanks', text yanked into the search string
+in Isearch mode is always downcased."
   :type '(choice (const :tag "off" nil)
                 (const not-yanks)
                 (other :tag "on" t))
@@ -411,6 +412,7 @@ A value of nil means highlight all matches."
 
     (define-key map [?\M-%] 'isearch-query-replace)
     (define-key map [?\C-\M-%] 'isearch-query-replace-regexp)
+    (define-key map "\M-so" 'isearch-occur)
 
     map)
   "Keymap for `isearch-mode'.")
@@ -1230,11 +1232,14 @@ Use `isearch-exit' to quit without signaling."
   (isearch-update))
 
 (defun isearch-query-replace (&optional regexp-flag)
-  "Start query-replace with string to replace from last search string."
+  "Start `query-replace' with string to replace from last search string."
   (interactive)
   (barf-if-buffer-read-only)
   (if regexp-flag (setq isearch-regexp t))
-  (let ((case-fold-search isearch-case-fold-search))
+  (let ((case-fold-search isearch-case-fold-search)
+       ;; set `search-upper-case' to nil to not call
+       ;; `isearch-no-upper-case-p' in `perform-replace'
+       (search-upper-case nil))
     (isearch-done)
     (isearch-clean-overlays)
     (if (and isearch-other-end
@@ -1256,10 +1261,24 @@ Use `isearch-exit' to quit without signaling."
      (if (and transient-mark-mode mark-active) (region-end)))))
 
 (defun isearch-query-replace-regexp ()
-  "Start query-replace-regexp with string to replace from last search string."
+  "Start `query-replace-regexp' with string to replace from last search string."
   (interactive)
   (isearch-query-replace t))
 
+(defun isearch-occur (regexp &optional nlines)
+  "Run `occur' with regexp to search from the current search string.
+Interactively, REGEXP is the current search regexp or a quoted search
+string.  NLINES has the same meaning as in `occur'."
+  (interactive
+   (list
+    (if isearch-regexp isearch-string (regexp-quote isearch-string))
+    (if current-prefix-arg (prefix-numeric-value current-prefix-arg))))
+  (let ((case-fold-search isearch-case-fold-search)
+       ;; set `search-upper-case' to nil to not call
+       ;; `isearch-no-upper-case-p' in `occur-1'
+       (search-upper-case nil))
+    (occur regexp nlines)))
+
 \f
 (defun isearch-delete-char ()
   "Discard last input item and move point back.