* bug#5013: Enhancement to hideif.el
[not found] ` <fp1vjqnlet.fsf@fencepost.gnu.org>
@ 2011-03-01 4:31 ` Tony Hecker
2016-02-28 6:34 ` Lars Ingebrigtsen
2016-02-29 2:26 ` Lars Ingebrigtsen
2 siblings, 0 replies; 4+ messages in thread
From: Tony Hecker @ 2011-03-01 4:31 UTC (permalink / raw)
To: 5013
[-- Attachment #1: Type: text/plain, Size: 335 bytes --]
Hi,
I tested the hideif.el patch from Joe. It works in some cases but does not
seem to work with a series of #elif's like this case:
#if 0
function1();
#elif 1
function2(); // should not be hidden but is hidden
#elif 0
function3();
#elif 0
function4();
#endif
I do not have a fix (at least not right now).
Thanks,
Tony
[-- Attachment #2: Type: text/html, Size: 391 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#5013: Enhancement to hideif.el
[not found] ` <fp1vjqnlet.fsf@fencepost.gnu.org>
2011-03-01 4:31 ` bug#5013: Enhancement to hideif.el Tony Hecker
@ 2016-02-28 6:34 ` Lars Ingebrigtsen
2016-02-28 10:05 ` Andreas Schwab
2016-02-29 2:26 ` Lars Ingebrigtsen
2 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-28 6:34 UTC (permalink / raw)
To: Joe Matarazzo; +Cc: 5013
Joe Matarazzo <joe.matarazzo@gmail.com> writes:
> Severity: wishlist
> Tags: patch
>
> [ Resent from
> http://lists.gnu.org/archive/html/emacs-devel/2009-11/msg00426.html ]
>
> Hi - I've attached both a patch file and the modified version.
>
> I look forward to any feedback you might have to offer.
[...]
> ;;; hideif.el --- hides selected code within ifdef
>
> ;; Copyright (C) 1988, 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
> ;; Free Software Foundation, Inc.
Included was the entire changed version of hideif.el, so it's difficult
to review. If this is still an issue all these years later, could you
submit a patch instead?
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#5013: Enhancement to hideif.el
2016-02-28 6:34 ` Lars Ingebrigtsen
@ 2016-02-28 10:05 ` Andreas Schwab
0 siblings, 0 replies; 4+ messages in thread
From: Andreas Schwab @ 2016-02-28 10:05 UTC (permalink / raw)
To: Lars Ingebrigtsen; +Cc: 5013, Joe Matarazzo
Lars Ingebrigtsen <larsi@gnus.org> writes:
> submit a patch instead?
The patch was included.
Andreas.
--
Andreas Schwab, schwab@linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5
"And now for something completely different."
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#5013: Enhancement to hideif.el
[not found] ` <fp1vjqnlet.fsf@fencepost.gnu.org>
2011-03-01 4:31 ` bug#5013: Enhancement to hideif.el Tony Hecker
2016-02-28 6:34 ` Lars Ingebrigtsen
@ 2016-02-29 2:26 ` Lars Ingebrigtsen
2 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-29 2:26 UTC (permalink / raw)
To: Joe Matarazzo; +Cc: 5013
Joe Matarazzo <joe.matarazzo@gmail.com> writes:
> (defun hif-ifdef-to-endif ()
> - "If positioned at #ifX or #else form, skip to corresponding #endif."
> + "If positioned at #ifX, #elif, or #else form, skip to corresponding #endif."
> ;; (message "hif-ifdef-to-endif at %d" (point)) (sit-for 1)
> (hif-find-next-relevant)
> (cond ((hif-looking-at-ifX)
> (hif-ifdef-to-endif) ; find endif of nested if
> (hif-ifdef-to-endif)) ; find outer endif or else
> + ((hif-looking-at-elif)
> + (hif-ifdef-to-endif))
> ((hif-looking-at-else)
> (hif-ifdef-to-endif)) ; find endif following else
> ((hif-looking-at-endif)
> @@ -585,11 +590,14 @@
> (cond ((hif-looking-at-endif)
> (hif-endif-to-ifdef) ; find beginning of nested if
> (hif-endif-to-ifdef)) ; find beginning of outer if or else
> + ((hif-looking-at-elif)
> + (hif-endif-to-ifdef))
> ((hif-looking-at-else)
> (hif-endif-to-ifdef))
> ((hif-looking-at-ifX)
> 'done)
> - (t))) ; never gets here
> + (t
> + (error "Mismatched #endif")))) ; never gets here
This looks very much like the code currently in hideif.el, so I guess
this was applied already? Closing.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-02-29 2:26 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <ec3b86420911111503n7c4aee6dy669f1f7a958115b9@mail.gmail.com>
[not found] ` <jwvmy2sjs96.fsf-monnier+emacs@gnu.org>
[not found] ` <fp1vjqnlet.fsf@fencepost.gnu.org>
2011-03-01 4:31 ` bug#5013: Enhancement to hideif.el Tony Hecker
2016-02-28 6:34 ` Lars Ingebrigtsen
2016-02-28 10:05 ` Andreas Schwab
2016-02-29 2:26 ` Lars Ingebrigtsen
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).