diff options
| author | YAMAMOTO Mitsuharu | 2006-06-16 08:07:59 +0000 |
|---|---|---|
| committer | YAMAMOTO Mitsuharu | 2006-06-16 08:07:59 +0000 |
| commit | 05d3aeb016e4026ab0b72fbac54e1aebd00cbb0e (patch) | |
| tree | af45985f54c14e7fe470292754161f5abb866d57 /lisp/term | |
| parent | 2d4a5c50442fa1758862aa4084c730b7916d8fd4 (diff) | |
| download | emacs-05d3aeb016e4026ab0b72fbac54e1aebd00cbb0e.tar.gz emacs-05d3aeb016e4026ab0b72fbac54e1aebd00cbb0e.zip | |
(mac-text-encoding-ascii): New constant.
(mac-utxt-to-string): Use it.
(mac-ts-update-active-input-area): Use mac-ae-number.
Diffstat (limited to 'lisp/term')
| -rw-r--r-- | lisp/term/mac-win.el | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 5c546f77d33..7ab9ac9481f 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el | |||
| @@ -1249,6 +1249,9 @@ correspoinding TextEncodingBase value." | |||
| 1249 | 1249 | ||
| 1250 | ;;;; Conversion between common flavors and Lisp string. | 1250 | ;;;; Conversion between common flavors and Lisp string. |
| 1251 | 1251 | ||
| 1252 | (defconst mac-text-encoding-ascii #x600 | ||
| 1253 | "ASCII text encoding.") | ||
| 1254 | |||
| 1252 | (defconst mac-text-encoding-mac-japanese-basic-variant #x20001 | 1255 | (defconst mac-text-encoding-mac-japanese-basic-variant #x20001 |
| 1253 | "MacJapanese text encoding without Apple double-byte extensions.") | 1256 | "MacJapanese text encoding without Apple double-byte extensions.") |
| 1254 | 1257 | ||
| @@ -1269,7 +1272,7 @@ correspoinding TextEncodingBase value." | |||
| 1269 | (if (string-match "[\xa0\xfd-\xff]" str) | 1272 | (if (string-match "[\xa0\xfd-\xff]" str) |
| 1270 | (setq str nil) | 1273 | (setq str nil) |
| 1271 | ;; ASCII-only? | 1274 | ;; ASCII-only? |
| 1272 | (unless (string-match "\\`[[:ascii:]]*\\'" str) | 1275 | (unless (mac-code-convert-string data nil mac-text-encoding-ascii) |
| 1273 | (subst-char-in-string ?\x5c ?\¥ str t) | 1276 | (subst-char-in-string ?\x5c ?\¥ str t) |
| 1274 | (subst-char-in-string ?\x80 ?\\ str t))))) | 1277 | (subst-char-in-string ?\x80 ?\\ str t))))) |
| 1275 | (or str | 1278 | (or str |
| @@ -1965,8 +1968,7 @@ either in the current buffer or in the echo area." | |||
| 1965 | (coding (or (cdr (assq (car script-language) | 1968 | (coding (or (cdr (assq (car script-language) |
| 1966 | mac-script-code-coding-systems)) | 1969 | mac-script-code-coding-systems)) |
| 1967 | 'mac-roman)) | 1970 | 'mac-roman)) |
| 1968 | (fix-len (mac-bytes-to-integer | 1971 | (fix-len (mac-ae-number ae "tsfx")) |
| 1969 | (cdr (mac-ae-parameter ae "tsfx" "long")))) | ||
| 1970 | ;; Optional parameters | 1972 | ;; Optional parameters |
| 1971 | (hilite-rng (mac-ae-text-range-array ae "tshi")) | 1973 | (hilite-rng (mac-ae-text-range-array ae "tshi")) |
| 1972 | (update-rng (mac-ae-text-range-array ae "tsup")) | 1974 | (update-rng (mac-ae-text-range-array ae "tsup")) |
| @@ -2008,15 +2010,15 @@ either in the current buffer or in the echo area." | |||
| 2008 | (put-text-property 0 (length active-input-string) | 2010 | (put-text-property 0 (length active-input-string) |
| 2009 | 'mac-ts-active-input-string t active-input-string) | 2011 | 'mac-ts-active-input-string t active-input-string) |
| 2010 | (if use-echo-area | 2012 | (if use-echo-area |
| 2011 | (let (msg message-log-max) | 2013 | (let ((msg (current-message)) |
| 2012 | (if (and (current-message) | 2014 | message-log-max) |
| 2015 | (if (and msg | ||
| 2013 | ;; Don't get confused by previously displayed | 2016 | ;; Don't get confused by previously displayed |
| 2014 | ;; `active-input-string'. | 2017 | ;; `active-input-string'. |
| 2015 | (null (get-text-property 0 'mac-ts-active-input-string | 2018 | (null (get-text-property 0 'mac-ts-active-input-string |
| 2016 | (current-message)))) | 2019 | msg))) |
| 2017 | (setq msg (propertize (current-message) 'display | 2020 | (setq msg (propertize msg 'display |
| 2018 | (concat (current-message) | 2021 | (concat msg active-input-string))) |
| 2019 | active-input-string))) | ||
| 2020 | (setq msg active-input-string)) | 2022 | (setq msg active-input-string)) |
| 2021 | (message "%s" msg) | 2023 | (message "%s" msg) |
| 2022 | (overlay-put mac-ts-active-input-overlay 'before-string nil)) | 2024 | (overlay-put mac-ts-active-input-overlay 'before-string nil)) |