emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/international/ucs-tables.el


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/international/ucs-tables.el
Date: Fri, 04 Apr 2003 01:22:24 -0500

Index: emacs/lisp/international/ucs-tables.el
diff -c emacs/lisp/international/ucs-tables.el:1.31 
emacs/lisp/international/ucs-tables.el:1.32
*** emacs/lisp/international/ucs-tables.el:1.31 Tue Feb  4 08:09:38 2003
--- emacs/lisp/international/ucs-tables.el      Mon Mar 17 23:08:39 2003
***************
*** 1185,1192 ****
        ucs-mule-to-mule-unicode)
        (dolist (coding coding-list)
        (set-char-table-parent (coding-system-get coding 'safe-chars)
!                              ucs-mule-to-mule-unicode)
!       (register-char-codings coding ucs-mule-to-mule-unicode)))
  
      ;; Adjust the 8859 coding systems to fragment the unified characters
      ;; on encoding.
--- 1185,1191 ----
        ucs-mule-to-mule-unicode)
        (dolist (coding coding-list)
        (set-char-table-parent (coding-system-get coding 'safe-chars)
!                              ucs-mule-to-mule-unicode)))
  
      ;; Adjust the 8859 coding systems to fragment the unified characters
      ;; on encoding.
***************
*** 1200,1210 ****
        ;; used after they've been registered, but we might as well
        ;; record them.  Setting the parent here is a convenience.
        (set-char-table-parent safe table)
-       ;; Update the table of what encodes to what.
-       (register-char-codings coding-system table)
        (coding-system-put coding-system 'translation-table-for-encode table)))
!     (add-hook 'minibuffer-setup-hook 'ucs-minibuffer-setup))
!   (optimize-char-coding-system-table))
  
  (defun ucs-fragment-8859 (for-encode for-decode)
    "Undo the unification done by `ucs-unify-8859'.
--- 1199,1206 ----
        ;; used after they've been registered, but we might as well
        ;; record them.  Setting the parent here is a convenience.
        (set-char-table-parent safe table)
        (coding-system-put coding-system 'translation-table-for-encode table)))
!     (add-hook 'minibuffer-setup-hook 'ucs-minibuffer-setup)))
  
  (defun ucs-fragment-8859 (for-encode for-decode)
    "Undo the unification done by `ucs-unify-8859'.
***************
*** 1227,1274 ****
          (safe (coding-system-get 'mule-utf-8 'safe-chars)))
        (dolist (coding coding-list)
        (set-char-table-parent (coding-system-get coding 'safe-chars) nil))
-       ;; Here we assume that all mule-utf-* have the same character
-       ;; repertory, thus we can use SAFE for all of them.
-       (map-char-table
-        (lambda (key val)
-        (if (and (>= key 128) val
-                 (not (aref safe key)))
-            (aset char-coding-system-table key
-                  (remq 'mule-utf-8
-                        (remq 'mule-utf-16-le
-                              (remq 'mule-utf-16-be
-                                    (aref char-coding-system-table key)))))))
-        ucs-mule-to-mule-unicode)
- 
        (if (not utf-fragment-on-decoding)
          (define-translation-table 'utf-translation-table-for-encode)
        (define-translation-table 'utf-translation-table-for-encode
!         utf-defragmentation-table)
!       (dolist (coding coding-list)
!         (register-char-codings coding utf-defragmentation-table))))
  
!     ;; For each charset, remove the entries in
!     ;; `char-coding-system-table' added to its safe-chars table (as
!     ;; its parent).
      (dolist (n '(1 2 3 4 5 7 8 9 14 15))
        (let* ((coding-system
              (coding-system-base (intern (format "iso-8859-%d" n))))
-            (table (symbol-value
-                    (intern (format "ucs-8859-%d-encode-table" n))))
             (safe (coding-system-get coding-system 'safe-chars)))
!       (when (char-table-parent safe)
!         (map-char-table
!          (lambda (key val)
!            (if (and (>= key 128) val)
!                (let ((codings (aref char-coding-system-table key)))
!                  (aset char-coding-system-table key
!                        (remq coding-system codings)))))
!          (char-table-parent safe))
!         (set-char-table-parent safe nil))
        (coding-system-put coding-system 'translation-table-for-encode nil)))
!     (optimize-char-coding-system-table)
!     (remove-hook 'minibuffer-setup-hook 'ucs-minibuffer-setup))
!   (optimize-char-coding-system-table))
  
  (defun ucs-insert (arg)
    "Insert the Emacs character representation of the given Unicode.
--- 1223,1243 ----
          (safe (coding-system-get 'mule-utf-8 'safe-chars)))
        (dolist (coding coding-list)
        (set-char-table-parent (coding-system-get coding 'safe-chars) nil))
        (if (not utf-fragment-on-decoding)
          (define-translation-table 'utf-translation-table-for-encode)
        (define-translation-table 'utf-translation-table-for-encode
!         utf-defragmentation-table)))
  
!     ;; For each charset, remove the parent of `safe-chars' property of
!     ;; the corresponding coding system.
      (dolist (n '(1 2 3 4 5 7 8 9 14 15))
        (let* ((coding-system
              (coding-system-base (intern (format "iso-8859-%d" n))))
             (safe (coding-system-get coding-system 'safe-chars)))
!       (if (char-table-parent safe)
!           (set-char-table-parent safe nil))
        (coding-system-put coding-system 'translation-table-for-encode nil)))
!     (remove-hook 'minibuffer-setup-hook 'ucs-minibuffer-setup)))
  
  (defun ucs-insert (arg)
    "Insert the Emacs character representation of the given Unicode.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]