unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: martin rudalics <rudalics@gmx.at>
To: namesagame-usenet@yahoo.com
Cc: help-gnu-emacs@gnu.org
Subject: Re: Font lock for #if 0 ... #endif
Date: Fri, 18 May 2007 23:29:03 +0200	[thread overview]
Message-ID: <464E1A9F.90303@gmx.at> (raw)

 > 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

             reply	other threads:[~2007-05-18 21:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-18 21:29 martin rudalics [this message]
     [not found] <mailman.726.1179297177.32220.help-gnu-emacs@gnu.org>
2007-05-18 15:11 ` Font lock for #if 0 ... #endif gamename
2007-06-09 22:24 ` Stefan Monnier
  -- strict thread matches above, loose matches on Subject: below --
2007-05-29 12:29 martin rudalics
     [not found] <mailman.828.1179524023.32220.help-gnu-emacs@gnu.org>
2007-05-24 23:49 ` gamename
2007-05-25  5:54   ` Eli Zaretskii
2007-05-16  6:13 martin rudalics
2007-05-15  1:50 gamename

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=464E1A9F.90303@gmx.at \
    --to=rudalics@gmx.at \
    --cc=help-gnu-emacs@gnu.org \
    --cc=namesagame-usenet@yahoo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).