aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/international/mule-util.el
diff options
context:
space:
mode:
authorKenichi Handa <[email protected]>1997-08-10 04:07:03 +0000
committerKenichi Handa <[email protected]>1997-08-10 04:07:03 +0000
commit2de6d4470ce134cb92aefc0d7a296a6fd292c3a4 (patch)
tree8e785a16347ebbb92c0207cde4b089f1fee8bbd2 /lisp/international/mule-util.el
parentd6d6d592014c3e4e1bfbbda42d2f920c59e5c2c5 (diff)
(prefer-coding-system): Moved to mule-util.el.
Diffstat (limited to 'lisp/international/mule-util.el')
-rw-r--r--lisp/international/mule-util.el35
1 files changed, 13 insertions, 22 deletions
diff --git a/lisp/international/mule-util.el b/lisp/international/mule-util.el
index 0c4c895077..e9a3d67aa6 100644
--- a/lisp/international/mule-util.el
+++ b/lisp/international/mule-util.el
@@ -318,28 +318,6 @@ or one is an alias of the other."
(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 @@ positions (integers or markers) specifying the region."
(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)