changeset 102029:3223937a77f8

(isearch-search-string): Use `with-no-warnings' around forms that refer to translation-table-for-input.
author Eli Zaretskii <eliz@gnu.org>
date Sat, 14 Feb 2009 09:04:46 +0000
parents a141297219f8
children 1e6acde5f33a
files lisp/isearch.el
diffstat 1 files changed, 13 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/isearch.el	Sat Feb 14 09:03:19 2009 +0000
+++ b/lisp/isearch.el	Sat Feb 14 09:04:46 2009 +0000
@@ -2214,14 +2214,22 @@
   (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))
+    (when (and
+	   ;; Avoid "obsolete" warnings for translation-table-for-input.
+	   (with-no-warnings
+	     (char-table-p translation-table-for-input))
+	   (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))
+                              (or
+			       ;; Avoid "obsolete" warnings for
+			       ;; translation-table-for-input.
+			       (with-no-warnings
+				 (aref translation-table-for-input c))
+			       c))
                             string)))
             match-data)
         (when translated