From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: Issue with hide-ifdef and cc-mode Date: Sun, 30 May 2021 21:53:15 +0300 Message-ID: <83pmx82gv8.fsf@gnu.org> References: <20210530070822.h57mmtpp2n7dvpbf.ref@Ergus> <20210530070822.h57mmtpp2n7dvpbf@Ergus> <20210530181411.jquh47dwgxtctmzc@Ergus> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26905"; mail-complaints-to="usenet@ciao.gmane.io" Cc: acm@muc.de, emacs-devel@gnu.org, mardani29@yahoo.es To: Ergus Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 30 20:53:47 2021 Return-path: Envelope-to: ged-emacs-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lnQZG-0006oh-Mn for ged-emacs-devel@m.gmane-mx.org; Sun, 30 May 2021 20:53:46 +0200 Original-Received: from localhost ([::1]:37448 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnQZF-0008Sf-A5 for ged-emacs-devel@m.gmane-mx.org; Sun, 30 May 2021 14:53:45 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:41614) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnQYh-0007mk-0i for emacs-devel@gnu.org; Sun, 30 May 2021 14:53:12 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:44030) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnQYd-0006Ia-BV; Sun, 30 May 2021 14:53:09 -0400 Original-Received: from 84.94.185.95.cable.012.net.il ([84.94.185.95]:1060 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnQYc-0002fJ-Rl; Sun, 30 May 2021 14:53:07 -0400 In-Reply-To: <20210530181411.jquh47dwgxtctmzc@Ergus> (message from Ergus on Sun, 30 May 2021 20:14:11 +0200) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.io gmane.emacs.devel:270143 Archived-At: > Date: Sun, 30 May 2021 20:14:11 +0200 > From: Ergus > Cc: emacs-devel@gnu.org, Alan Mackenzie > > I didn't know I need to manually call hide-ifdefs every time I change > the preprocessor argument. Because none of this is documented in the > manual. But also calling that makes the functionality pretty > sub-optimal. Please be sure to read the commentary at the beginning of hideif.el, it explains quite a lot. > It is bad that this functionality works fine out of the box either in > vim and in VS Code and other editors but not in emacs without user > explicit intervention. ??? How can Emacs know which preprocessor symbols are defined and which undefined? You have "C-c @ d" and "C-c @ u" to tell Emacs which symbols are defined and which undefined. > So I am not sure how difficult may be to do it automatic without killing > the performance... Like font-lock does with everything else... Soes it > really kills performance to add his to font-lock? I'm not sure I understand: what do you need to automate? Once you turn on hiding, the display automatically changes as you define and undefine preprocessor symbols.