Mercurial > emacs
comparison lisp/term/x-win.el @ 83560:738ce3540ffb
Merged from emacs@sv.gnu.org
Patches applied:
* emacs@sv.gnu.org/emacs--devo--0--patch-660
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-661
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-662
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-663
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-664
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-665
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-666
Fix read-only prompt problem in isearch
* emacs@sv.gnu.org/emacs--devo--0--patch-667
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-668
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-669
Merge from gnus--rel--5.10
* emacs@sv.gnu.org/emacs--devo--0--patch-670
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-671
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-672
Update from CVS
* emacs@sv.gnu.org/emacs--devo--0--patch-673
Update from CVS
* emacs@sv.gnu.org/gnus--rel--5.10--patch-206
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-207
Merge from emacs--devo--0
* emacs@sv.gnu.org/gnus--rel--5.10--patch-208
Update from CVS
git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-600
author | Karoly Lorentey <karoly@lorentey.hu> |
---|---|
date | Sun, 22 Apr 2007 12:12:29 +0000 |
parents | b8d9a391daf3 318b0d9919a6 |
children | 2716535391b7 |
comparison
equal
deleted
inserted
replaced
83559:edf631bdbb7a | 83560:738ce3540ffb |
---|---|
2205 ;; whichever is more appropriate. Here, we use this heurisitcs. | 2205 ;; whichever is more appropriate. Here, we use this heurisitcs. |
2206 ;; | 2206 ;; |
2207 ;; (1) If their lengthes are different, select the longer one. This | 2207 ;; (1) If their lengthes are different, select the longer one. This |
2208 ;; is because an X client may just cut off unsupported characters. | 2208 ;; is because an X client may just cut off unsupported characters. |
2209 ;; | 2209 ;; |
2210 ;; (2) Otherwise, if the Nth character of CTEXT is an ASCII | 2210 ;; (2) Otherwise, if they are different at Nth character, and that |
2211 ;; character that is different from the Nth character of UTF8, | 2211 ;; of UTF8 is a Latin character and that of CTEXT belongs to a CJK |
2212 ;; select UTF8. This is because an X client may replace unsupported | 2212 ;; character set, select UTF8. Also select UTF8 if the Nth |
2213 ;; characters with some ASCII character (typically ` ' or `?') in | 2213 ;; character of UTF8 is non-ASCII where as that of CTEXT is ASCII. |
2214 ;; CTEXT. | 2214 ;; This is because an X client may replace unsupported characters |
2215 ;; with some ASCII character (typically ` ' or `?') in CTEXT. | |
2215 ;; | 2216 ;; |
2216 ;; (3) Otherwise, select CTEXT. This is because legacy charsets are | 2217 ;; (3) Otherwise, select CTEXT. This is because legacy charsets are |
2217 ;; better for the current Emacs, especially when the selection owner | 2218 ;; better for the current Emacs, especially when the selection owner |
2218 ;; is also Emacs. | 2219 ;; is also Emacs. |
2219 | 2220 |
2224 (i 0) | 2225 (i 0) |
2225 char) | 2226 char) |
2226 (if (/= len-utf8 len-ctext) | 2227 (if (/= len-utf8 len-ctext) |
2227 (if (> len-utf8 len-ctext) utf8 ctext) | 2228 (if (> len-utf8 len-ctext) utf8 ctext) |
2228 (let ((result (compare-strings utf8 0 len-utf8 ctext 0 len-ctext))) | 2229 (let ((result (compare-strings utf8 0 len-utf8 ctext 0 len-ctext))) |
2229 (if (or (eq result t) | 2230 (if (eq result t) |
2230 (>= (aref ctext (1- (abs result))) 128)) | |
2231 ctext | 2231 ctext |
2232 utf8))))) | 2232 (let ((utf8-char (aref utf8 (1- (abs result)))) |
2233 (ctext-char (aref ctext (1- (abs result))))) | |
2234 (if (or (and (aref (char-category-set utf8-char) ?l) | |
2235 (aref (char-category-set ctext-char) ?C)) | |
2236 (and (>= utf8-char 128) | |
2237 (< ctext-char 128))) | |
2238 utf8 | |
2239 ctext))))))) | |
2233 | 2240 |
2234 ;; Get a selection value of type TYPE by calling x-get-selection with | 2241 ;; Get a selection value of type TYPE by calling x-get-selection with |
2235 ;; an appropiate DATA-TYPE argument decidd by `x-select-request-type'. | 2242 ;; an appropiate DATA-TYPE argument decidd by `x-select-request-type'. |
2236 ;; The return value is already decoded. If x-get-selection causes an | 2243 ;; The return value is already decoded. If x-get-selection causes an |
2237 ;; error, this function return nil. | 2244 ;; error, this function return nil. |