From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dave Love Newsgroups: gmane.emacs.help Subject: Re: changing word boundaries Date: Sun, 01 Nov 2009 19:09:53 +0000 Message-ID: <87ljiqcb9a.fsf@fx-laptop.ukfsn.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1257142523 11552 80.91.229.12 (2 Nov 2009 06:15:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 2 Nov 2009 06:15:23 +0000 (UTC) Cc: help-gnu-emacs@gnu.org To: Ernest =?iso-8859-1?Q?Adrogu=E9?= Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Nov 02 07:15:16 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 1N4qCB-0007YS-JF for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Nov 2009 07:15:15 +0100 Original-Received: from localhost ([127.0.0.1]:43934 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4qCA-0004Ax-ME for geh-help-gnu-emacs@m.gmane.org; Mon, 02 Nov 2009 01:15:14 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N4fp8-0003sP-4n for help-gnu-emacs@gnu.org; Sun, 01 Nov 2009 14:10:46 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N4fp7-0003sC-L0 for help-gnu-emacs@gnu.org; Sun, 01 Nov 2009 14:10:45 -0500 Original-Received: from [199.232.76.173] (port=33299 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4fp7-0003s9-Hj for help-gnu-emacs@gnu.org; Sun, 01 Nov 2009 14:10:45 -0500 Original-Received: from mail.ukfsn.org ([77.75.108.10]:59581) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1N4fp7-00005g-3u for help-gnu-emacs@gnu.org; Sun, 01 Nov 2009 14:10:45 -0500 Original-Received: from localhost (smtp-filter.ukfsn.org [192.168.54.205]) by mail.ukfsn.org (Postfix) with ESMTP id B452BDF1F8; Sun, 1 Nov 2009 19:10:43 +0000 (GMT) Original-Received: from mail.ukfsn.org ([192.168.54.25]) by localhost (smtp-filter.ukfsn.org [192.168.54.205]) (amavisd-new, port 10024) with ESMTP id StPiYdquAIoq; Sun, 1 Nov 2009 19:10:43 +0000 (GMT) Original-Received: from fx-laptop (unknown [84.45.211.153]) by mail.ukfsn.org (Postfix) with ESMTP id 421F5DF1F5; Sun, 1 Nov 2009 19:10:43 +0000 (GMT) Original-Received: from fx by fx-laptop with local (Exim 4.69) (envelope-from ) id 1N4foQ-000152-27; Sun, 01 Nov 2009 19:10:02 +0000 X-Draft-From: ("gnu.emacs.help" 27935) User-Agent: Gnus/5.110011 (No Gnus v0.11) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Mon, 02 Nov 2009 01:14:34 -0500 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:69379 Archived-At: Ernest Adrogu=E9 writes: > Hi there, > > The Catalan language has a ligature consisting in one > "l" character, followed by a middle dot ("=B7"), followed > by another "l". See here for more details: > http://en.wikipedia.org/wiki/L=B7l#Catalan > > Is there a way to make emacs aware of this, so that it > doesn't treat a word containing "l=B7l" 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 =B7 to word, and set a suitable default input method. The existing one, `catalan-prefix', should presumably bind `~.' to `=B7', 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.] =20=20 (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 ?=B7 "w" (standard-syntax-table)))) (exit-function . (lambda () (modify-syntax-entry ?=B7 "_" (standard-syntax-table)))) ;; Fixme: ;; (sample-text . "Spanish (Espa=F1ol) =A1Hola!") (documentation . "\ This language environment uses the Latin-1 character set, sets the default input method to \"catalan-prefix\", and sets the syntax of `=B7' to word. It selects the Spanish tutorial, in the absence of a Catalan translation.")) '("European")) You could make a bug report if you have more luck than me with reports about stuff I worked on.