[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: changing word boundaries
From: |
Andreas Politz |
Subject: |
Re: changing word boundaries |
Date: |
Sun, 18 Oct 2009 23:09:39 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.1 (gnu/linux) |
Ernest Adrogué <eadrogue@gmx.net> 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?
>
> Thanks.
>
> PS. Please CC me, if you reply to this.
You could use dynamic syntax-tables via font-lock.
(add-hook 'text-mode-hook
(lambda nil
(set (make-variable-buffer-local
'parse-sexp-lookup-properties) t)
;; get font-lock started
(unless font-lock-defaults
(setq font-lock-defaults '(nil t)))
(add-to-list
(make-variable-buffer-local
'font-lock-syntactic-keywords)
;; let ! between 2*a have word syntax
'("a\\(!\\)a" 1 "w"))))
Replace `a' and `!' with your characters and it'll work,
hopefully.
-ap