]> code.delx.au - gnu-emacs/blobdiff - lisp/replace.el
Say "standard settings" instead of "factory settings".
[gnu-emacs] / lisp / replace.el
index 0cb0f0486c5358839a42d0916808c713e29fcd66..30109b87ba72f4ffe4853b85a06d9c167b5ef5a8 100644 (file)
@@ -148,7 +148,9 @@ This function is usually the wrong thing to use in a Lisp program.
 What you probably want is a loop like this:
   (while (search-forward FROM-STRING nil t)
     (replace-match TO-STRING nil t))
-which will run faster and will not set the mark or print anything."
+which will run faster and will not set the mark or print anything.
+\(You may need a more complex loop if FROM-STRING can match the null string
+and TO-STRING is also null.)"
   (interactive (query-replace-read-args "Replace string" nil))
   (perform-replace from-string to-string nil nil delimited))
 
@@ -346,7 +348,10 @@ Interactively it is the prefix arg.
 
 The lines are shown in a buffer named `*Occur*'.
 It serves as a menu to find any of the occurrences in this buffer.
-\\[describe-mode] in that buffer will explain how."
+\\[describe-mode] in that buffer will explain how.
+
+If REGEXP contains upper case characters (excluding those preceded by
+\\), the matching is case-sensitive."
   (interactive
    (list (let* ((default (car regexp-history))
                (input
@@ -369,6 +374,8 @@ It serves as a menu to find any of the occurrences in this buffer.
        (dir default-directory)
        (linenum 1)
        (prevpos (point-min))
+       (case-fold-search  (and case-fold-search
+                               (isearch-no-upper-case-p regexp t)))
        (final-context-start (make-marker)))
 ;;;    (save-excursion
 ;;;      (beginning-of-line)