emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] /srv/bzr/emacs/trunk r110000: Use Isearch lax whitespace m


From: Juri Linkov
Subject: [Emacs-diffs] /srv/bzr/emacs/trunk r110000: Use Isearch lax whitespace mode in Info.
Date: Wed, 12 Sep 2012 23:51:46 +0300
User-agent: Bazaar (2.5.0)

------------------------------------------------------------
revno: 110000
committer: Juri Linkov <address@hidden>
branch nick: trunk
timestamp: Wed 2012-09-12 23:51:46 +0300
message:
  Use Isearch lax whitespace mode in Info.
  http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00811.html
  
  * lisp/info.el (Info-search): Don't check for isearch-mode and
  isearch-regexp before let-binding search-spaces-regexp to
  Info-search-whitespace-regexp.
  (Info-isearch-search): Let-bind Info-search-whitespace-regexp to
  search-whitespace-regexp if isearch-lax-whitespace or
  isearch-regexp-lax-whitespace is non-nil.
  (Info-mode): Don't set local variable search-whitespace-regexp.
modified:
  lisp/ChangeLog
  lisp/info.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog    2012-09-12 19:16:36 +0000
+++ b/lisp/ChangeLog    2012-09-12 20:51:46 +0000
@@ -1,3 +1,14 @@
+2012-09-12  Juri Linkov  <address@hidden>
+
+       * info.el (Info-search): Don't check for isearch-mode and
+       isearch-regexp before let-binding search-spaces-regexp to
+       Info-search-whitespace-regexp.
+       (Info-isearch-search): Let-bind Info-search-whitespace-regexp to
+       search-whitespace-regexp if isearch-lax-whitespace or
+       isearch-regexp-lax-whitespace is non-nil.
+       (Info-mode): Don't set local variable search-whitespace-regexp.
+       http://lists.gnu.org/archive/html/emacs-devel/2012-08/msg00811.html
+
 2012-09-12  Stefan Monnier  <address@hidden>
 
        * emacs-lisp/debug.el (debugger-outer-unread-command-char, debug)

=== modified file 'lisp/info.el'
--- a/lisp/info.el      2012-08-28 09:01:54 +0000
+++ b/lisp/info.el      2012-09-12 20:51:46 +0000
@@ -1882,9 +1882,7 @@
          (while (and (not give-up)
                      (or (null found)
                          (not (funcall isearch-filter-predicate beg-found 
found))))
-           (let ((search-spaces-regexp
-                  (if (or (not isearch-mode) isearch-regexp)
-                      Info-search-whitespace-regexp)))
+           (let ((search-spaces-regexp Info-search-whitespace-regexp))
              (if (if backward
                      (re-search-backward regexp bound t)
                    (re-search-forward regexp bound t))
@@ -1904,9 +1902,7 @@
          (if (null Info-current-subfile)
              (if isearch-mode
                  (signal 'search-failed (list regexp "end of manual"))
-               (let ((search-spaces-regexp
-                      (if (or (not isearch-mode) isearch-regexp)
-                          Info-search-whitespace-regexp)))
+               (let ((search-spaces-regexp Info-search-whitespace-regexp))
                  (if backward
                      (re-search-backward regexp)
                    (re-search-forward regexp))))
@@ -1964,9 +1960,7 @@
                (while (and (not give-up)
                            (or (null found)
                                (not (funcall isearch-filter-predicate 
beg-found found))))
-                 (let ((search-spaces-regexp
-                        (if (or (not isearch-mode) isearch-regexp)
-                            Info-search-whitespace-regexp)))
+                 (let ((search-spaces-regexp Info-search-whitespace-regexp))
                    (if (if backward
                            (re-search-backward regexp nil t)
                          (re-search-forward regexp nil t))
@@ -2034,21 +2028,26 @@
 (defun Info-isearch-search ()
   (if Info-isearch-search
       (lambda (string &optional bound noerror count)
-       (Info-search
-        (cond
-         (isearch-word
-          ;; Lax version of word search
-          (let ((lax (not (or isearch-nonincremental
-                              (eq (length string)
-                                  (length (isearch--state-string
-                                           (car isearch-cmds))))))))
-            (if (functionp isearch-word)
-                (funcall isearch-word string lax)
-              (word-search-regexp string lax))))
-         (isearch-regexp string)
-         (t (regexp-quote string)))
-        bound noerror count
-        (unless isearch-forward 'backward))
+       (let ((Info-search-whitespace-regexp
+              (if (if isearch-regexp
+                      isearch-regexp-lax-whitespace
+                    isearch-lax-whitespace)
+                  search-whitespace-regexp)))
+         (Info-search
+          (cond
+           (isearch-word
+            ;; Lax version of word search
+            (let ((lax (not (or isearch-nonincremental
+                                (eq (length string)
+                                    (length (isearch--state-string
+                                             (car isearch-cmds))))))))
+              (if (functionp isearch-word)
+                  (funcall isearch-word string lax)
+                (word-search-regexp string lax))))
+           (isearch-regexp string)
+           (t (regexp-quote string)))
+          bound noerror count
+          (unless isearch-forward 'backward)))
        (point))
     (isearch-search-fun-default)))
 
@@ -4157,8 +4156,6 @@
        'Info-isearch-push-state)
   (set (make-local-variable 'isearch-filter-predicate)
        'Info-isearch-filter)
-  (set (make-local-variable 'search-whitespace-regexp)
-       Info-search-whitespace-regexp)
   (set (make-local-variable 'revert-buffer-function)
        'Info-revert-buffer-function)
   (Info-set-mode-line)


reply via email to

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