[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/international/ucs-tables.el
From: |
Stefan Monnier |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/international/ucs-tables.el |
Date: |
Sun, 17 Mar 2002 15:50:30 -0500 |
Index: emacs/lisp/international/ucs-tables.el
diff -c emacs/lisp/international/ucs-tables.el:1.8
emacs/lisp/international/ucs-tables.el:1.9
*** emacs/lisp/international/ucs-tables.el:1.8 Tue Jan 8 16:38:58 2002
--- emacs/lisp/international/ucs-tables.el Sun Mar 17 15:50:30 2002
***************
*** 1,6 ****
;;; ucs-tables.el --- translation to, from and via Unicode -*- coding:
iso-2022-7bit -*-
! ;; Copyright (C) 2001 Free Software Foundation, Inc.
;; Author: Dave Love <address@hidden>
;; Keywords: i18n
--- 1,6 ----
;;; ucs-tables.el --- translation to, from and via Unicode -*- coding:
iso-2022-7bit -*-
! ;; Copyright (C) 2001, 2002 Free Software Foundation, Inc.
;; Author: Dave Love <address@hidden>
;; Keywords: i18n
***************
*** 25,31 ****
;;; Commentary:
;; This file provides tables mapping between Unicode numbers and
! ;; emacs-mule characters from the iso-8859 charsets (and others). It
;; also provides some auxiliary functions.
;; These tables are used to construct other mappings between the Mule
--- 25,31 ----
;;; Commentary:
;; This file provides tables mapping between Unicode numbers and
! ;; emacs-mule characters from the iso8859 charsets (and others). It
;; also provides some auxiliary functions.
;; These tables are used to construct other mappings between the Mule
***************
*** 1159,1166 ****
(interactive "P")
(unless encode-only
;; Unify 8859 on decoding. (Non-CCL coding systems only.)
! (set-char-table-parent standard-translation-table-for-decode
! ucs-mule-8859-to-mule-unicode))
;; Adjust the 8859 coding systems to fragment the unified characters
;; on encoding.
(dolist (n '(1 2 3 4 5 7 8 9 14 15))
--- 1159,1165 ----
(interactive "P")
(unless encode-only
;; Unify 8859 on decoding. (Non-CCL coding systems only.)
! (unify-8859-on-decoding-mode 1))
;; Adjust the 8859 coding systems to fragment the unified characters
;; on encoding.
(dolist (n '(1 2 3 4 5 7 8 9 14 15))
***************
*** 1236,1242 ****
;; Maybe fix decoding.
(unless encode-only
;; Unify 8859 on decoding. (Non-CCL coding systems only.)
! (set-char-table-parent standard-translation-table-for-decode nil))
;; Fix encoding. For each charset, remove the entries in
;; `char-coding-system-table' added to its safe-chars table (as its
;; parent).
--- 1235,1241 ----
;; Maybe fix decoding.
(unless encode-only
;; Unify 8859 on decoding. (Non-CCL coding systems only.)
! (unify-8859-on-decoding-mode -1))
;; Fix encoding. For each charset, remove the entries in
;; `char-coding-system-table' added to its safe-chars table (as its
;; parent).
***************
*** 1295,1318 ****
`iso-latin-1' and `mule-unicode-0100-24ff' charsets.
This sets the parent of `standard-translation-table-for-decode'.
See also command `unify-8859-on-encoding-mode'."
:group 'mule
:global t
:version 21.3 ; who knows...?
:init-value nil
! (if unify-8859-on-decoding-mode
! (set-char-table-parent standard-translation-table-for-decode
! ucs-mule-8859-to-mule-unicode)
! (set-char-table-parent standard-translation-table-for-decode nil)))
(defun ucs-insert (arg)
"Insert the Emacs character representation of the given Unicode.
Interactively, prompts for a hex string giving the code."
(interactive "sUnicode (hex): ")
! (insert (decode-char 'ucs (if (integerp arg)
! arg
! (string-to-number arg 16)))))
;;; Dealing with non-8859 character sets.
--- 1294,1319 ----
`iso-latin-1' and `mule-unicode-0100-24ff' charsets.
This sets the parent of `standard-translation-table-for-decode'.
+ Also sets `translation-table-for-input' globally, so that Quail input
+ methods produce unified characters.
See also command `unify-8859-on-encoding-mode'."
:group 'mule
:global t
:version 21.3 ; who knows...?
:init-value nil
! (let ((table (if unify-8859-on-decoding-mode
ucs-mule-8859-to-mule-unicode)))
! (set-char-table-parent standard-translation-table-for-decode table)
! (setq-default translation-table-for-input table)))
(defun ucs-insert (arg)
"Insert the Emacs character representation of the given Unicode.
Interactively, prompts for a hex string giving the code."
(interactive "sUnicode (hex): ")
! (insert (or (decode-char 'ucs (if (integerp arg)
! arg
! (string-to-number arg 16)))
! (error "Unknown Unicode character"))))
;;; Dealing with non-8859 character sets.
- [Emacs-diffs] Changes to emacs/lisp/international/ucs-tables.el,
Stefan Monnier <=