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: Thu, 24 Apr 2008 17:59:52 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Stefan Monnier <monnier>        08/04/24 17:59:51

Index: isearch.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/isearch.el,v
retrieving revision 1.318
retrieving revision 1.319
diff -u -b -r1.318 -r1.319
--- isearch.el  22 Apr 2008 20:30:32 -0000      1.318
+++ isearch.el  24 Apr 2008 17:59:51 -0000      1.319
@@ -2137,13 +2137,15 @@
        pos1 pos2)
     (setq pos1 (save-excursion (funcall func string bound noerror)))
     (if (and (char-table-p translation-table-for-input)
-            (> (string-bytes string) len))
-       (let (translated match-data)
-         (dotimes (i len)
-           (let ((x (aref translation-table-for-input (aref string i))))
-             (when x
-               (or translated (setq translated (copy-sequence string)))
-               (aset translated i x))))
+             (multibyte-string-p string)
+             ;; Minor optimization.
+             (string-match-p "[^[:ascii:]]" string))
+       (let ((translated
+               (apply 'string
+                      (mapcar (lambda (c)
+                                (or (aref translation-table-for-input c) c))
+                              string)))
+              match-data)
          (when translated
            (save-match-data
              (save-excursion




reply via email to

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