From: "Ernest Adrogué" <nfdisco@gmail.com>
To: 18279@debbugs.gnu.org
Subject: bug#18279: 24.4.50; [PATCH] add language environment for the Catalan language
Date: Sat, 16 Aug 2014 14:42:45 +0200 [thread overview]
Message-ID: <20140816124244.GA12549@doriath.local> (raw)
[-- Attachment #1: Type: text/plain, Size: 976 bytes --]
This patch adds a language environment for the Catalan language.
It is needed in order to get word motion commands work correctly, as in
Catalan the middle dot character `·' is a word constituent. This is done by
changing the syntax class of the middle dot character.
Changes made:
* international/mule-cmds.el (locale-language-names): Map locale
language name `ca' to language environment `Catalan'.
* language/european.el: Add definition of language environment for
the Catalan language.
* leim/quail/latin-pre.el: Add quail rule to the `catalan-prefix'
input method to support input of middle dot characters through
composition.
This is a trivial patch based on a post by Dave Love on the help-gnu-emacs
mailing list [1], and therefore I believe a copyright assignment from me is
unnecessary.
[1] http://lists.gnu.org/archive/html/help-gnu-emacs/2009-11/msg00008.html
[-- Attachment #2: 0001-Added-Catalan-language-environment.patch --]
[-- Type: text/x-diff, Size: 2770 bytes --]
From e1e7b8a61ac220486ea5b55f95479317f193b8a7 Mon Sep 17 00:00:00 2001
From: nfdisco <nfdisco@gmail.com>
Date: Sat, 16 Aug 2014 13:06:03 +0200
Subject: [PATCH 1/1] Added Catalan language environment.
---
lisp/international/mule-cmds.el | 2 +-
lisp/language/european.el | 22 ++++++++++++++++++++++
lisp/leim/quail/latin-pre.el | 2 ++
3 files changed, 25 insertions(+), 1 deletion(-)
diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el
index f6c0719..47e2968 100644
--- a/lisp/international/mule-cmds.el
+++ b/lisp/international/mule-cmds.el
@@ -2235,7 +2235,7 @@ See `set-language-info-alist' for use in programs."
("br" . "Latin-1") ; Breton
("bs" . "Latin-2") ; Bosnian
("byn" . "UTF-8") ; Bilin; Blin
- ("ca" . "Latin-1") ; Catalan
+ ("ca" "Catalan" iso-8859-1) ; Catalan
; co Corsican
("cs" "Czech" iso-8859-2)
("cy" "Welsh" iso-8859-14)
diff --git a/lisp/language/european.el b/lisp/language/european.el
index 96ae232..40ec0b1 100644
--- a/lisp/language/european.el
+++ b/lisp/language/european.el
@@ -614,6 +614,28 @@ method and applying Turkish case rules for the characters i, I, ı, İ.")))
(documentation . "Support for Brazilian Portuguese."))
'("European"))
+(set-language-info-alist
+ "Catalan" '((charset iso-8859-1)
+ (coding-system iso-8859-1 iso-8859-15)
+ (coding-priority iso-8859-1)
+ (input-method . "catalan-prefix")
+ (nonascii-translation . iso-8859-1)
+ (unibyte-display . iso-8859-1)
+ (setup-function
+ . (lambda ()
+ (modify-syntax-entry ?· "w" (standard-syntax-table))))
+ (exit-function
+ . (lambda ()
+ (modify-syntax-entry ?· "_" (standard-syntax-table))))
+ (sample-text . "\
+Catalan (Català) Avui demà i ahir s'esfullarà una rosa.")
+ (documentation . "\
+This language environment uses the ISO-8859-1 character set,
+sets the default input method to \"catalan-prefix\", and sets
+the syntax of the middle dot character `·' to word."))
+ '("European"))
+
+
\f
(define-coding-system 'mac-roman
"Mac Roman Encoding (MIME:MACINTOSH)."
diff --git a/lisp/leim/quail/latin-pre.el b/lisp/leim/quail/latin-pre.el
index 6202b89..03de5f2 100644
--- a/lisp/leim/quail/latin-pre.el
+++ b/lisp/leim/quail/latin-pre.el
@@ -188,6 +188,7 @@
diaeresis | \" | \"i -> ï \"\" -> ¨
tilde | ~ | ~n -> ñ
cedilla | ~ | ~c -> ç
+ middle dot | ~ | ~. -> ·
symbol | ~ | ~> -> » ~< -> « ~! -> ¡ ~? -> ¿
" nil t nil nil nil nil nil nil nil nil t)
@@ -223,6 +224,7 @@
("~<" ?\«)
("~!" ?¡)
("~?" ?¿)
+ ("~." ?·)
("~ " ?~)
)
--
2.0.1
next reply other threads:[~2014-08-16 12:42 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-16 12:42 Ernest Adrogué [this message]
2016-02-23 12:20 ` bug#18279: 24.4.50; [PATCH] add language environment for the Catalan language Lars Ingebrigtsen
2016-02-24 11:19 ` Ernest Adrogué
2016-02-25 5:35 ` Lars Ingebrigtsen
2016-03-15 11:12 ` Ernest Adrogué
2016-03-20 11:01 ` Lars Magne Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20140816124244.GA12549@doriath.local \
--to=nfdisco@gmail.com \
--cc=18279@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.