emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/isearch.el,v


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/isearch.el,v
Date: Fri, 21 Nov 2008 05:32:10 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/11/21 05:32:10

Index: isearch.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/isearch.el,v
retrieving revision 1.336
retrieving revision 1.337
diff -u -b -r1.336 -r1.337
--- isearch.el  17 Nov 2008 00:42:46 -0000      1.336
+++ isearch.el  21 Nov 2008 05:32:09 -0000      1.337
@@ -2212,14 +2212,13 @@
       (if isearch-forward 'search-forward 'search-backward)))))
 
 (defun isearch-search-string (string bound noerror)
-  ;; Search for the first occurance of STRING or its translation.  If
-  ;; found, move point to the end of the occurance, update
-  ;; isearch-match-beg and isearch-match-end, and return point.
-  (let ((func (isearch-search-fun))
-       (len (length string))
-       pos1 pos2)
-    (setq pos1 (save-excursion (funcall func string bound noerror)))
-    (if (and (char-table-p translation-table-for-input)
+  "Search for the first occurance of STRING or its translation.  If
+found, move point to the end of the occurance, update
+isearch-match-beg and isearch-match-end, and return point."
+  (let* ((func (isearch-search-fun))
+         (pos1 (save-excursion (funcall func string bound noerror)))
+         pos2)
+    (when (and (char-table-p translation-table-for-input)
              (multibyte-string-p string)
              ;; Minor optimization.
              (string-match-p "[^[:ascii:]]" string))
@@ -2245,8 +2244,8 @@
       (if (and multi-isearch-next-buffer-current-function
               (buffer-live-p multi-isearch-current-buffer))
          (switch-to-buffer multi-isearch-current-buffer))
-      (goto-char pos1))
-    pos1))
+      (goto-char pos1)
+      pos1)))
 
 (defun isearch-search ()
   ;; Do the search with the current search string.




reply via email to

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