1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-26 19:18:50 +00:00

(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.
This commit is contained in:
Richard M. Stallman 2004-12-03 00:30:33 +00:00
parent 237470e87b
commit ab67e8b694
3 changed files with 80 additions and 30 deletions

View File

@ -1,3 +1,38 @@
2004-12-02 Richard M. Stallman <rms@gnu.org>
* isearch.el (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.
* imenu.el (imenu--generic-function): Delete code to exclude
matches in comments.
* man.el (Man-reverse-face): Change default to `highlight'.
* replace.el (occur-1): Specify t for KEEP-PROPS to occur-engine.
(occur-engine): Use `face' prop rather than `font-lock-face'
when specifying use of `match-face'.
(occur-accumulate-lines): Change arg from NO-PROPS to KEEP-PROPS.
* emacs-lisp/elint.el (elint-standard-variables): Update list.
* add-log.el (add-log-current-defun): Handle the case where point
is in the header part of a DEFUN construct.
2004-12-02 Dave Love <fx@gnu.org>
* progmodes/python.el (python-font-lock-syntactic-keywords):
Fix previous change.
2004-12-02 Richard G Bielawski <Richard.G.Bielawski@wellsfargo.com> (tiny change)
* paren.el (show-paren-function): Check for matching chars
specified by text props.
2004-12-02 Jay Belanger <belanger@truman.edu>
* calc/calc.el (calc-read-key-sequence): Leave the old message visible
@ -83,7 +118,6 @@
* textmodes/tex-mode.el (tex-main-file): Add a compatibility with
AUCTeX.
>>>>>>> 1.6704
2004-11-30 Jay Belanger <belanger@truman.edu>
* calc/calc-arith.el (math-possible-signs): Made stronger checks

View File

@ -109,12 +109,14 @@ string, and RET terminates editing and does a nonincremental search."
:type 'boolean
:group 'isearch)
(defcustom search-whitespace-regexp "\\(?:\\s-+\\)"
(defcustom search-whitespace-regexp "\\s-+"
"*If non-nil, regular expression to match a sequence of whitespace chars.
This applies to regular expression incremental search.
You might want to use something like \"\\\\(?:[ \\t\\r\\n]+\\\\)\" instead.
In the Customization buffer, that is `\\(?:[' followed by a space,
a tab, a carriage return (control-M), a newline, and `]+\\)'."
When you put a space or spaces in the incremental regexp, it stands for
this, unless it is inside of a regexp construct such as [...] or *, + or ?.
You might want to use something like \"[ \\t\\r\\n]+\" instead.
In the Customization buffer, that is `[' followed by a space,
a tab, a carriage return (control-M), a newline, and `]+'."
:type 'regexp
:group 'isearch)
@ -260,8 +262,6 @@ Default value, nil, means edit the string instead."
(define-key map "\r" 'isearch-exit)
(define-key map "\C-j" 'isearch-printing-char)
(define-key map "\t" 'isearch-printing-char)
(define-key map " " 'isearch-whitespace-chars)
(define-key map [?\S-\ ] 'isearch-whitespace-chars)
(define-key map "\C-w" 'isearch-yank-word-or-char)
(define-key map "\M-\C-w" 'isearch-del-char)
@ -485,7 +485,12 @@ the calling function until the search is done."
Do incremental search forward for regular expression.
With a prefix argument, do a regular string search instead.
Like ordinary incremental search except that your input
is treated as a regexp. See \\[isearch-forward] for more info."
is treated as a regexp. See \\[isearch-forward] for more info.
In regexp incremental searches, a space or spaces normally matches
any whitespace (the variable `search-whitespace-regexp' controls
precisely what that means). If you want to search for a literal space
and nothing else, enter `[ ]'."
(interactive "P\np")
(isearch-mode t (null not-regexp) nil (not no-recursive-edit)))
@ -1676,11 +1681,19 @@ Isearch mode."
;; Assume character codes 0200 - 0377 stand for characters in some
;; single-byte character set, and convert them to Emacs
;; characters.
(and enable-multibyte-characters
(>= char ?\200)
(<= char ?\377)
(setq char (unibyte-char-to-multibyte char)))
(isearch-process-search-char char)))
(if (and isearch-regexp (= char ?\ ))
(if (condition-case err
(progn
(string-match isearch-string "")
nil)
(error (equal (cadr err) "Unmatched [ or [^")))
(isearch-process-search-char char)
(isearch-process-search-string "[ ]" " "))
(and enable-multibyte-characters
(>= char ?\200)
(<= char ?\377)
(setq char (unibyte-char-to-multibyte char)))
(isearch-process-search-char char))))
(defun isearch-return-char ()
"Convert return into newline for incremental search.
@ -1704,22 +1717,6 @@ Obsolete."
(isearch-process-search-multibyte-characters char)
(isearch-process-search-char char)))))
(defun isearch-whitespace-chars ()
"Match all whitespace chars, if in regexp mode.
If you want to search for just a space, type \\<isearch-mode-map>\\[isearch-quote-char] SPC."
(interactive)
(if isearch-regexp
(if (and search-whitespace-regexp (not isearch-within-brackets)
(not isearch-invalid-regexp))
(isearch-process-search-string search-whitespace-regexp " ")
(isearch-printing-char))
(progn
;; This way of doing word search doesn't correctly extend current search.
;; (setq isearch-word t)
;; (setq isearch-adjusted t)
;; (goto-char isearch-barrier)
(isearch-printing-char))))
(defun isearch-process-search-char (char)
;; Append the char to the search string, update the message and re-search.
(isearch-process-search-string
@ -1960,6 +1957,7 @@ Can be changed via `isearch-search-fun-function' for special needs."
(let ((inhibit-point-motion-hooks search-invisible)
(inhibit-quit nil)
(case-fold-search isearch-case-fold-search)
(search-spaces-regexp search-whitespace-regexp)
(retry t))
(if isearch-regexp (setq isearch-invalid-regexp nil))
(setq isearch-within-brackets nil)
@ -2373,7 +2371,8 @@ search string to change or the window to scroll)."
(defun isearch-lazy-highlight-search ()
"Search ahead for the next or previous match, for lazy highlighting.
Attempt to do the search exactly the way the pending isearch would."
(let ((case-fold-search isearch-case-fold-search))
(let ((case-fold-search isearch-case-fold-search)
(search-spaces-regexp search-whitespace-regexp))
(funcall (isearch-search-fun)
isearch-string
(if isearch-forward

View File

@ -1,3 +1,20 @@
2004-12-02 Richard M. Stallman <rms@gnu.org>
* config.in (RE_TRANSLATE_P): If make_number is not a macro,
don't use it here.
* eval.c (Fcalled_interactively_p): Don't check INTERACTIVE.
(interactive_p): Skip Scalled_interactively_p frames
like Sinteractive_p frames.
* data.c (Fmake_variable_buffer_local): Doc fix.
(Fmake_local_variable): Doc fix.
* insdel.c (insert_from_string_before_markers)
(insert_from_string): Don't modify buffer on empty insertion.
* window.c (Fget_lru_window, Fget_largest_window): Doc fixes.
2004-12-01 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* macmenu.c (add_menu_item): Fallback on MacRoman if encoding