• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/term/

Lines Matching +refs:char +refs:coding +refs:system +refs:table

1 ;;; mac-win.el --- parse switches controlling interface with Mac window system -*-coding: iso-2022-7bit;-*-
69 (if (not (eq window-system 'mac))
84 (defvar mac-system-script-code)
1086 ;; These tell read-char how to convert
1101 ;;;; Script codes and coding systems
1102 (defconst mac-script-code-coding-systems
1111 "Alist of Mac script codes vs Emacs coding systems.")
1122 mac-script-code-coding-systems)))))
1138 (cp-make-coding-system
1149 (coding-system-put 'mac-centraleurroman 'mime-charset 'x-mac-centraleurroman)
1151 (cp-make-coding-system
1162 (coding-system-put 'mac-cyrillic 'mime-charset 'x-mac-cyrillic)
1189 translation-table)
1190 (setq translation-table
1191 (make-translation-table-from-vector encoding-vector))
1192 ;; (define-translation-table 'mac-symbol-decoder translation-table)
1193 (define-translation-table 'mac-symbol-encoder
1194 (char-table-extra-slot translation-table 0)))
1221 translation-table)
1222 (setq translation-table
1223 (make-translation-table-from-vector encoding-vector))
1224 ;; (define-translation-table 'mac-dingbats-decoder translation-table)
1225 (define-translation-table 'mac-dingbats-encoder
1226 (char-table-extra-slot translation-table 0)))
1228 (defconst mac-system-coding-system
1229 (let ((base (or (cdr (assq mac-system-script-code
1230 mac-script-code-coding-systems))
1232 (if (eq system-type 'darwin)
1234 (coding-system-change-eol-conversion base 'mac)))
1235 "Coding system derived from the system script code.")
1237 (set-selection-coding-system mac-system-coding-system)
1243 "Set keyboard coding system to what is specified in EVENT."
1245 (let ((coding-system
1246 (cdr (assq (car (cadr event)) mac-script-code-coding-systems))))
1247 (set-keyboard-coding-system (or coding-system 'mac-roman))
1249 (if (eq coding-system 'japanese-shift-jis)
1264 (defun mac-utxt-to-string (data &optional coding-system)
1265 (or coding-system (setq coding-system mac-system-coding-system))
1267 (and (eq system-type 'darwin)
1268 (eq (coding-system-base coding-system) 'japanese-shift-jis)
1272 (or encoding coding-system)))))
1274 (setq str (decode-coding-string str coding-system))
1282 (subst-char-in-string ?\x5c ?\¥ str t)
1283 (subst-char-in-string ?\x80 ?\\ str t)))))
1285 (decode-coding-string data
1288 (defun mac-string-to-utxt (string &optional coding-system)
1289 (or coding-system (setq coding-system mac-system-coding-system))
1292 (memq (coding-system-base coding-system)
1293 (find-coding-systems-string string)))
1294 (setq coding-system
1295 (coding-system-change-eol-conversion coding-system 'mac))
1297 (when (and (eq system-type 'darwin)
1298 (eq coding-system 'japanese-shift-jis-mac))
1300 (setq str (subst-char-in-string ?\\ ?\x80 str))
1301 (subst-char-in-string ?\¥ ?\x5c str t)
1307 (encode-coding-string str coding-system)
1308 (or encoding coding-system) nil)))))
1309 (or data (encode-coding-string string (if (eq (byteorder) ?B)
1313 (defun mac-TEXT-to-string (data &optional coding-system)
1314 (or coding-system (setq coding-system mac-system-coding-system))
1315 (prog1 (setq data (decode-coding-string data coding-system))
1316 (when (eq (coding-system-base coding-system) 'japanese-shift-jis)
1317 ;; (subst-char-in-string ?\x5c ?\¥ data t)
1318 (subst-char-in-string ?\x80 ?\\ data t))))
1320 (defun mac-string-to-TEXT (string &optional coding-system)
1321 (or coding-system (setq coding-system mac-system-coding-system))
1322 (let ((encodables (find-coding-systems-string string))
1323 (rest mac-script-code-coding-systems))
1324 (unless (memq (coding-system-base coding-system) encodables)
1328 (setq coding-system (cdar rest)))))
1329 (setq coding-system
1330 (coding-system-change-eol-conversion coding-system 'mac))
1331 (when (eq coding-system 'japanese-shift-jis-mac)
1332 ;; (setq string (subst-char-in-string ?\\ ?\x80 string))
1333 (setq string (subst-char-in-string ?\¥ ?\x5c string)))
1334 (encode-coding-string string coding-system))
1392 (coding (or next-selection-coding-system
1393 selection-coding-system)))
1397 (setq data (mac-utxt-to-string data coding)))
1399 (setq data (mac-TEXT-to-string data coding)))
1473 (setq next-selection-coding-system nil)
1483 (when (eq system-type 'darwin)
1494 (coding (or next-selection-coding-system selection-coding-system)))
1504 (setq str (mac-string-to-utxt str coding)))
1506 (setq str (mac-string-to-TEXT str coding)))
1511 (setq next-selection-coding-system nil)
1516 (coding (or file-name-coding-system default-file-name-coding-system)))
1517 (if (and filename coding)
1518 (setq filename (encode-coding-string filename coding)))
1641 (decode-coding-string utf8-text 'utf-8))))
1742 (goto-char end))))))
2009 (defun mac-keyboard-translate-char (ch)
2010 (if (and (char-valid-p ch)
2011 (or (char-table-p keyboard-translate-table)
2012 (and (or (stringp keyboard-translate-table)
2013 (vectorp keyboard-translate-table))
2014 (> (length keyboard-translate-table) ch))))
2015 (or (aref keyboard-translate-table ch) ch)
2022 (mapcar 'mac-keyboard-translate-char
2037 (coding (or (cdr (assq (car script-language)
2038 mac-script-code-coding-systems))
2057 (get-char-property (point) 'invisible)
2059 (or (and (get-char-property (point) 'display)
2060 (eq (get-char-property (1- (point)) 'display)
2061 (get-char-property (point) 'display)))
2062 (and (get-char-property (point) 'composition)
2063 (eq (get-char-property (1- (point)) 'composition)
2064 (get-char-property (point) 'composition)))))))
2071 (let ((decoded (funcall decode-fun str coding)))
2103 (mac-unread-string (funcall decode-fun confirmed coding)))
2113 (coding (or (cdr (assq (car script-language)
2114 mac-script-code-coding-systems))
2117 (mac-unread-string (mac-utxt-to-string text coding)))))
2186 (intern (decode-coding-string service-message 'utf-8)))
2272 (goto-char (posn-point (event-start event))))
2311 ;; On Mac OS 8/9, Most coding systems used in code conversion for
2313 ;; created. So we reconstruct font name table for the initial
2315 (mac-clear-font-name-table)
2343 (let ((table (get encoder 'translation-table)))
2346 (let* ((c (make-char charset (+ i 32)))
2348 (mac-encoded (and mu (aref table mu))))
2350 (aset table c mac-encoded))))))))
2407 (defconst mac-char-fontspec-list
2408 ;; Directly operate on a char-table instead of a fontset so that it
2410 (let ((template (make-char-table 'fontset)))
2419 (map-char-table
2422 (generic-char-p key)
2423 (memq (char-charset key)
2426 (get encoder 'translation-table))))
2429 ;; the predecessor of the current char.
2432 last-char-or-range last-char last-elt)
2433 (map-char-table
2434 (lambda (char elt)
2436 (setq last-char-or-range (car (car last))
2437 last-char (if (consp last-char-or-range)
2438 (cdr last-char-or-range)
2439 last-char-or-range)
2442 (= char (1+ last-char))
2443 (eq (char-charset char) (char-charset last-char)))
2444 (if (consp last-char-or-range)
2445 (setcdr last-char-or-range char)
2446 (setcar (car last) (cons last-char char)))
2447 (setcdr last (list (cons char elt)))
2455 of `mac-char-fontspec-list', which is a list
2471 (dolist (char-fontspec mac-char-fontspec-list)
2472 (setq fontspec (cdr (assq (cdr char-fontspec) fontspec-cache)))
2476 (format (car (cdr char-fontspec)) base-family))
2477 (cdr (cdr char-fontspec))))
2478 (setq fontspec-cache (cons (cons (cdr char-fontspec) fontspec)
2480 (set-fontset-font fontset (car char-fontspec) fontspec))))
2661 (goto-char (window-start window))
2670 (goto-char (window-start window))
2704 (unless (eq system-type 'darwin)
2706 ;; determine the amount of free space on a file system (defaults to
2716 ;; Some system variables are encoded with the system script code.
2717 (dolist (v '(system-name
2718 emacs-build-system ; Mac OS 9 version cannot dump
2720 (set v (decode-coding-string (symbol-value v) mac-system-coding-system))))