aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorRichard M. Stallman2004-12-03 00:30:33 +0000
committerRichard M. Stallman2004-12-03 00:30:33 +0000
commitab67e8b694d6a3ec89f300208058e07588a28e85 (patch)
tree1e550ca1b531e9948fdd3cb5c38c692c4fb582ab /lisp
parent237470e87b72dccf5a8eecc95882fbe5cf996d3b (diff)
downloademacs-ab67e8b694d6a3ec89f300208058e07588a28e85.tar.gz
emacs-ab67e8b694d6a3ec89f300208058e07588a28e85.zip
(search-whitespace-regexp): Remove the group. Doc fix.
(isearch-mode-map): No special definition for space. (isearch-whitespace-chars): Command deleted. (isearch-forward-regexp): Doc fix. (isearch-quote-char): When a space is not inside brackets, use `[ ]' instead of just space. (isearch-lazy-highlight-search): Bind search-spaces-regexp.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog36
-rw-r--r--lisp/isearch.el57
2 files changed, 63 insertions, 30 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 7817a5d647d..b1404fc4c3e 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,38 @@
12004-12-02 Richard M. Stallman <rms@gnu.org>
2
3 * isearch.el (search-whitespace-regexp): Remove the group. Doc fix.
4 (isearch-mode-map): No special definition for space.
5 (isearch-whitespace-chars): Command deleted.
6 (isearch-forward-regexp): Doc fix.
7 (isearch-quote-char): When a space is not inside brackets,
8 use `[ ]' instead of just space.
9 (isearch-lazy-highlight-search): Bind search-spaces-regexp.
10
11 * imenu.el (imenu--generic-function): Delete code to exclude
12 matches in comments.
13
14 * man.el (Man-reverse-face): Change default to `highlight'.
15
16 * replace.el (occur-1): Specify t for KEEP-PROPS to occur-engine.
17 (occur-engine): Use `face' prop rather than `font-lock-face'
18 when specifying use of `match-face'.
19 (occur-accumulate-lines): Change arg from NO-PROPS to KEEP-PROPS.
20
21 * emacs-lisp/elint.el (elint-standard-variables): Update list.
22
23 * add-log.el (add-log-current-defun): Handle the case where point
24 is in the header part of a DEFUN construct.
25
262004-12-02 Dave Love <fx@gnu.org>
27
28 * progmodes/python.el (python-font-lock-syntactic-keywords):
29 Fix previous change.
30
312004-12-02 Richard G Bielawski <Richard.G.Bielawski@wellsfargo.com> (tiny change)
32
33 * paren.el (show-paren-function): Check for matching chars
34 specified by text props.
35
12004-12-02 Jay Belanger <belanger@truman.edu> 362004-12-02 Jay Belanger <belanger@truman.edu>
2 37
3 * calc/calc.el (calc-read-key-sequence): Leave the old message visible 38 * calc/calc.el (calc-read-key-sequence): Leave the old message visible
@@ -83,7 +118,6 @@
83 * textmodes/tex-mode.el (tex-main-file): Add a compatibility with 118 * textmodes/tex-mode.el (tex-main-file): Add a compatibility with
84 AUCTeX. 119 AUCTeX.
85 120
86>>>>>>> 1.6704
872004-11-30 Jay Belanger <belanger@truman.edu> 1212004-11-30 Jay Belanger <belanger@truman.edu>
88 122
89 * calc/calc-arith.el (math-possible-signs): Made stronger checks 123 * calc/calc-arith.el (math-possible-signs): Made stronger checks
diff --git a/lisp/isearch.el b/lisp/isearch.el
index 45ac5b4d286..1057547cb3f 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -109,12 +109,14 @@ string, and RET terminates editing and does a nonincremental search."
109 :type 'boolean 109 :type 'boolean
110 :group 'isearch) 110 :group 'isearch)
111 111
112(defcustom search-whitespace-regexp "\\(?:\\s-+\\)" 112(defcustom search-whitespace-regexp "\\s-+"
113 "*If non-nil, regular expression to match a sequence of whitespace chars. 113 "*If non-nil, regular expression to match a sequence of whitespace chars.
114This applies to regular expression incremental search. 114This applies to regular expression incremental search.
115You might want to use something like \"\\\\(?:[ \\t\\r\\n]+\\\\)\" instead. 115When you put a space or spaces in the incremental regexp, it stands for
116In the Customization buffer, that is `\\(?:[' followed by a space, 116this, unless it is inside of a regexp construct such as [...] or *, + or ?.
117a tab, a carriage return (control-M), a newline, and `]+\\)'." 117You might want to use something like \"[ \\t\\r\\n]+\" instead.
118In the Customization buffer, that is `[' followed by a space,
119a tab, a carriage return (control-M), a newline, and `]+'."
118 :type 'regexp 120 :type 'regexp
119 :group 'isearch) 121 :group 'isearch)
120 122
@@ -260,8 +262,6 @@ Default value, nil, means edit the string instead."
260 (define-key map "\r" 'isearch-exit) 262 (define-key map "\r" 'isearch-exit)
261 (define-key map "\C-j" 'isearch-printing-char) 263 (define-key map "\C-j" 'isearch-printing-char)
262 (define-key map "\t" 'isearch-printing-char) 264 (define-key map "\t" 'isearch-printing-char)
263 (define-key map " " 'isearch-whitespace-chars)
264 (define-key map [?\S-\ ] 'isearch-whitespace-chars)
265 265
266 (define-key map "\C-w" 'isearch-yank-word-or-char) 266 (define-key map "\C-w" 'isearch-yank-word-or-char)
267 (define-key map "\M-\C-w" 'isearch-del-char) 267 (define-key map "\M-\C-w" 'isearch-del-char)
@@ -485,7 +485,12 @@ the calling function until the search is done."
485Do incremental search forward for regular expression. 485Do incremental search forward for regular expression.
486With a prefix argument, do a regular string search instead. 486With a prefix argument, do a regular string search instead.
487Like ordinary incremental search except that your input 487Like ordinary incremental search except that your input
488is treated as a regexp. See \\[isearch-forward] for more info." 488is treated as a regexp. See \\[isearch-forward] for more info.
489
490In regexp incremental searches, a space or spaces normally matches
491any whitespace (the variable `search-whitespace-regexp' controls
492precisely what that means). If you want to search for a literal space
493and nothing else, enter `[ ]'."
489 (interactive "P\np") 494 (interactive "P\np")
490 (isearch-mode t (null not-regexp) nil (not no-recursive-edit))) 495 (isearch-mode t (null not-regexp) nil (not no-recursive-edit)))
491 496
@@ -1676,11 +1681,19 @@ Isearch mode."
1676 ;; Assume character codes 0200 - 0377 stand for characters in some 1681 ;; Assume character codes 0200 - 0377 stand for characters in some
1677 ;; single-byte character set, and convert them to Emacs 1682 ;; single-byte character set, and convert them to Emacs
1678 ;; characters. 1683 ;; characters.
1679 (and enable-multibyte-characters 1684 (if (and isearch-regexp (= char ?\ ))
1680 (>= char ?\200) 1685 (if (condition-case err
1681 (<= char ?\377) 1686 (progn
1682 (setq char (unibyte-char-to-multibyte char))) 1687 (string-match isearch-string "")
1683 (isearch-process-search-char char))) 1688 nil)
1689 (error (equal (cadr err) "Unmatched [ or [^")))
1690 (isearch-process-search-char char)
1691 (isearch-process-search-string "[ ]" " "))
1692 (and enable-multibyte-characters
1693 (>= char ?\200)
1694 (<= char ?\377)
1695 (setq char (unibyte-char-to-multibyte char)))
1696 (isearch-process-search-char char))))
1684 1697
1685(defun isearch-return-char () 1698(defun isearch-return-char ()
1686 "Convert return into newline for incremental search. 1699 "Convert return into newline for incremental search.
@@ -1704,22 +1717,6 @@ Obsolete."
1704 (isearch-process-search-multibyte-characters char) 1717 (isearch-process-search-multibyte-characters char)
1705 (isearch-process-search-char char))))) 1718 (isearch-process-search-char char)))))
1706 1719
1707(defun isearch-whitespace-chars ()
1708 "Match all whitespace chars, if in regexp mode.
1709If you want to search for just a space, type \\<isearch-mode-map>\\[isearch-quote-char] SPC."
1710 (interactive)
1711 (if isearch-regexp
1712 (if (and search-whitespace-regexp (not isearch-within-brackets)
1713 (not isearch-invalid-regexp))
1714 (isearch-process-search-string search-whitespace-regexp " ")
1715 (isearch-printing-char))
1716 (progn
1717 ;; This way of doing word search doesn't correctly extend current search.
1718 ;; (setq isearch-word t)
1719 ;; (setq isearch-adjusted t)
1720 ;; (goto-char isearch-barrier)
1721 (isearch-printing-char))))
1722
1723(defun isearch-process-search-char (char) 1720(defun isearch-process-search-char (char)
1724 ;; Append the char to the search string, update the message and re-search. 1721 ;; Append the char to the search string, update the message and re-search.
1725 (isearch-process-search-string 1722 (isearch-process-search-string
@@ -1960,6 +1957,7 @@ Can be changed via `isearch-search-fun-function' for special needs."
1960 (let ((inhibit-point-motion-hooks search-invisible) 1957 (let ((inhibit-point-motion-hooks search-invisible)
1961 (inhibit-quit nil) 1958 (inhibit-quit nil)
1962 (case-fold-search isearch-case-fold-search) 1959 (case-fold-search isearch-case-fold-search)
1960 (search-spaces-regexp search-whitespace-regexp)
1963 (retry t)) 1961 (retry t))
1964 (if isearch-regexp (setq isearch-invalid-regexp nil)) 1962 (if isearch-regexp (setq isearch-invalid-regexp nil))
1965 (setq isearch-within-brackets nil) 1963 (setq isearch-within-brackets nil)
@@ -2373,7 +2371,8 @@ search string to change or the window to scroll)."
2373(defun isearch-lazy-highlight-search () 2371(defun isearch-lazy-highlight-search ()
2374 "Search ahead for the next or previous match, for lazy highlighting. 2372 "Search ahead for the next or previous match, for lazy highlighting.
2375Attempt to do the search exactly the way the pending isearch would." 2373Attempt to do the search exactly the way the pending isearch would."
2376 (let ((case-fold-search isearch-case-fold-search)) 2374 (let ((case-fold-search isearch-case-fold-search)
2375 (search-spaces-regexp search-whitespace-regexp))
2377 (funcall (isearch-search-fun) 2376 (funcall (isearch-search-fun)
2378 isearch-string 2377 isearch-string
2379 (if isearch-forward 2378 (if isearch-forward