GNU bug report logs - #5013
Enhancement to hideif.el

Previous Next

Package: emacs;

Reported by: Joe Matarazzo <joe.matarazzo <at> gmail.com>

Date: Mon, 23 Nov 2009 00:25:04 UTC

Severity: wishlist

Tags: fixed, moreinfo, patch

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 5013 in the body.
You can then email your comments to 5013 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report stored :
bug#5013; Package emacs. (Mon, 23 Nov 2009 00:25:05 GMT) Full text and rfc822 format available.

Message #3 received at quiet <at> emacsbugs.donarmstrong.com (full text, mbox):

From: Joe Matarazzo <joe.matarazzo <at> gmail.com>
To: quiet <at> debbugs.gnu.org
Subject: Re: Enhancement to hideif.el
Date: Fri, 13 Nov 2009 13:23:55 -0800
[Message part 1 (text/plain, inline)]
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.

Thanks,
Joe

On Wed, Nov 11, 2009 at 8:13 PM, Stefan Monnier
<monnier <at> iro.umontreal.ca> wrote:
>> I added an enhancement to hideif.el, based on the 22.3.1 windows
>> distribution of Emacs, to recognize  the #elif preprocessor directive.
>> I would like to contribute this improvement for future distributions.
>> I tried contacting the listed maintainer of this library, Daniel
>> LaLiberte (liberte <at> a.cs.uiuc.edu), but didn't receive a response.
>
> The file's "Maintainer" lists "FSF" (the "Author" part is just
> historical information), so this is the right place.
>
>> Is there someone else I should follow up with to review these changes,
>> and potentially get them incorporated?
>
> You can send it via M-x report-emacs-bug, or just send it here.
>
>
>        Stefan
>
[hideif.zip (application/zip, attachment)]

Information forwarded to owner <at> debbugs.gnu.org, bug-gnu-emacs <at> gnu.org:
bug#5013; Package emacs. (Tue, 01 Mar 2011 04:45:03 GMT) Full text and rfc822 format available.

Message #6 received at 5013 <at> debbugs.gnu.org (full text, mbox):

From: Tony Hecker <tonyhecker <at> gmail.com>
To: 5013 <at> debbugs.gnu.org
Subject: Re: Enhancement to hideif.el
Date: Mon, 28 Feb 2011 22:31:16 -0600
[Message part 1 (text/plain, inline)]
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
[Message part 2 (text/html, inline)]

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5013; Package emacs. (Sun, 28 Feb 2016 06:36:01 GMT) Full text and rfc822 format available.

Message #9 received at 5013 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Joe Matarazzo <joe.matarazzo <at> gmail.com>
Cc: 5013 <at> debbugs.gnu.org
Subject: Re: bug#5013: Enhancement to hideif.el
Date: Sun, 28 Feb 2016 17:34:57 +1100
Joe Matarazzo <joe.matarazzo <at> 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




Added tag(s) moreinfo. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Sun, 28 Feb 2016 06:36:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5013; Package emacs. (Sun, 28 Feb 2016 10:06:02 GMT) Full text and rfc822 format available.

Message #14 received at 5013 <at> debbugs.gnu.org (full text, mbox):

From: Andreas Schwab <schwab <at> linux-m68k.org>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: 5013 <at> debbugs.gnu.org, Joe Matarazzo <joe.matarazzo <at> gmail.com>
Subject: Re: bug#5013: Enhancement to hideif.el
Date: Sun, 28 Feb 2016 11:05:26 +0100
Lars Ingebrigtsen <larsi <at> gnus.org> writes:

> submit a patch instead?

The patch was included.

Andreas.

-- 
Andreas Schwab, schwab <at> linux-m68k.org
GPG Key fingerprint = 58CA 54C7 6D53 942B 1756  01D3 44D5 214B 8276 4ED5
"And now for something completely different."




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#5013; Package emacs. (Mon, 29 Feb 2016 02:27:02 GMT) Full text and rfc822 format available.

Message #17 received at 5013 <at> debbugs.gnu.org (full text, mbox):

From: Lars Ingebrigtsen <larsi <at> gnus.org>
To: Joe Matarazzo <joe.matarazzo <at> gmail.com>
Cc: 5013 <at> debbugs.gnu.org
Subject: Re: bug#5013: Enhancement to hideif.el
Date: Mon, 29 Feb 2016 13:26:26 +1100
Joe Matarazzo <joe.matarazzo <at> 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




Added tag(s) fixed. Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 29 Feb 2016 02:28:02 GMT) Full text and rfc822 format available.

bug closed, send any further explanations to 5013 <at> debbugs.gnu.org and Joe Matarazzo <joe.matarazzo <at> gmail.com> Request was from Lars Ingebrigtsen <larsi <at> gnus.org> to control <at> debbugs.gnu.org. (Mon, 29 Feb 2016 02:28:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Mon, 28 Mar 2016 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 9 years and 85 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.