From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ergus Newsgroups: gmane.emacs.devel Subject: Issue with hide-ifdef and cc-mode Date: Sun, 30 May 2021 09:08:22 +0200 Message-ID: <20210530070822.h57mmtpp2n7dvpbf@Ergus> References: <20210530070822.h57mmtpp2n7dvpbf.ref@Ergus> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="35152"; mail-complaints-to="usenet@ciao.gmane.io" To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane-mx.org@gnu.org Sun May 30 09:09:50 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 1lnFa1-00092q-Pe for ged-emacs-devel@m.gmane-mx.org; Sun, 30 May 2021 09:09:49 +0200 Original-Received: from localhost ([::1]:60778 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lnFa0-0000cz-SG for ged-emacs-devel@m.gmane-mx.org; Sun, 30 May 2021 03:09:48 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:60932) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lnFZ6-0008EB-QN for emacs-devel@gnu.org; Sun, 30 May 2021 03:08:52 -0400 Original-Received: from sonic309-15.consmr.mail.bf2.yahoo.com ([74.6.129.125]:38254) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lnFZ3-0001l8-Bc for emacs-devel@gnu.org; Sun, 30 May 2021 03:08:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=aol.com; s=a2048; t=1622358526; bh=J90Urz6b1MuKJOE/XBFho0l/LAvHhdazOc0C/DgZKVA=; h=Date:From:To:Subject:References:From:Subject:Reply-To; b=HZtlAuYDo+kt2fVOvLgDgyMJF0DOhI/YmZVi9m7zVxmiWjSErCTl+xrmDJXp8azyMLx+SO6/i8kmpRmwE11uZE7xm70+tz1B3Ld6eOuMB6z0UqHhXFQfEvX2vF/BPfKR6wnobI/L+wPtgNi7tSOT/QR8KZNeR+EVYQT0ZeQjxZ57F0gfHpwd0t0K6X2hIn0n7AJGBaIUVc2LedxzVpUQZloJfRyMXO0TueBOguqABx7YSB0ieZkB1ldDpEr4vpGwKdVR23EDta3KsfGIVm9LDA/sOwdnotnz5ti9wLli+iMoDXLA+hvdlyWM1JklBXRZYwAarYyG7jVl6KT/DN2BiQ== X-SONIC-DKIM-SIGN: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s2048; t=1622358526; bh=YFGr9qxa69LrRQLfONJ0B2uGfAS4/YExltk+7jIXAnH=; h=X-Sonic-MF:Date:From:To:Subject:From:Subject; b=FpWaoQCWyM42Z1p62JEBcmhuH2liSpkc0voVMyJQ+W9EtZ7eaPqSJkIkMNdMHgB7dKruB1z92hRpXnj3/gTZnUk3XR3it4gC8YzefbsthH/7eoS3PvXS6L7IfBXw4MeNnmQtGzxYGoxcAosExEhh4lx5d+vWybvzDFyYHxYgnIzvXDfuNFD+C2IfEs7aCNCZ0EBmZxUBgr1kFvXPTWWRCnFQR8PfuoSArXnyPwKjmlf2nOKa1GvNrgikWaUqH17Nu47I4/Q80uZ2N2C8vDm99lOZ60QEHI4qj1rYZynegz49hFhhkoeMNMvPr+fOf1HUhLZ7U7mXB0+UaFx9OHbFAw== X-YMail-OSG: QlZmQigVM1lpymo7sA7AcDhjajn1IgYU7nMx6n_TQm9Yq.iKy2zqFl4M.gkrpOV cZ8z_mXp2_ll4DDb7zrPmbcWf3m2_JQID2HWj.agMo9BcvwVWuk6A2GUryBAmf3zEhDYOhpgPslZ IrK6TrXJByfBecrjr9Kc_2xoQ_K3_ZJOf4RXFL.rPjXltA2uR5BOKCQhSBpVOMuEw6DL8VEvtQA0 DKA0xXDGUhiIPZtzUytZrP1VG7n6QnJJLczHp4e2z.sSoA1qIMSHTKEGSW6gOFjkLp9h_X8Q9Wlw G4ln6cOhqMKTBRb7XuaT7I.MFdYeP5Bt3rXZhSAECddLrxepYzJGzRfooWlof5S_vj5LEceefTYJ sVTVVMTbHmr1HpGgo6aI6EDNISxpsNOyuHDd1CXRCrX.KuLczTwWF5SN4yXKDvxWQVepQmSlv_0s Hzu.pXvNKeCJUnh16u4GtTUM0Po0f.XitvM9ban0ofRVzo8GMe_DMt1b_dHHrkUYR6Q6NaJFKslg K35pRy1.guhoJ..75bhpE_IgS8sO63846UQyiKrT8lT0U1mqnltzbm3qGVqGlJr6oC1YR7dKlCur KgwO0_aC8sDWQfi4cp9HFfRBhyiP78mp5ENKaMc3CSxnne6OHfXlutJWNaRc83KslrQlxrtGyZve loOcYZoMSb7JQ.rvQKXdhFBa4J1Dbiy8Sawo353Dfg2ZCv6bj2Xx9mk.2y0xbgMNceofETstVvRZ tdBjP_qaeYf91Qiay3WNb.E.Rj8Jajm1GSSwCYrno.gSjF4fTq1MIGTSl1i_RFfAkrKJwUFijtXt uXtDayuYiGZ1Kq75Ug8uOrMW.goJTTZv.amrzBV0pq X-Sonic-MF: Original-Received: from sonic.gate.mail.ne1.yahoo.com by sonic309.consmr.mail.bf2.yahoo.com with HTTP; Sun, 30 May 2021 07:08:46 +0000 Original-Received: by kubenode522.mail-prod1.omega.ir2.yahoo.com (VZM Hermes SMTP Server) with ESMTPA ID 09327eae74946110b642a7eaeca5f5d3; Sun, 30 May 2021 07:08:41 +0000 (UTC) Content-Disposition: inline X-Mailer: WebService/1.1.18368 mail.backend.jedi.jws.acl:role.jedi.acl.token.atz.jws.hermes.aol Received-SPF: pass client-ip=74.6.129.125; envelope-from=spacibba@aol.com; helo=sonic309-15.consmr.mail.bf2.yahoo.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action 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:270117 Archived-At: Hi: I sent this message to the emacs-help mailing list some days ago and I didn't receive any reply. So I'm resubmitting this here: I am trying to use hide-ifdef to shadow code like: #if 0 #endif But I found that either #if 0 or #if 1 produces the same result disabling the code inside. Some slightly more complex examples like: #define var 1 #ifdef var doesn't work either (of course). And when I try hif-evaluate-macro it says things like: false <= ‘#if 1’ or 1 is not defined... Unless the documentation says this function is capable to understand some more complex constructions like ||, && and arithmetic I only want to disable some code with #if 0 and enable it with #if 1... so my use case is probably the simplest one. Do we have anything smarter in emacs to shows #if 0 codes? Or is there any extra customization I am missing or is there any issue in the package itself? any idea? Also when I remove the #if macros from around the code the shadow face sometimes persist. I would expect such a functionality to be implemented with fontlock or so, but form an old thread in this mailing list I see that such a thing is not recommended. But this package is not very documented in the manual either so I am not sure If I am missing something. Right now I have only these options: ``` (setq-default hide-ifdef-shadow t hide-ifdef-initially t) ``` Any help than? Should I submit a bug? Thanks in advance, Ergus