help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: changing word boundaries


From: Dave Love
Subject: Re: changing word boundaries
Date: Sun, 01 Nov 2009 19:10:26 +0000
User-agent: Gnus/5.110011 (No Gnus v0.11)

Ernest Adrogué <eadrogue@gmx.net> writes:

> 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. :)

Well, it's a pretty odd way to do it.  If you really only want to use
the ligature in Text mode -- and not programming language comments, for
instance -- just amend `text-mode-syntax-table'.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]