From 9483d601ec99cd2c786d593005653dfab196d7de Mon Sep 17 00:00:00 2001 From: "Richard M. Stallman" Date: Sun, 4 May 1997 01:20:08 +0000 Subject: [PATCH] (occur): If regexp has uppercase in it, match it case-sensitively. --- lisp/replace.el | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/replace.el b/lisp/replace.el index 24411f4739f..30109b87ba7 100644 --- a/lisp/replace.el +++ b/lisp/replace.el @@ -348,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 @@ -371,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) -- 2.39.5