[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: changing word boundaries
From: |
Ernest Adrogué |
Subject: |
Re: changing word boundaries |
Date: |
Tue, 20 Oct 2009 02:06:36 +0200 |
User-agent: |
Mutt/1.5.20 (2009-06-14) |
18/10/09 @ 23:08 (+0200), thus spake Andreas Politz:
> 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.
It does what I wanted. :)
Thanks!
Ernest