[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Font lock for #if 0 ... #endif
From: |
martin rudalics |
Subject: |
Re: Font lock for #if 0 ... #endif |
Date: |
Fri, 18 May 2007 23:29:03 +0200 |
User-agent: |
Mozilla Thunderbird 1.0 (Windows/20041206) |
> Ok. I guess it really isn't possible to do what I wanted to anyway.
Add the following lines to your .emacs:
(require 'hideif)
(defun hide-ifdef-region-internal (start end)
(remove-overlays start end 'face 'font-lock-warning-face)
(let ((o (make-overlay start end)))
(overlay-put o 'face 'font-lock-warning-face)))
(defun hif-show-ifdef-region (start end)
"Everything between START and END is made visible."
(remove-overlays start end 'face 'font-lock-warning-face))
Save and (evaluate .emacs or) restart Emacs, open the file of
your choice, and do
M-x hide-ifdefs