[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Issue with hide-ifdef and cc-mode
From: |
Ergus |
Subject: |
Issue with hide-ifdef and cc-mode |
Date: |
Sun, 30 May 2021 09:08:22 +0200 |
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
- Issue with hide-ifdef and cc-mode,
Ergus <=