aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenichi Handa2004-02-10 03:52:37 +0000
committerKenichi Handa2004-02-10 03:52:37 +0000
commitb040ac646bae3bf6eedba5690222a1afa85275f6 (patch)
treed0cbae862aa29c855d0d0f86c8c1fe68aacb032d
parent4d449b11a059f729d910b13fc906a39455eaccd5 (diff)
downloademacs-b040ac646bae3bf6eedba5690222a1afa85275f6.tar.gz
emacs-b040ac646bae3bf6eedba5690222a1afa85275f6.zip
(x-select-utf8-or-ctext): Use compare-strings instead of while loop.
-rw-r--r--lisp/term/x-win.el12
1 files changed, 5 insertions, 7 deletions
diff --git a/lisp/term/x-win.el b/lisp/term/x-win.el
index 09657fb848f..4b419a57a97 100644
--- a/lisp/term/x-win.el
+++ b/lisp/term/x-win.el
@@ -2178,13 +2178,11 @@ order until succeed.")
2178 char) 2178 char)
2179 (if (/= len-utf8 len-ctext) 2179 (if (/= len-utf8 len-ctext)
2180 (if (> len-utf8 len-ctext) utf8 ctext) 2180 (if (> len-utf8 len-ctext) utf8 ctext)
2181 (while (< i len-utf8) 2181 (let ((result (compare-strings utf8 0 len-utf8 ctext 0 len-ctext)))
2182 (setq char (aref ctext i)) 2182 (if (or (eq result t)
2183 (if (and (< char 128) (/= char (aref utf8 i))) 2183 (>= (aref ctext (1- (abs result))) 128))
2184 (setq selected utf8 2184 ctext
2185 i len-utf8) 2185 utf8)))))
2186 (setq i (1+ i))))
2187 selected)))
2188 2186
2189(defun x-selection-value (type) 2187(defun x-selection-value (type)
2190 (let (text) 2188 (let (text)