all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* isearch magic space
@ 2005-03-15 11:14 Chong Yidong
  2005-03-15 13:09 ` Juri Linkov
  2005-03-18  3:18 ` Miles Bader
  0 siblings, 2 replies; 5+ messages in thread
From: Chong Yidong @ 2005-03-15 11:14 UTC (permalink / raw)


Some time ago, I proposed providing a magic space for ordinary isearch. 
The response was generally favorable, but my papers were not in order, so
the patch could not be applied.  My copyright assignment is settled now;
can the patch be applied, or is it too late?



*** emacs/lisp/isearch.el~	Tue Mar 15 19:06:42 2005
--- emacs/lisp/isearch.el	Tue Mar 15 19:15:49 2005
***************
*** 109,114 ****
--- 109,123 ----
    :type 'boolean
    :group 'isearch)

+ (defcustom search-string-whitespace-regexp "[ \t\r\n]+"
+   "*If non-nil, regular expression to match a sequence of whitespace chars.
+ This applies to ordinary (string) incremental search.  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 ?."
+   :type 'regexp
+   :group 'isearch)
+
  (defcustom search-whitespace-regexp "\\s-+"
    "*If non-nil, regular expression to match a sequence of whitespace chars.
  This applies to regular expression incremental search.
***************
*** 2027,2033 ****
       (isearch-regexp
        (if isearch-forward 're-search-forward 're-search-backward))
       (t
!       (if isearch-forward 'search-forward 'search-backward)))))

  (defun isearch-search ()
    ;; Do the search with the current search string.
--- 2036,2051 ----
       (isearch-regexp
        (if isearch-forward 're-search-forward 're-search-backward))
       (t
!       (if isearch-forward
!           'isearch-search-forward 'isearch-search-backward)))))
!
! (defun isearch-search-forward (string &optional bound noerror count)
!   (let ((search-spaces-regexp search-string-whitespace-regexp))
!     (re-search-forward (regexp-quote string) bound noerror count)))
!
! (defun isearch-search-backward (string &optional bound noerror count)
!   (let ((search-spaces-regexp search-string-whitespace-regexp))
!     (re-search-backward (regexp-quote string) bound noerror count)))

  (defun isearch-search ()
    ;; Do the search with the current search string.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-03-18  3:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-03-15 11:14 isearch magic space Chong Yidong
2005-03-15 13:09 ` Juri Linkov
2005-03-15 15:00   ` Chong Yidong
2005-03-15 15:05     ` Chong Yidong
2005-03-18  3:18 ` Miles Bader

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.