+2012-09-12 Juri Linkov <juri@jurta.org>
+
+ * 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 <monnier@iro.umontreal.ca>
* emacs-lisp/debug.el (debugger-outer-unread-command-char, debug)
(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))
(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))))
(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))
(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)))
'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)