diff options
| author | Richard M. Stallman | 1997-12-22 21:33:35 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1997-12-22 21:33:35 +0000 |
| commit | 5c2010f05db343cd12b2c26fc7a63eff82976756 (patch) | |
| tree | 06fe4adbda60be6d5f51f09167d3edc42b3d1703 | |
| parent | ac999fb92ea9f27e0f5ff24e0e98da1448424cbc (diff) | |
| download | emacs-5c2010f05db343cd12b2c26fc7a63eff82976756.tar.gz emacs-5c2010f05db343cd12b2c26fc7a63eff82976756.zip | |
(previous-matching-history-element): Bind
case-fold-search to nil if REGEXP contains an uppercase letter.
(previous-matching-history-element, next-matching-history-element):
Doc fixes.
| -rw-r--r-- | lisp/simple.el | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lisp/simple.el b/lisp/simple.el index 67726a8f6c3..fcb53009dff 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -638,7 +638,8 @@ in this use of the minibuffer.") | |||
| 638 | "Find the previous history element that matches REGEXP. | 638 | "Find the previous history element that matches REGEXP. |
| 639 | \(Previous history elements refer to earlier actions.) | 639 | \(Previous history elements refer to earlier actions.) |
| 640 | With prefix argument N, search for Nth previous match. | 640 | With prefix argument N, search for Nth previous match. |
| 641 | If N is negative, find the next or Nth next match." | 641 | If N is negative, find the next or Nth next match. |
| 642 | An uppercase letter in REGEXP makes the search case-sensitive." | ||
| 642 | (interactive | 643 | (interactive |
| 643 | (let* ((enable-recursive-minibuffers t) | 644 | (let* ((enable-recursive-minibuffers t) |
| 644 | (regexp (read-from-minibuffer "Previous element matching (regexp): " | 645 | (regexp (read-from-minibuffer "Previous element matching (regexp): " |
| @@ -657,6 +658,11 @@ If N is negative, find the next or Nth next match." | |||
| 657 | (null minibuffer-text-before-history)) | 658 | (null minibuffer-text-before-history)) |
| 658 | (setq minibuffer-text-before-history (buffer-string))) | 659 | (setq minibuffer-text-before-history (buffer-string))) |
| 659 | (let ((history (symbol-value minibuffer-history-variable)) | 660 | (let ((history (symbol-value minibuffer-history-variable)) |
| 661 | (case-fold-search | ||
| 662 | (if (isearch-no-upper-case-p regexp t) ; assume isearch.el is dumped | ||
| 663 | ;; Respect the user's setting for case-fold-search: | ||
| 664 | case-fold-search | ||
| 665 | nil)) | ||
| 660 | prevpos | 666 | prevpos |
| 661 | (pos minibuffer-history-position)) | 667 | (pos minibuffer-history-position)) |
| 662 | (while (/= n 0) | 668 | (while (/= n 0) |
| @@ -689,7 +695,8 @@ If N is negative, find the next or Nth next match." | |||
| 689 | "Find the next history element that matches REGEXP. | 695 | "Find the next history element that matches REGEXP. |
| 690 | \(The next history element refers to a more recent action.) | 696 | \(The next history element refers to a more recent action.) |
| 691 | With prefix argument N, search for Nth next match. | 697 | With prefix argument N, search for Nth next match. |
| 692 | If N is negative, find the previous or Nth previous match." | 698 | If N is negative, find the previous or Nth previous match. |
| 699 | An uppercase letter in REGEXP makes the search case-sensitive." | ||
| 693 | (interactive | 700 | (interactive |
| 694 | (let* ((enable-recursive-minibuffers t) | 701 | (let* ((enable-recursive-minibuffers t) |
| 695 | (regexp (read-from-minibuffer "Next element matching (regexp): " | 702 | (regexp (read-from-minibuffer "Next element matching (regexp): " |