emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: isearch magic space


From: Chong Yidong
Subject: Re: isearch magic space
Date: Tue, 15 Mar 2005 10:00:03 -0500 (EST)
User-agent: SquirrelMail/1.4.3a

> I like the idea of using a space to match any whitespace in plain
> non-regexp isearch.  However, it should be nil by default to preserve
> the default behavior for users who don't expect such a change.

That is fine.

> Also there should be an easy way to put a literal space into the
> search string.  In regexp isearch this can be done with C-q SPC.

It is actually easy to extend this to string search, by making an
additional small tweak to isearch-quote-char:

*** 1768,1774 ****
      ;; Assume character codes 0200 - 0377 stand for characters in some
      ;; single-byte character set, and convert them to Emacs
      ;; characters.
!     (if (and isearch-regexp (= char ?\ ))
        (if (subregexp-context-p isearch-string (length isearch-string))
            (isearch-process-search-string "[ ]" " ")
          (isearch-process-search-char char))
--- 1777,1783 ----
      ;; Assume character codes 0200 - 0377 stand for characters in some
      ;; single-byte character set, and convert them to Emacs
      ;; characters.
!     (if (and (not isearch-word) (= char ?\ ))
        (if (subregexp-context-p isearch-string (length isearch-string))
            (isearch-process-search-string "[ ]" " ")
          (isearch-process-search-char char))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]