Mercurial > emacs
changeset 19264:6122dbba797f
(prefer-coding-system): Moved to mule-util.el.
author | Kenichi Handa <handa@m17n.org> |
---|---|
date | Sun, 10 Aug 1997 04:07:03 +0000 |
parents | 9d34beb088bf |
children | 6b31dac7f72b |
files | lisp/international/mule-util.el |
diffstat | 1 files changed, 13 insertions(+), 22 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/international/mule-util.el Sun Aug 10 04:07:03 1997 +0000 +++ b/lisp/international/mule-util.el Sun Aug 10 04:07:03 1997 +0000 @@ -318,28 +318,6 @@ (equal (coding-system-plist coding-system-1) (coding-system-plist coding-system-2)))) -;;;###autoload -(defun prefer-coding-system (coding-system) - "Add CODING-SYSTEM at the front of the priority list for automatic detection." - (interactive "zPrefer coding system: ") - (if (not (and coding-system (coding-system-p coding-system))) - (error "Invalid coding system `%s'" coding-system)) - (let ((coding-category (coding-system-category coding-system)) - (parent (coding-system-parent coding-system))) - (if (not coding-category) - ;; CODING-SYSTEM is no-conversion or undecided. - (error "Can't prefer the coding system `%s'" coding-system)) - (set coding-category (or parent coding-system)) - (if (not (eq coding-category (car coding-category-list))) - ;; We must change the order. - (setq coding-category-list - (cons coding-category - (delq coding-category coding-category-list)))) - (if (and parent (interactive-p)) - (message "Highest priority is set to %s (parent of %s)" - parent coding-system)) - (setq-default buffer-file-coding-system (or parent coding-system)))) - ;;; Composite charcater manipulations. @@ -375,6 +353,19 @@ (insert (decompose-composite-char (string-to-char str))))))) ;;;###autoload +(defun decompose-string (string) + "Decompose all composite characters in STRING." + (let* ((l (string-to-list string)) + (tail l) + ch) + (while tail + (setq ch (car tail)) + (setcar tail (if (cmpcharp ch) (decompose-composite-char ch) + (char-to-string ch))) + (setq tail (cdr tail))) + (apply 'concat l))) + +;;;###autoload (defconst reference-point-alist '((tl . 0) (tc . 1) (tr . 2) (ml . 3) (mc . 4) (mr . 5)