emacs-pretest-bug
[Top][All Lists]
Advanced

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

Re: space in regexp-search


From: Juri Linkov
Subject: Re: space in regexp-search
Date: Fri, 17 Feb 2006 23:59:07 +0200
User-agent: Gnus/5.110004 (No Gnus v0.4) Emacs/22.0.50 (gnu/linux)

> The right way to do what you want is to set search-whitespace-regexp
> to nil.  I will make this change in the doc string and custom type to
> make it clearer.

BTW, it seems the following fix is necessary for isearch on Info manuals,
because currently it uses Info-search-whitespace-regexp even for non-regexp
Info isearch, and it is not possible to use `C-q SPC' to search for
a literal space.  I think everyone wanting to take the advantage of
Info-search-whitespace-regexp to use SPC for a sequence of whitespace chars,
can start isearch with M-C-s instead of C-s.

Index: lisp/info.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/info.el,v
retrieving revision 1.479
diff -c -r1.479 info.el
*** lisp/info.el        17 Feb 2006 21:55:10 -0000      1.479
--- lisp/info.el        17 Feb 2006 21:57:34 -0000
***************
*** 1642,1648 ****
                              (and (search-backward "\^_" nil t)
                                   (looking-at
                                    "\^_\n\\(Tag Table\\|Local 
Variables\\)"))))))
!           (let ((search-spaces-regexp Info-search-whitespace-regexp))
              (if (if backward
                      (re-search-backward regexp bound t)
                    (re-search-forward regexp bound t))
--- 1642,1650 ----
                              (and (search-backward "\^_" nil t)
                                   (looking-at
                                    "\^_\n\\(Tag Table\\|Local 
Variables\\)"))))))
!           (let ((search-spaces-regexp
!                  (if (or (not isearch-mode) isearch-regexp)
!                      Info-search-whitespace-regexp)))
              (if (if backward
                      (re-search-backward regexp bound t)
                    (re-search-forward regexp bound t))
***************
*** 1660,1666 ****
        ;; If no subfiles, give error now.
        (if give-up
          (if (null Info-current-subfile)
!             (let ((search-spaces-regexp Info-search-whitespace-regexp))
                (if backward
                    (re-search-backward regexp)
                  (re-search-forward regexp)))
--- 1662,1670 ----
        ;; If no subfiles, give error now.
        (if give-up
          (if (null Info-current-subfile)
!             (let ((search-spaces-regexp
!                    (if (or (not isearch-mode) isearch-regexp)
!                        Info-search-whitespace-regexp)))
                (if backward
                    (re-search-backward regexp)
                  (re-search-forward regexp)))
***************
*** 1731,1737 ****
                                    (and (search-backward "\^_" nil t)
                                         (looking-at
                                          "\^_\n\\(Tag Table\\|Local 
Variables\\)"))))))
!                 (let ((search-spaces-regexp Info-search-whitespace-regexp))
                    (if (if backward
                            (re-search-backward regexp nil t)
                          (re-search-forward regexp nil t))
--- 1735,1743 ----
                                    (and (search-backward "\^_" nil t)
                                         (looking-at
                                          "\^_\n\\(Tag Table\\|Local 
Variables\\)"))))))
!                 (let ((search-spaces-regexp
!                        (if (or (not isearch-mode) isearch-regexp)
!                            Info-search-whitespace-regexp)))
                    (if (if backward
                            (re-search-backward regexp nil t)
                          (re-search-forward regexp nil t))

-- 
Juri Linkov
http://www.jurta.org/emacs/





reply via email to

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