changeset 97837:9966bae9459d

Don't setup composition-function-table. (diacritic-composition-pattern, diacritic-compose-region) (diacritic-compose-string, diacritic-compose-buffer) (diacritic-composition-function): Delete them.
author Kenichi Handa <handa@m17n.org>
date Fri, 29 Aug 2008 07:59:21 +0000
parents f5f400126c23
children 5752f49a8314
files lisp/language/european.el
diffstat 1 files changed, 0 insertions(+), 114 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/language/european.el	Fri Aug 29 07:59:03 2008 +0000
+++ b/lisp/language/european.el	Fri Aug 29 07:59:21 2008 +0000
@@ -637,120 +637,6 @@
   :charset-list '(adobe-standard-encoding)
   :mime-charset 'adobe-standard-encoding)
 
-
-;; For automatic composing of diacritics and combining marks.
-(dolist (range '( ;; combining diacritical marks
-		 (#x0300 #x0314 (tc . bc))
-		 (#x0315	(tr . bl))
-		 (#x0316 #x0319 (bc . tc))
-		 (#x031A	(tr . cl))
-		 (#x031B #x0320 (bc . tc))
-		 (#x0321	(Br . tr))
-		 (#x0322	(Br . tl))
-		 (#x0323 #x0333 (bc . tc))
-		 (#x0334 #x0338 (Bc . Bc))
-		 (#x0339 #x033C (bc . tc))
-		 (#x033D #x033F (tc . bc))
-		 (#x0340	(tl . bc))
-		 (#x0341	(tr . bc))
-		 (#x0342 #x0344 (tc . bc))
-		 (#x0345	(bc . tc))
-		 (#x0346	(tc . bc))
-		 (#x0347 #x0349 (bc . tc))
-		 (#x034A #x034C (tc . bc))
-		 (#x034D #x034E (bc . tc))
-		 ;; combining diacritical marks for symbols
-		 (#x20D0 #x20D1 (tc . bc))
-		 (#x20D2 #x20D3 (Bc . Bc))
-		 (#x20D4 #x20D7 (tc . bc))
-		 (#x20D8 #x20DA (Bc . Bc))
-		 (#x20DB #x20DC (tc . bc))
-		 (#x20DD #x20E0 (Bc . Bc))
-		 (#x20E1	(tc . bc))
-		 (#x20E2 #x20E3 (Bc . Bc))))
-  (let* ((from (car range))
-	 (to (if (= (length range) 3)
-		 (nth 1 range)
-	       from))
-	 (composition (car (last range))))
-    (while (<= from to)
-      (put-char-code-property from 'diacritic-composition composition)
-      (aset composition-function-table from 'diacritic-composition-function)
-      (setq from (1+ from)))))
-
-(defconst diacritic-composition-pattern "\\C^\\c^+")
-
-(defun diacritic-compose-region (beg end)
-  "Compose diacritic characters in the region.
-When called from a program, expects two arguments,
-positions (integers or markers) specifying the region."
-  (interactive "r")
-  (save-restriction
-    (narrow-to-region beg end)
-    (goto-char (point-min))
-    (while (re-search-forward diacritic-composition-pattern nil t)
-      (if (= (char-syntax (char-after (match-beginning 0))) ?w)
-	  (compose-region (match-beginning 0) (match-end 0))))))
-
-(defun diacritic-compose-string (string)
-  "Compose diacritic characters in STRING and return the resulting string."
-  (let ((idx 0))
-    (while (setq idx (string-match diacritic-composition-pattern string idx))
-      (if (= (char-syntax (aref string idx)) ?w)
-	  (compose-string string idx (match-end 0)))
-      (setq idx (match-end 0))))
-  string)
-
-(defun diacritic-compose-buffer ()
-  "Compose diacritic characters in the current buffer."
-  (interactive)
-  (diacritic-compose-region (point-min) (point-max)))
-
-(defun diacritic-composition-function (pos to font-object string)
-  "Compose diacritic text around POS.
-Optional 2nd argument STRING, if non-nil, is a string containing text
-to compose.
-
-The return value is the end position of composed characters,
-or nil if no characters are composed."
-  (setq pos (1- pos))
-  (if string
-      (if (>= pos 0)
-	  (let ((ch (aref string pos))
-		start end components ch composition)
-	    (when (= (char-syntax ch) ?w)
-	      (setq start pos
-		    end (length string)
-		    components (list ch)
-		    pos (1+ pos))
-	      (while (and
-		      (< pos end)
-		      (setq ch (aref string pos)
-			    composition
-			    (get-char-code-property ch
-						    'diacritic-composition)))
-		(setq components (cons ch (cons composition components))
-		      pos (1+ pos)))
-	      (compose-string string start pos (nreverse components))
-	      pos)))
-    (if (>= pos (point-min))
-	(let ((ch (char-after pos))
-	      start end components composition)
-	  (when (= (char-syntax ch) ?w)
-	    (setq start pos
-		  end (point-max)
-		  components (list ch)
-		  pos (1+ pos))
-	    (while (and
-		    (< pos end)
-		    (setq ch (char-after pos)
-			  composition
-			  (get-char-code-property ch 'diacritic-composition)))
-	      (setq components (cons ch (cons composition components))
-		    pos (1+ pos)))
-	    (compose-region start pos (nreverse components))
-	    pos)))))
-
 (provide 'european)
 
 ;; arch-tag: 9e018b12-fb02-4120-907b-9adeaf84b5c2