all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#877: 23.0.60; c-mode indentation and php
@ 2008-09-03 21:34 Lennart Borgman (gmail)
  2008-09-04  8:33 ` bug#880: " Alan Mackenzie
  0 siblings, 1 reply; 3+ messages in thread
From: Lennart Borgman (gmail) @ 2008-09-03 21:34 UTC (permalink / raw)
  To: emacs-pretest-bug, Alan Mackenzie

In php-mode.el (not yet a part of Emacs, but has been discussed for
inclusion) c-indent-line is used for indentation. That works nicely for
the php code part of a php template page, but there is a disturbing
glitch that probably can be fixed.

Constructs like the one below are rather common.

   if (1) {
 ?>
  ...
 <?php
     }

If you try to indent the line with the single "}" in c-mode it does not
get aligned with "if (1) {". I have narrowed this down to

   if (1) {
 ?php
     }

Adding a semicolon after "?php" makes everything work.

Is the current indentation behaviour in this case useful in some way? Is
there some option to change it?

The example came from a bug report/question for nXhtml:

  https://answers.launchpad.net/nxhtml/+question/43320


In GNU Emacs 23.0.60.1 (i386-mingw-nt5.1.2600)
 of 2008-09-03
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --no-opt --cflags
-Ic:/g/include -fno-crossjumping'






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

end of thread, other threads:[~2008-09-04 16:42 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-09-03 21:34 bug#877: 23.0.60; c-mode indentation and php Lennart Borgman (gmail)
2008-09-04  8:33 ` bug#880: " Alan Mackenzie
2008-09-04 16:42   ` Glenn Morris

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.