From: Ergus <spacibba@aol.com>
To: emacs-devel@gnu.org
Subject: Issue with hide-ifdef and cc-mode
Date: Sun, 30 May 2021 09:08:22 +0200 [thread overview]
Message-ID: <20210530070822.h57mmtpp2n7dvpbf@Ergus> (raw)
In-Reply-To: 20210530070822.h57mmtpp2n7dvpbf.ref@Ergus
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
<code>
#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
next parent reply other threads:[~2021-05-30 7:08 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210530070822.h57mmtpp2n7dvpbf.ref@Ergus>
2021-05-30 7:08 ` Ergus [this message]
2021-05-30 11:01 ` Issue with hide-ifdef and cc-mode Daniel Martín
2021-05-30 18:14 ` Ergus
2021-05-30 18:53 ` Eli Zaretskii
2021-05-30 19:27 ` Ergus
2021-05-31 11:56 ` Eli Zaretskii
2021-05-30 19:42 ` Stefan Monnier
2021-05-30 20:26 ` Ergus
[not found] <20210527030630.ys6pbkbtqui66iuz.ref@Ergus>
2021-05-27 3:06 ` Ergus
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210530070822.h57mmtpp2n7dvpbf@Ergus \
--to=spacibba@aol.com \
--cc=emacs-devel@gnu.org \
/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.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.