2 |
|
|
3 |
;; Copyright (C) 1995, 1997, 2001 Electrotechnical Laboratory, JAPAN. |
;; Copyright (C) 1995, 1997, 2001 Electrotechnical Laboratory, JAPAN. |
4 |
;; Licensed to the Free Software Foundation. |
;; Licensed to the Free Software Foundation. |
5 |
|
;; Copyright (C) 2001 Free Software Foundation, Inc. |
6 |
|
|
7 |
;; Keywords: multilingual, European |
;; Keywords: multilingual, European, i18n |
8 |
|
|
9 |
;; This file is part of GNU Emacs. |
;; This file is part of GNU Emacs. |
10 |
|
|
152 |
(nonascii-translation . latin-iso8859-4) |
(nonascii-translation . latin-iso8859-4) |
153 |
(unibyte-syntax . "latin-4") |
(unibyte-syntax . "latin-4") |
154 |
(unibyte-display . iso-8859-4) |
(unibyte-display . iso-8859-4) |
155 |
(input-method . "latin-4-prefix") |
(input-method . "latin-4-postfix") |
156 |
(documentation . "\ |
(documentation . "\ |
157 |
These languages are supported with the Latin-4 (ISO-8859-4) character set: |
These languages are supported with the Latin-4 (ISO-8859-4) character set: |
158 |
Danish, English, Estonian, Finnish, German, Greenlandic, Lappish, |
Danish, English, Estonian, Finnish, German, Greenlandic, Lappish, |
180 |
(nonascii-translation . latin-iso8859-9) |
(nonascii-translation . latin-iso8859-9) |
181 |
(unibyte-syntax . "latin-5") |
(unibyte-syntax . "latin-5") |
182 |
(unibyte-display . iso-latin-5) |
(unibyte-display . iso-latin-5) |
183 |
(input-method . "latin-5-prefix") |
(input-method . "latin-5-postfix") |
184 |
(documentation . "\ |
(documentation . "\ |
185 |
These languages are supported with the Latin-5 (ISO-8859-9) character set: |
These languages are supported with the Latin-5 (ISO-8859-9) character set: |
186 |
Bulgarian, Byelorussian, (Slavic) Macedonian, Russian, Serbian and |
Bulgarian, Byelorussian, (Slavic) Macedonian, Russian, Serbian and |
341 |
(unibyte-syntax . "latin-2") |
(unibyte-syntax . "latin-2") |
342 |
(unibyte-display . iso-8859-2) |
(unibyte-display . iso-8859-2) |
343 |
(tutorial . "TUTORIAL.pl") |
(tutorial . "TUTORIAL.pl") |
344 |
(sample-text . ",B1!fFjJ3#qQsS6&?/<,(B") |
(sample-text . "P,Bs(Bjd,B<(B, ki,Bq(B-,B?(Be t,Bj(B chmurno,B6f(B w g,B31(Bb flaszy") |
345 |
(documentation . t)) |
(documentation . t)) |
346 |
'("European")) |
'("European")) |
347 |
|
|
348 |
|
(set-language-info-alist |
349 |
|
"Georgian" `((coding-system georgian-ps) |
350 |
|
(coding-priority georgian-ps) |
351 |
|
(features codepages) |
352 |
|
(documentation . "Support for georgian-ps character set.")) |
353 |
|
'("Cyrillic")) |
354 |
|
|
355 |
;; Definitions for the Mac Roman character sets and coding system. |
;; Definitions for the Mac Roman character sets and coding system. |
356 |
;; The Mac Roman encoding uses all 128 code points in the range 128 to |
;; The Mac Roman encoding uses all 128 code points in the range 128 to |
556 |
(setq w32-charset-info-alist |
(setq w32-charset-info-alist |
557 |
(delete (assoc "iso10646-1") |
(delete (assoc "iso10646-1") |
558 |
w32-charset-info-alist))))) |
w32-charset-info-alist))))) |
559 |
|
;; We can't find out whether or not the clipboard should be |
560 |
|
;; encoded as utf-8 under X as far as I know. (That may be |
561 |
|
;; appropriate in some versions of XFree, at least.) |
562 |
(input-method . "rfc1345") |
(input-method . "rfc1345") |
563 |
(documentation . "\ |
(documentation . "\ |
564 |
This language environment is a generic one for a subset of the Unicode |
This language environment is a generic one for a subset of the Unicode |
565 |
character set encoded in UTF-8.")) |
character set encoded in UTF-8.")) |
566 |
nil) |
nil) |
567 |
|
|
568 |
;; This is conventional. |
(defconst diacritic-composition-pattern "\\C^\\c^+") |
569 |
(push '("\\.utf\\(-8\\)?\\'" . utf-8) file-coding-system-alist) |
|
570 |
|
;;;###autoload |
571 |
|
(defun diacritic-compose-region (beg end) |
572 |
|
"Compose diacritic characters in the region. |
573 |
|
When called from a program, expects two arguments, |
574 |
|
positions (integers or markers) specifying the region." |
575 |
|
(interactive "r") |
576 |
|
(save-restriction |
577 |
|
(narrow-to-region beg end) |
578 |
|
(goto-char (point-min)) |
579 |
|
(while (re-search-forward diacritic-composition-pattern nil t) |
580 |
|
(compose-region (match-beginning 0) (match-end 0))))) |
581 |
|
|
582 |
|
;;;###autoload |
583 |
|
(defun diacritic-compose-string (string) |
584 |
|
"Compose diacritic characters in STRING and return the resulting string." |
585 |
|
(let ((idx 0)) |
586 |
|
(while (setq idx (string-match diacritic-composition-pattern string idx)) |
587 |
|
(compose-string string idx (match-end 0)) |
588 |
|
(setq idx (match-end 0)))) |
589 |
|
string) |
590 |
|
|
591 |
|
;;;###autoload |
592 |
|
(defun diacritic-compose-buffer () |
593 |
|
"Compose diacritic characters in the current buffer." |
594 |
|
(interactive) |
595 |
|
(diacritic-compose-region (point-min) (point-max))) |
596 |
|
|
597 |
|
;;;###autoload |
598 |
|
(defun diacritic-post-read-conversion (len) |
599 |
|
(diacritic-compose-region (point) (+ (point) len)) |
600 |
|
len) |
601 |
|
|
602 |
|
;;;###autoload |
603 |
|
(defun diacritic-composition-function (from to pattern &optional string) |
604 |
|
"Compose diacritic text in the region FROM and TO. |
605 |
|
The text matches the regular expression PATTERN. |
606 |
|
Optional 4th argument STRING, if non-nil, is a string containing text |
607 |
|
to compose. |
608 |
|
|
609 |
|
The return value is number of composed characters." |
610 |
|
(if (< (1+ from) to) |
611 |
|
(prog1 (- to from) |
612 |
|
(if string |
613 |
|
(compose-string string from to) |
614 |
|
(compose-region from to)) |
615 |
|
(- to from)))) |
616 |
|
|
617 |
|
;; Register a function to compose Unicode diacrtics and marks. |
618 |
|
(let ((patterns '(("\\C^\\c^+" . diacrtic-composition-function)))) |
619 |
|
(let ((c #x300)) |
620 |
|
(while (<= c #x362) |
621 |
|
(aset composition-function-table (decode-char 'ucs c) patterns) |
622 |
|
(setq c (1+ c))) |
623 |
|
(setq c #x20d0) |
624 |
|
(while (<= c #x20e3) |
625 |
|
(aset composition-function-table (decode-char 'ucs c) patterns) |
626 |
|
(setq c (1+ c))))) |
627 |
|
|
628 |
(provide 'european) |
(provide 'european) |
629 |
|
|