X-Git-Url: https://code.delx.au/gnu-emacs/blobdiff_plain/5ef807becbfa3d2f9da0b6a88ecf113e2d4bedb2..40fb2103c2986cbb91add4afed635886c4f87ae5:/lisp/language/european.el diff --git a/lisp/language/european.el b/lisp/language/european.el index 2035d47948..164d51c9aa 100644 --- a/lisp/language/european.el +++ b/lisp/language/european.el @@ -28,9 +28,8 @@ ;;; Commentary: -;; For European scripts, character sets ISO8859-1,2,3,4,9,10,13,14,15, -;; windows-1250,2,4,7, mac-roman, adobe-standard-encoding, cp850 and -;; next are supported. +;; For European scripts, all the ISO Latin character sets are +;; supported, along with various others. ;;; Code: @@ -44,7 +43,7 @@ (unibyte-display . iso-latin-1) (input-method . "latin-1-prefix") (sample-text - . "Hello, Hej, Tere, Hei, Bonjour, Gr,A|_(B Gott, Ciao, ,A!(BHola!") + . "Hello, Hej, Tere, Hei, Bonjour, Gr$(D+d)N(B Gott, Ciao, $(D"B(BHola!") (documentation . "\ This language environment is a generic one for the Latin-1 (ISO-8859-1) character set which supports the following European languages: @@ -242,7 +241,7 @@ See also the Turkish environment.")) (unibyte-display . iso-latin-8) (input-method . "latin-8-prefix") ;; Fixme: Welsh/Ga{e}lic greetings - (sample-text . ",_"(B ,_p(B ,_^(B") + (sample-text . ",_"(B $(D+q(B $(D*t(B") (documentation . "\ This language environment is a generic one for the Latin-8 (ISO-8859-14) character set which supports the Celtic languages, including those not @@ -272,7 +271,7 @@ covered by other ISO-8859 character sets: (unibyte-display . iso-latin-9) (input-method . "latin-9-prefix") (sample-text - . "AVE. ,b&(48<=>(B ,b$(B") + . "AVE. $(D*^+^*v+v)-)M*s(B $(Q)!(B") (documentation . "\ This language environment is a generic one for the Latin-9 (ISO-8859-15) character set which supports the same languages as Latin-1 with the @@ -407,7 +406,7 @@ but it selects the Dutch tutorial and input method.")) (unibyte-display . iso-latin-1) (sample-text . "\ German (Deutsch Nord) Guten Tag -German (Deutsch S,A|(Bd) Gr,A|_(B Gott") +German (Deutsch S$(D+d(Bd) Gr$(D+d)N(B Gott") (documentation . "\ This language environment is almost the same as Latin-1, but sets the default input method to \"german-postfix\". @@ -422,7 +421,7 @@ Additionally, it selects the German tutorial.")) (nonascii-translation . iso-8859-1) (unibyte-display . iso-latin-1) (input-method . "latin-1-prefix") - (sample-text . "French (Fran,Ag(Bais) Bonjour, Salut") + (sample-text . "French (Fran$(D+.(Bais) Bonjour, Salut") (documentation . "\ This language environment is almost the same as Latin-1, but it selects the French tutorial and input method.")) @@ -451,7 +450,7 @@ Additionally, it selects the Italian tutorial.")) (input-method . "slovenian") (unibyte-display . iso-8859-2) (tutorial . "TUTORIAL.sl") - (sample-text . ",B.(Belimo vam uspe,B9(Ben dan!") + (sample-text . "$(D*v(Belimo vam uspe$(D+^(Ben dan!") (documentation . "\ This language environment is almost the same as Latin-2, but it selects the Slovenian tutorial and input method.")) @@ -465,7 +464,7 @@ but it selects the Slovenian tutorial and input method.")) (input-method . "spanish-postfix") (nonascii-translation . iso-8859-1) (unibyte-display . iso-latin-1) - (sample-text . "Spanish (Espa,Aq(Bol) ,A!(BHola!") + (sample-text . "Spanish (Espa$(D+P(Bol) $(D"B(BHola!") (documentation . "\ This language environment is almost the same as Latin-1, but it sets the default input method to \"spanish-postfix\", @@ -484,19 +483,19 @@ and it selects the Spanish tutorial.")) (nonascii-translation . iso-8859-9) (unibyte-display . iso-latin-5) (input-method . "turkish-postfix") - (sample-text . "Turkish (T,M|(Brk,Mg(Be) Merhaba") + (sample-text . "Turkish (T$(D+d(Brk$(D+.(Be) Merhaba") (setup-function . (lambda () - (set-case-syntax-pair ?I ?,C9(B (standard-case-table)) - (set-case-syntax-pair ?,C)(B ?i (standard-case-table)))) + (set-case-syntax-pair ?I ?$(D)E(B (standard-case-table)) + (set-case-syntax-pair ?$(D*D(B ?i (standard-case-table)))) (exit-function . (lambda () (set-case-syntax-pair ?I ?i (standard-case-table)) - (set-case-syntax ?,C9(B "w" (standard-case-table)) - (set-case-syntax ?,C)(B "w" (standard-case-table)))) + (set-case-syntax ?$(D)E(B "w" (standard-case-table)) + (set-case-syntax ?$(D*D(B "w" (standard-case-table)))) (documentation . "Support for Turkish. Differs from the Latin-5 environment in using the `turkish-postfix' input -method and applying Turkish case rules for the characters i, I, ,C9(B, ,C)(B."))) +method and applying Turkish case rules for the characters i, I, $(D)E(B, $(D*D(B."))) ;; Polish ISO 8859-2 environment. ;; Maintainer: Wlodek Bzyl @@ -510,7 +509,7 @@ method and applying Turkish case rules for the characters i, I, ,C9(B, ,C)(B (nonascii-translation . iso-8859-2) (unibyte-display . iso-8859-2) (tutorial . "TUTORIAL.pl") - (sample-text . "P,Bs(Bjd,B<(B, ki,Bq(B-,B?(Be t,Bj(B chmurno,B6f(B w g,B31(Bb flaszy") + (sample-text . "P$(D+Q(Bjd$(D+u(B, ki$(D+M(B-$(D+w(Be t$(D+8(B chmurno$(D+\++(B w g$(D)H+((Bb flaszy") (documentation . t)) '("European")) @@ -576,6 +575,18 @@ method and applying Turkish case rules for the characters i, I, ,C9(B, ,C)(B (documentation . "Support for Croatian with Latin-2 encoding.")) '("European")) +(set-language-info-alist + "Brazilian Portuguese" '((tutorial . "TUTORIAL.pt_BR") + (charset iso-8859-1) + (coding-system iso-latin-1 iso-latin-9) + (coding-priority iso-latin-1) + (nonascii-translation . iso-8859-1) + (unibyte-display . iso-8859-1) + (input-method . "latin-1-prefix") + (sample-text . "Oi") + (documentation . "Support for Brazilian Portuguese.")) + '("European")) + (define-coding-system 'mac-roman "Mac Roman Encoding (MIME:MACINTOSH)." @@ -658,13 +669,15 @@ positions (integers or markers) specifying the region." (narrow-to-region beg end) (goto-char (point-min)) (while (re-search-forward diacritic-composition-pattern nil t) - (compose-region (match-beginning 0) (match-end 0))))) + (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)) - (compose-string string idx (match-end 0)) + (if (= (char-syntax (aref string idx)) ?w) + (compose-string string idx (match-end 0))) (setq idx (match-end 0)))) string) @@ -673,10 +686,6 @@ positions (integers or markers) specifying the region." (interactive) (diacritic-compose-region (point-min) (point-max))) -(defun diacritic-post-read-conversion (len) - (diacritic-compose-region (point) (+ (point) len)) - len) - (defun diacritic-composition-function (pos &optional string) "Compose diacritic text around POS. Optional 2nd argument STRING, if non-nil, is a string containing text @@ -689,7 +698,7 @@ or nil if no characters are composed." (if (>= pos 0) (let ((ch (aref string pos)) start end components ch composition) - (when (and (>= ch 32) (or (< ch 127) (>= ch 160))) + (when (= (char-syntax ch) ?w) (setq start pos end (length string) components (list ch) @@ -707,7 +716,7 @@ or nil if no characters are composed." (if (>= pos (point-min)) (let ((ch (char-after pos)) start end components composition) - (when (and (>= ch 32) (or (< ch 127) (>= ch 160))) + (when (= (char-syntax ch) ?w) (setq start pos end (point-max) components (list ch) @@ -724,4 +733,5 @@ or nil if no characters are composed." (provide 'european) +;;; arch-tag: 9e018b12-fb02-4120-907b-9adeaf84b5c2 ;;; european.el ends here