all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#4019: command to move point to #else (or #elif) in c-mode
@ 2009-08-02 18:18 Dan Nicolaescu
  2022-07-10  2:53 ` Stefan Kangas
  0 siblings, 1 reply; 8+ messages in thread
From: Dan Nicolaescu @ 2009-08-02 18:18 UTC (permalink / raw)
  To: bug-gnu-emacs


When looking at code with a lot of preprocessor conditionals, a lot of
times it is very useful when the point is at an #if to move it the
corresponding #else (or #elif) to check what is happening on the other
branch of the #if.  C-c C-p and C-c C-n are not very useful when you
have to deal with a lot of nested and not nested #if #else.

Please consider adding such a command.

Thanks!







^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#4019: command to move point to #else (or #elif) in c-mode
  2009-08-02 18:18 bug#4019: command to move point to #else (or #elif) in c-mode Dan Nicolaescu
@ 2022-07-10  2:53 ` Stefan Kangas
  2022-07-10 10:35   ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
  0 siblings, 1 reply; 8+ messages in thread
From: Stefan Kangas @ 2022-07-10  2:53 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: 4019, Dan Nicolaescu

Hi Alan,

Dan Nicolaescu <dann@ics.uci.edu> writes:

> When looking at code with a lot of preprocessor conditionals, a lot of
> times it is very useful when the point is at an #if to move it the
> corresponding #else (or #elif) to check what is happening on the other
> branch of the #if.  C-c C-p and C-c C-n are not very useful when you
> have to deal with a lot of nested and not nested #if #else.

This wishlist request was reported in 2009, but never got a reply.

It seems to me that such a command would be useful but is still missing.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#4019: command to move point to #else (or #elif) in c-mode
  2022-07-10  2:53 ` Stefan Kangas
@ 2022-07-10 10:35   ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-07-10 10:48     ` Stefan Kangas
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-07-10 10:35 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 4019, Alan Mackenzie, Dan Nicolaescu

Stefan Kangas <stefan@marxist.se> writes:

> Hi Alan,
>
> Dan Nicolaescu <dann@ics.uci.edu> writes:
>
>> When looking at code with a lot of preprocessor conditionals, a lot of
>> times it is very useful when the point is at an #if to move it the
>> corresponding #else (or #elif) to check what is happening on the other
>> branch of the #if.  C-c C-p and C-c C-n are not very useful when you
>> have to deal with a lot of nested and not nested #if #else.
>
> This wishlist request was reported in 2009, but never got a reply.
>
> It seems to me that such a command would be useful but is still missing.

There are c-down-conditional-with-else and c-up-conditional-with-else,
which you can bind to a key if you use them frequently.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#4019: command to move point to #else (or #elif) in c-mode
  2022-07-10 10:35   ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-07-10 10:48     ` Stefan Kangas
  2022-07-10 11:16       ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-07-10 11:51       ` Alan Mackenzie
  0 siblings, 2 replies; 8+ messages in thread
From: Stefan Kangas @ 2022-07-10 10:48 UTC (permalink / raw)
  To: Daniel Martín; +Cc: 4019, Alan Mackenzie, Dan Nicolaescu

Daniel Martín <mardani29@yahoo.es> writes:

> There are c-down-conditional-with-else and c-up-conditional-with-else,
> which you can bind to a key if you use them frequently.

OK, so I guess this has been fixed meanwhile?  Should the request be
closed?





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#4019: command to move point to #else (or #elif) in c-mode
  2022-07-10 10:48     ` Stefan Kangas
@ 2022-07-10 11:16       ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
  2022-07-10 11:51       ` Alan Mackenzie
  1 sibling, 0 replies; 8+ messages in thread
From: Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors @ 2022-07-10 11:16 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 4019, Alan Mackenzie, Dan Nicolaescu

Stefan Kangas <stefan@marxist.se> writes:

> Daniel Martín <mardani29@yahoo.es> writes:
>
>> There are c-down-conditional-with-else and c-up-conditional-with-else,
>> which you can bind to a key if you use them frequently.
>
> OK, so I guess this has been fixed meanwhile?  Should the request be
> closed?

Yes, I think so.





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#4019: command to move point to #else (or #elif) in c-mode
  2022-07-10 10:48     ` Stefan Kangas
  2022-07-10 11:16       ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
@ 2022-07-10 11:51       ` Alan Mackenzie
  2022-07-10 13:06         ` Lars Ingebrigtsen
  2022-08-08 12:46         ` Lars Ingebrigtsen
  1 sibling, 2 replies; 8+ messages in thread
From: Alan Mackenzie @ 2022-07-10 11:51 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: 4019, Dan Nicolaescu, Daniel Martín

Hello, Stefan.

On Sun, Jul 10, 2022 at 03:48:21 -0700, Stefan Kangas wrote:
> Daniel Martín <mardani29@yahoo.es> writes:

> > There are c-down-conditional-with-else and c-up-conditional-with-else,
> > which you can bind to a key if you use them frequently.

> OK, so I guess this has been fixed meanwhile?

No.  The two commands have always been there (for values of "always"
greater that 20 years).  Maybe they need more publicity, somehow.

> Should the request be closed?

I'm not sure that c-down/up-conditional-with-else are exactly what the
OP is asking for.

-- 
Alan Mackenzie (Nuremberg, Germany).





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#4019: command to move point to #else (or #elif) in c-mode
  2022-07-10 11:51       ` Alan Mackenzie
@ 2022-07-10 13:06         ` Lars Ingebrigtsen
  2022-08-08 12:46         ` Lars Ingebrigtsen
  1 sibling, 0 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2022-07-10 13:06 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: 4019, Dan Nicolaescu, Stefan Kangas, Daniel Martín

Alan Mackenzie <acm@muc.de> writes:

> I'm not sure that c-down/up-conditional-with-else are exactly what the
> OP is asking for.

Me neither, but this reminds me -- do we have a command/minor mode that
tells you all the C conditionals you're inside?  I'd love a minor mode
that'd say (in the mode line, for instance), that I'm inside

HAVE_UNEXEC -> DOUG_LEA_MALLOC

or whatever.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 8+ messages in thread

* bug#4019: command to move point to #else (or #elif) in c-mode
  2022-07-10 11:51       ` Alan Mackenzie
  2022-07-10 13:06         ` Lars Ingebrigtsen
@ 2022-08-08 12:46         ` Lars Ingebrigtsen
  1 sibling, 0 replies; 8+ messages in thread
From: Lars Ingebrigtsen @ 2022-08-08 12:46 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: 4019, Dan Nicolaescu, Stefan Kangas, Daniel Martín

Alan Mackenzie <acm@muc.de> writes:

>> OK, so I guess this has been fixed meanwhile?
>
> No.  The two commands have always been there (for values of "always"
> greater that 20 years).  Maybe they need more publicity, somehow.
>
>> Should the request be closed?
>
> I'm not sure that c-down/up-conditional-with-else are exactly what the
> OP is asking for.

There wasn't any response in a month, and it seems unlikely that
there'll be more progress here without input from the original bug
reporter, so I'm closing this bug report.

If progress can be made, please respond to the debbugs address and we'll
reopen.





^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-08-08 12:46 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-08-02 18:18 bug#4019: command to move point to #else (or #elif) in c-mode Dan Nicolaescu
2022-07-10  2:53 ` Stefan Kangas
2022-07-10 10:35   ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-10 10:48     ` Stefan Kangas
2022-07-10 11:16       ` Daniel Martín via Bug reports for GNU Emacs, the Swiss army knife of text editors
2022-07-10 11:51       ` Alan Mackenzie
2022-07-10 13:06         ` Lars Ingebrigtsen
2022-08-08 12:46         ` Lars Ingebrigtsen

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.