[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] Changes to emacs/lisp/language/european.el,v
From: |
Kenichi Handa |
Subject: |
[Emacs-diffs] Changes to emacs/lisp/language/european.el,v |
Date: |
Fri, 29 Aug 2008 07:59:22 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Kenichi Handa <handa> 08/08/29 07:59:21
Index: european.el
===================================================================
RCS file: /cvsroot/emacs/emacs/lisp/language/european.el,v
retrieving revision 1.105
retrieving revision 1.106
diff -u -b -r1.105 -r1.106
--- european.el 19 Aug 2008 07:49:51 -0000 1.105
+++ european.el 29 Aug 2008 07:59:21 -0000 1.106
@@ -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
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] Changes to emacs/lisp/language/european.el,v,
Kenichi Handa <=