From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Fang lun gang Newsgroups: gmane.emacs.help Subject: define Macros automatically for hide-ifdef-mode Date: Thu, 09 Nov 2006 21:38:15 +0800 Organization: Bentium Ltd. (CN99) Message-ID: <871woc2114.fsf@mail.com> NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1163079716 10344 80.91.229.2 (9 Nov 2006 13:41:56 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Thu, 9 Nov 2006 13:41:56 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Nov 09 14:41:54 2006 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1GiAAD-0006Fv-LJ for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Nov 2006 14:41:53 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1GiAAD-0004I7-53 for geh-help-gnu-emacs@m.gmane.org; Thu, 09 Nov 2006 08:41:53 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!bloom-beacon.mit.edu!news.cn99.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 27 Original-NNTP-Posting-Host: 60.209.249.218 Original-X-Trace: news.cn99.com 1163081548 17745 60.209.249.218 (9 Nov 2006 14:12:28 GMT) Original-X-Complaints-To: usenet@news.cn99.com Original-NNTP-Posting-Date: Thu, 9 Nov 2006 14:12:28 +0000 (UTC) User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.0 (gnu/linux) Cancel-Lock: sha1:CPDE42gsSCBtQ5jFF6eCvVhMxIg= Original-Xref: shelby.stanford.edu gnu.emacs.help:142982 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:38600 Archived-At: I'm reading a lot of code recently. Since there are many "ifdef"s, I would like to use hide-ifdef-mode to hide some of them. However, hide-ifdef regards all those Macros undefined by default. Therefore, it hides all "ifdef" blocks. But what I want is: if not explicitly specified, a "ifdef" block won't been hidden. That is to say, all Macros are assumed to be defined. Setting hide-ifdef-use-define-alist is not affordable since there are so many Macros. ;; (add-hook 'hide-ifdef-mode-hook ;; (lambda () ;; (unless hide-ifdef-define-alist ;; (setq hide-ifdef-define-alist ;; '((list1 ONE TWO) ;; (list2 TWO THREE)))) ;; (hide-ifdef-use-define-alist 'list2))) ; use list2 by default ;; Does hide-ifdef provides any customization for that? Or do I have to hacking the hideif.el ? If I do, how should I do then? Thanks for your help in advance. -- Fang lun gang