[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Highlight non-ASCII characters in bibtex file
From: |
Andreas Politz |
Subject: |
Re: Highlight non-ASCII characters in bibtex file |
Date: |
Fri, 03 Dec 2010 15:45:33 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.0.50 (gnu/linux) |
Rainer M Krug <R.M.Krug@gmail.com> writes:
> On 12/03/2010 02:50 PM, Lennart Borgman wrote:
>> On Fri, Dec 3, 2010 at 2:44 PM, Peter Dyballa <Peter_Dyballa@web.de> wrote:
>>>
>>> Am 03.12.2010 um 13:31 schrieb Rainer M Krug:
>>>
>>>> Is there a way of loading the file into emacs and highlighting all
>>>> non-ASCII characters?
>>
What about this.
(define-minor-mode highlight-non-ascii-mode
"Highlight non-ascii characters in current buffer."
nil nil nil
(let ((kw '(("[^[:ascii:]]+" 0 'font-lock-warning-face prepend))))
(if highlight-non-ascii-mode
(font-lock-add-keywords nil kw)
(font-lock-remove-keywords nil kw))
(font-lock-fontify-buffer)))
-ap