From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Kevin Rodgers Newsgroups: gmane.emacs.help Subject: Re: changing word boundaries Date: Wed, 11 Nov 2009 07:57:04 -0700 Message-ID: References: <87ljiqcb9a.fsf@fx-laptop.ukfsn.org> <20091108170722.GA822@doriath.local> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1257953043 27489 80.91.229.12 (11 Nov 2009 15:24:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 Nov 2009 15:24:03 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 11 16:23:56 2009 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1N8F2x-0003uL-No for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Nov 2009 16:23:48 +0100 Original-Received: from localhost ([127.0.0.1]:45296 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8F2x-000855-2a for geh-help-gnu-emacs@m.gmane.org; Wed, 11 Nov 2009 10:23:47 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N8EdZ-0007LX-EH for help-gnu-emacs@gnu.org; Wed, 11 Nov 2009 09:57:33 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N8EdU-0007Hj-Kq for help-gnu-emacs@gnu.org; Wed, 11 Nov 2009 09:57:32 -0500 Original-Received: from [199.232.76.173] (port=39752 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N8EdU-0007Hg-Gq for help-gnu-emacs@gnu.org; Wed, 11 Nov 2009 09:57:28 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]:45733) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N8EdT-0008S2-QE for help-gnu-emacs@gnu.org; Wed, 11 Nov 2009 09:57:28 -0500 Original-Received: from list by lo.gmane.org with local (Exim 4.50) id 1N8EdK-0004rt-5L for help-gnu-emacs@gnu.org; Wed, 11 Nov 2009 15:57:18 +0100 Original-Received: from c-71-237-24-138.hsd1.co.comcast.net ([71.237.24.138]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 Nov 2009 15:57:18 +0100 Original-Received: from kevin.d.rodgers by c-71-237-24-138.hsd1.co.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 Nov 2009 15:57:18 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 85 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: c-71-237-24-138.hsd1.co.comcast.net User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) In-Reply-To: <20091108170722.GA822@doriath.local> X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:69665 Archived-At: Ernest Adrogué wrote: > 1/11/09 @ 19:09 (+0000), thus spake Dave Love: >> Ernest Adrogué writes: >> >>> Hi there, >>> >>> The Catalan language has a ligature consisting in one >>> "l" character, followed by a middle dot ("·"), followed >>> by another "l". See here for more details: >>> http://en.wikipedia.org/wiki/L·l#Catalan >>> >>> Is there a way to make emacs aware of this, so that it >>> doesn't treat a word containing "l·l" as two separate >>> words? >> [You're probably not really interested in word boundaries, just word >> constituents. For an illustration of the difference, see variable >> `word-combining-categories' and what capitalized-words-mode does in >> Emacs 23.] >> >> You should define a Catalan language environment to be used in ca_ES >> locales. (I'm surprised I didn't do it, as there's a relevant input >> method.) It should set the base syntax of · to word, and set a suitable >> default input method. The existing one, `catalan-prefix', should >> presumably bind `~.' to `·', as in latin-prefix; it doesn't currently, >> and maybe needs other fixes. >> >> The environment would be something like this (untested), which is >> probably better then trying to use categories. [The default Latin-1 >> character set is overridden in, say, ca_ES.UTF-8.] >> >> (push '("ca" . "Catalan") locale-language-names) >> >> (set-language-info-alist >> "Catalan" '((tutorial . "TUTORIAL.es") ; maybe... >> (charset iso-8859-1) >> (coding-system iso-latin-1 iso-latin-9) >> (coding-priority iso-latin-1) >> (input-method . "catalan-prefix") >> (nonascii-translation . iso-8859-1) >> (unibyte-display . iso-latin-1) >> (setup-function >> . (lambda () >> (modify-syntax-entry ?· "w" (standard-syntax-table)))) >> (exit-function >> . (lambda () >> (modify-syntax-entry ?· "_" (standard-syntax-table)))) >> ;; Fixme: >> ;; (sample-text . "Spanish (Español) ¡Hola!") >> (documentation . "\ >> This language environment uses the Latin-1 character set, sets >> the default input method to \"catalan-prefix\", and sets the >> syntax of `·' to word. It selects the Spanish tutorial, in the >> absence of a Catalan translation.")) >> '("European")) > > Thanks a lot. Have you got any idea of where this should be > put in order to be loaded automatically at start-up? 1. C-x C-f ~/.emacs 2. M-x find-library RET default.el 3. M-x find-library RET site-start.el > I tried in init.el, and in a file in the "language" directory > in /usr/share/emacs/23.1/lisp/ to no avail. > It says that there's "no match", when I try to set the language > environment to Catalan interactively. > >> You could make a bug report if you have more luck than me with reports >> about stuff I worked on. > > I will try, once I get it to work :) > > Cheers, > > Ernest > > > -- Kevin Rodgers Denver, Colorado, USA