unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [christensenthomas@gmail.com: C indentation (problem)]
@ 2007-03-14  3:23 Richard Stallman
  0 siblings, 0 replies; 9+ messages in thread
From: Richard Stallman @ 2007-03-14  3:23 UTC (permalink / raw)
  To: emacs-devel

Would someone please DTRT and ack?

------- Start of forwarded message -------
X-Spam-Status: No, score=1.4 required=5.0 tests=SPF_NEUTRAL,UNPARSEABLE_RELAY 
	autolearn=no version=3.1.0
From: Thomas Christensen <christensenthomas@gmail.com>
To: emacs-pretest-bug@gnu.org
Date: Tue, 13 Mar 2007 07:19:11 +0100 (CET)
Subject: C indentation (problem)

Hi emacs-pretest-bug,

In the emacs pretest I have indentation problems running php-mode.

The indentation breaks if I put in a php opening tag, otherwise it works
fine.  I have tracked the source of the problem to the new c-mode
which php-mode inherits.

I am not sure if it's a bug or the ancient php-mode just needs to
accommodate for the new emacs.

This is the indentation in c-mode (it is the same in php-mode):

<?   php
void foo() {
	bar();
     }
?>

the closing bracket aligns with the text in the php tag.

If this is not a bug, I would appreciate any information of how to
tweak c-mode settings to eliminate this closing indentation.

Sincerely

	Thomas

In GNU Emacs 22.0.95.6 (i686-pc-linux-gnu, GTK+ Version 2.8.20)
 of 2007-03-12 on toshiba
Windowing system distributor `The X.Org Foundation', version 11.0.70101000
configured using `configure  '--with-gtk' '--without-toolkit-scroll-bars''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_DK.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: C/l

Minor modes in effect:
  show-paren-mode: t
  iswitchb-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
<backspace> d SPC f o o ( ) SPC { <return> } <right> 
<up> <left> <up> <left> <left> <left> <down> <up> SPC 
SPC SPC <down> <tab> <down> <tab> <up> C-e <return> 
<tab> b a t r <backspace> <backspace> r ( ) ; <up> 
<tab> <down> <tab> <down> <tab> <down> C-x C-s <up> 
<up> <up> <up> C-a C-SPC C-SPC <down> <down> <down> 
<down> <down> <down> <down> M-w M-x e m a <tab> - <backspace> 
r <backspace> p <tab> <backspace> b <tab> C-g <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<menu-bar> <help-menu> <report-emacs-bug>

Recent messages:
Loading paren...done
Loading advice...done
end
For information about the GNU Project and its goals, type C-h C-p.
(New file) [2 times]
Wrote /home/thomasc/test.c
Mark set
Mark activated
Quit [2 times]
Loading emacsbug...done


_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------

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

* [christensenthomas@gmail.com: C indentation (problem)]
@ 2007-03-19  5:14 Richard Stallman
  2007-03-19 20:08 ` Alan Mackenzie
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Stallman @ 2007-03-19  5:14 UTC (permalink / raw)
  To: bug-cc-mode; +Cc: emacs-devel

Would someone please DTRT and ack?

------- Start of forwarded message -------
X-Spam-Status: No, score=1.4 required=5.0 tests=SPF_NEUTRAL,UNPARSEABLE_RELAY 
	autolearn=no version=3.1.0
From: Thomas Christensen <christensenthomas@gmail.com>
To: emacs-pretest-bug@gnu.org
Date: Tue, 13 Mar 2007 07:19:11 +0100 (CET)
Subject: C indentation (problem)

Hi emacs-pretest-bug,

In the emacs pretest I have indentation problems running php-mode.

The indentation breaks if I put in a php opening tag, otherwise it works
fine.  I have tracked the source of the problem to the new c-mode
which php-mode inherits.

I am not sure if it's a bug or the ancient php-mode just needs to
accommodate for the new emacs.

This is the indentation in c-mode (it is the same in php-mode):

<?   php
void foo() {
	bar();
     }
?>

the closing bracket aligns with the text in the php tag.

If this is not a bug, I would appreciate any information of how to
tweak c-mode settings to eliminate this closing indentation.

Sincerely

	Thomas

In GNU Emacs 22.0.95.6 (i686-pc-linux-gnu, GTK+ Version 2.8.20)
 of 2007-03-12 on toshiba
Windowing system distributor `The X.Org Foundation', version 11.0.70101000
configured using `configure  '--with-gtk' '--without-toolkit-scroll-bars''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_DK.UTF-8
  locale-coding-system: utf-8
  default-enable-multibyte-characters: t

Major mode: C/l

Minor modes in effect:
  show-paren-mode: t
  iswitchb-mode: t
  tooltip-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  auto-compression-mode: t
  line-number-mode: t
  transient-mark-mode: t
  abbrev-mode: t

Recent input:
<backspace> d SPC f o o ( ) SPC { <return> } <right> 
<up> <left> <up> <left> <left> <left> <down> <up> SPC 
SPC SPC <down> <tab> <down> <tab> <up> C-e <return> 
<tab> b a t r <backspace> <backspace> r ( ) ; <up> 
<tab> <down> <tab> <down> <tab> <down> C-x C-s <up> 
<up> <up> <up> C-a C-SPC C-SPC <down> <down> <down> 
<down> <down> <down> <down> M-w M-x e m a <tab> - <backspace> 
r <backspace> p <tab> <backspace> b <tab> C-g <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<help-echo> <help-echo> <help-echo> <help-echo> <help-echo> 
<menu-bar> <help-menu> <report-emacs-bug>

Recent messages:
Loading paren...done
Loading advice...done
end
For information about the GNU Project and its goals, type C-h C-p.
(New file) [2 times]
Wrote /home/thomasc/test.c
Mark set
Mark activated
Quit [2 times]
Loading emacsbug...done


_______________________________________________
emacs-pretest-bug mailing list
emacs-pretest-bug@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-pretest-bug
------- End of forwarded message -------

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

* Re: [christensenthomas@gmail.com: C indentation (problem)]
  2007-03-19  5:14 [christensenthomas@gmail.com: C indentation (problem)] Richard Stallman
@ 2007-03-19 20:08 ` Alan Mackenzie
  2007-03-20 23:45   ` Thomas Christensen
  2007-03-21 19:54   ` Thomas Christensen
  0 siblings, 2 replies; 9+ messages in thread
From: Alan Mackenzie @ 2007-03-19 20:08 UTC (permalink / raw)
  To: Thomas Christensen; +Cc: bug-cc-mode, emacs-devel

Hi, Thomas!

On Mon, Mar 19, 2007 at 01:14:54AM -0400, Richard Stallman wrote:
> Would someone please DTRT and ack?

You wrote:
> In the emacs pretest I have indentation problems running php-mode.

> The indentation breaks if I put in a php opening tag, otherwise it
> works fine.  I have tracked the source of the problem to the new c-mode
> which php-mode inherits.

Could you do a few things to help me diagnose this, please:

(i) Tell me about this PHP Mode.  Where do I find the PHP Mode that you
are using?  Who maintains it?  (Yourself, perhaps?)  It doesn't seem to
be part of Emacs 22 itself.  The information you've posted says "Major
mode: C/l", which isn't "PHP Mode".  How does php-mode work, here?
[Note: I don't know PHP, so be gentle on me, please!]

(ii) You say:
> The indentation breaks if I put in a php opening tag, otherwise it
> works fine.  I have tracked the source of the problem to the new c-mode
> which php-mode inherits.

Could you be more specific about what you've found here, please.  What
exactly have you found C Mode doing?  What version of CC Mode were you
using before which seemed to work all right? 

(iii) Could you post a dump of CC Mode's configuration.  You get this
with C-c C-b (or M-x c-submit-bug-report).

You say:
> This is the indentation in c-mode (it is the same in php-mode):
>
> <?   php
> void foo() {
> 	bar();
>      }
> ?>

In that little code snippet, could you please do C-u C-c C-s on each
line, to dump CC Mode's idea of each line's syntax, then post the
results.

> I am not sure if it's a bug or the ancient php-mode just needs to
> accommodate for the new emacs.

"<" and ">" are nasty tokens in C-like languages.  They can appear as
"i < 10", "#include <stdio.h>" and in C++ templates.  It could be that
the PHP "<?" is getting confused with one of these other uses.

Looking forward to hearing from you again,

-- 
Alan Mackenzie (Ittersbach, Germany).

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

* Re: [christensenthomas@gmail.com: C indentation (problem)]
  2007-03-19 20:08 ` Alan Mackenzie
@ 2007-03-20 23:45   ` Thomas Christensen
  2007-03-21 19:54   ` Thomas Christensen
  1 sibling, 0 replies; 9+ messages in thread
From: Thomas Christensen @ 2007-03-20 23:45 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: bug-cc-mode, emacs-devel

[-- Attachment #1: Type: text/plain, Size: 1963 bytes --]

Hi

Alan Mackenzie <acm@muc.de> writes:

> On Mon, Mar 19, 2007 at 01:14:54AM -0400, Richard Stallman wrote:
>> Would someone please DTRT and ack?
>
> You wrote:
>> In the emacs pretest I have indentation problems running php-mode.
>
>> The indentation breaks if I put in a php opening tag, otherwise it
>> works fine.  I have tracked the source of the problem to the new c-mode
>> which php-mode inherits.
>
> Could you do a few things to help me diagnose this, please:
>
> (i) Tell me about this PHP Mode.  Where do I find the PHP Mode that you
> are using?  Who maintains it?  (Yourself, perhaps?)  It doesn't seem to
> be part of Emacs 22 itself.  The information you've posted says "Major
> mode: C/l", which isn't "PHP Mode".  How does php-mode work, here?
> [Note: I don't know PHP, so be gentle on me, please!]

The php-mode is from http://sourceforge.net/projects/php-mode/.

My brief studies of php-mode.el told me that it is cc-mode + some
syntax highlighting, so I tried to see if the issue was with the CC
Mode.

> (ii) You say:
>> The indentation breaks if I put in a php opening tag, otherwise it
>> works fine.  I have tracked the source of the problem to the new c-mode
>> which php-mode inherits.
>
> Could you be more specific about what you've found here, please.  What
> exactly have you found C Mode doing?  What version of CC Mode were you
> using before which seemed to work all right? 

Currently I use the CC Mode shipped with this pretest, and I find it
working with Emacs 21.4 and it's shipped CC Mode.

What I found was that in:

  <?php
  void foo () {
    bar ();
    }
  ?>

the closing bracket of the function definition aligns with the text in
the tag, and not with the start of the function declaration, whereas
in:

  <?php
  void foo ()
  {
    bar ();
  }
  ?>

it works right.

> (iii) Could you post a dump of CC Mode's configuration.  You get this
> with C-c C-b (or M-x c-submit-bug-report).

I will try to attach this.


[-- Attachment #2: C-c C-b --]
[-- Type: text/plain, Size: 4328 bytes --]

Emacs  : GNU Emacs 22.0.96.2 (i686-pc-linux-gnu, GTK+ Version 2.10.9)
 of 2007-03-20 on toshiba
Package: CC Mode 5.31.4 (C/l)
Buffer Style: gnu
c-emacs-features: (pps-extended-state col-0-paren posix-char-classes gen-string-delim gen-comment-delim syntax-properties 1-bit)

current state:
==============
(setq
 c-basic-offset 2
 c-comment-only-line-offset '(0 . 0)
 c-indent-comment-alist '((anchored-comment column . 0) (end-block space . 1)
			  (cpp-end-block space . 2))
 c-indent-comments-syntactically-p nil
 c-block-comment-prefix ""
 c-comment-prefix-regexp '((pike-mode . "//+!?\\|\\**") (awk-mode . "#+")
			   (other . "//+\\|\\**"))
 c-doc-comment-style '((java-mode . javadoc) (pike-mode . autodoc)
		       (c-mode . gtkdoc))
 c-cleanup-list '(scope-operator)
 c-hanging-braces-alist '((substatement-open before after))
 c-hanging-colons-alist nil
 c-hanging-semi&comma-criteria '(c-semi&comma-inside-parenlist)
 c-backslash-column 48
 c-backslash-max-column 72
 c-special-indent-hook '(c-gnu-impose-minimum)
 c-label-minimum-indentation 1
 c-offsets-alist '((inexpr-class . +)
		   (inexpr-statement . +)
		   (lambda-intro-cont . +)
		   (inlambda . c-lineup-inexpr-block)
		   (template-args-cont c-lineup-template-args +)
		   (incomposition . +)
		   (inmodule . +)
		   (innamespace . +)
		   (inextern-lang . +)
		   (composition-close . 0)
		   (module-close . 0)
		   (namespace-close . 0)
		   (extern-lang-close . 0)
		   (composition-open . 0)
		   (module-open . 0)
		   (namespace-open . 0)
		   (extern-lang-open . 0)
		   (objc-method-call-cont . c-lineup-ObjC-method-call)
		   (objc-method-args-cont . c-lineup-ObjC-method-args)
		   (objc-method-intro . [0])
		   (friend . 0)
		   (cpp-define-intro c-lineup-cpp-define +)
		   (cpp-macro-cont . +)
		   (cpp-macro . [0])
		   (inclass . +)
		   (stream-op . c-lineup-streamop)
		   (arglist-cont-nonempty
		    c-lineup-gcc-asm-reg
		    c-lineup-arglist
		    )
		   (arglist-cont c-lineup-gcc-asm-reg 0)
		   (comment-intro
		    c-lineup-knr-region-comment
		    c-lineup-comment
		    )
		   (catch-clause . 0)
		   (else-clause . 0)
		   (do-while-closure . 0)
		   (access-label . -)
		   (case-label . 0)
		   (substatement . +)
		   (statement-case-intro . +)
		   (statement . 0)
		   (brace-entry-open . 0)
		   (brace-list-entry . 0)
		   (brace-list-intro . +)
		   (brace-list-close . 0)
		   (block-close . 0)
		   (block-open . 0)
		   (inher-cont . c-lineup-multi-inher)
		   (inher-intro . +)
		   (member-init-cont . c-lineup-multi-inher)
		   (member-init-intro . +)
		   (topmost-intro . 0)
		   (knr-argdecl . 0)
		   (func-decl-cont . +)
		   (inline-close . 0)
		   (class-close . 0)
		   (class-open . 0)
		   (defun-block-intro . +)
		   (defun-close . 0)
		   (defun-open . 0)
		   (c . c-lineup-C-comments)
		   (string . c-lineup-dont-change)
		   (topmost-intro-cont
		    first
		    c-lineup-topmost-intro-cont
		    c-lineup-gnu-DEFUN-intro-cont
		    )
		   (brace-list-open . +)
		   (inline-open . 0)
		   (arglist-close . c-lineup-arglist)
		   (arglist-intro . c-lineup-arglist-intro-after-paren)
		   (statement-cont . +)
		   (statement-case-open . +)
		   (label . 0)
		   (substatement-label . 0)
		   (substatement-open . +)
		   (knr-argdecl-intro . 5)
		   (statement-block-intro . +)
		   )
 c-buffer-is-cc-mode 'c-mode
 c-tab-always-indent t
 c-syntactic-indentation t
 c-syntactic-indentation-in-macros t
 c-ignore-auto-fill '(string cpp code)
 c-auto-align-backslashes t
 c-backspace-function 'backward-delete-char-untabify
 c-delete-function 'delete-char
 c-electric-pound-behavior nil
 c-default-style '((java-mode . "java") (awk-mode . "awk") (other . "gnu"))
 c-enable-xemacs-performance-kludge-p nil
 c-old-style-variable-behavior nil
 defun-prompt-regexp nil
 tab-width 8
 comment-column 32
 parse-sexp-ignore-comments t
 parse-sexp-lookup-properties nil
 auto-fill-function nil
 comment-multi-line t
 comment-start-skip "\\(//+\\|/\\*+\\)\\s *"
 fill-prefix nil
 fill-column 70
 paragraph-start "[ 	]*\\(//+\\|\\**\\)[ 	]*$\\|^\f"
 adaptive-fill-mode t
 adaptive-fill-regexp "[ 	]*\\(//+\\|\\**\\)[ 	]*\\([ 	]*\\([-!|#%;>*·•‣⁃◦]+[ 	]*\\)*\\)"
 )

[-- Attachment #3: Type: text/plain, Size: 1177 bytes --]


> You say:
>> This is the indentation in c-mode (it is the same in php-mode):
>>
>> <?   php
>> void foo() {
>> 	bar();
>>      }
>> ?>
>
> In that little code snippet, could you please do C-u C-c C-s on each
> line, to dump CC Mode's idea of each line's syntax, then post the
> results.

Here it is:

  <?php				/* ((topmost-intro 1)) */
  void foo () {			/* ((topmost-intro-cont 1)) */
    bar ();			/* ((defun-block-intro 1)) */
    }				/* ((defun-close 3)) */
  ?>				/* ((topmost-intro 125)) */

And the flawless one:

  <?php				/* ((topmost-intro 1)) */
  void foo ()			/* ((topmost-intro-cont 1)) */
  {				/* ((defun-open 1)) */
    bar ();			/* ((defun-block-intro 81)) */
  }				/* ((defun-close 81)) */
  ?>				/* ((topmost-intro 152)) */

>> I am not sure if it's a bug or the ancient php-mode just needs to
>> accommodate for the new emacs.
>
> "<" and ">" are nasty tokens in C-like languages.  They can appear as
> "i < 10", "#include <stdio.h>" and in C++ templates.  It could be that
> the PHP "<?" is getting confused with one of these other uses.

I think that sound reasonable.

> Looking forward to hearing from you again,

Glad if I can help.

	Thomas

[-- Attachment #4: Type: text/plain, Size: 345 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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

* Re: [christensenthomas@gmail.com: C indentation (problem)]
  2007-03-19 20:08 ` Alan Mackenzie
  2007-03-20 23:45   ` Thomas Christensen
@ 2007-03-21 19:54   ` Thomas Christensen
  2007-03-22  4:37     ` Stefan Monnier
  1 sibling, 1 reply; 9+ messages in thread
From: Thomas Christensen @ 2007-03-21 19:54 UTC (permalink / raw)
  To: Alan Mackenzie; +Cc: bug-cc-mode, emacs-devel


[-- Attachment #1.1: Type: text/plain, Size: 690 bytes --]

On 19 Mar 2007 21:08:19 +0100, Alan Mackenzie <acm@muc.de> wrote:
>
> (i) Tell me about this PHP Mode.  Where do I find the PHP Mode that you
> are using?  Who maintains it?  (Yourself, perhaps?)  It doesn't seem to
> be part of Emacs 22 itself.  The information you've posted says "Major
> mode: C/l", which isn't "PHP Mode".  How does php-mode work, here?
> [Note: I don't know PHP, so be gentle on me, please!]
>


I feel I failed to mention the original problem.  The original problem was
this indentation using the php-mode:

  <?php
  function foo() {
    echo "bar\n";
    }

  foo();
  ?>

As you can see php syntax is closely related to C syntax.

Hope this helps.

        Thomas

[-- Attachment #1.2: Type: text/html, Size: 1200 bytes --]

[-- Attachment #2: Type: text/plain, Size: 345 bytes --]

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV

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

* Re: [christensenthomas@gmail.com: C indentation (problem)]
  2007-03-21 19:54   ` Thomas Christensen
@ 2007-03-22  4:37     ` Stefan Monnier
  2007-03-22 19:44       ` Thomas Christensen
  2007-03-25  1:45       ` Chong Yidong
  0 siblings, 2 replies; 9+ messages in thread
From: Stefan Monnier @ 2007-03-22  4:37 UTC (permalink / raw)
  To: Thomas Christensen; +Cc: bug-cc-mode, Alan Mackenzie, emacs-devel

>  <?php
>  function foo() {
>    echo "bar\n";
>    }

>  foo();
>  ?>

> As you can see php syntax is closely related to C syntax.

Funny, other than the use of {...} and ; I don't see it as closely related
to C syntax.

It probably works OK to treat it as C as long as your C mode is sufficiently
unsophisticated.


        Stefan

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

* Re: [christensenthomas@gmail.com: C indentation (problem)]
  2007-03-22  4:37     ` Stefan Monnier
@ 2007-03-22 19:44       ` Thomas Christensen
  2007-03-23 16:43         ` Stefan Monnier
  2007-03-25  1:45       ` Chong Yidong
  1 sibling, 1 reply; 9+ messages in thread
From: Thomas Christensen @ 2007-03-22 19:44 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: bug-cc-mode, Alan Mackenzie, emacs-devel

On Thu, Mar 22, 2007 at 12:37:44AM -0400, Stefan Monnier wrote:
> Funny, other than the use of {...} and ; I don't see it as closely related
> to C syntax.

To be honest that is what I referred to, I should have said resembles
instead.

I am no expert in PHP, but what I needed to use it for would work
if not for the inconsistency in CC Mode--which it seems to be for me.

> It probably works OK to treat it as C as long as your C mode is sufficiently
> unsophisticated.

I don't find CC Mode unsophisticated and php-mode would work nice enough if
not for the above.

If you are aiming at php as an inferior language I think I would agree
;)

	Thomas

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV


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

* Re: [christensenthomas@gmail.com: C indentation (problem)]
  2007-03-22 19:44       ` Thomas Christensen
@ 2007-03-23 16:43         ` Stefan Monnier
  0 siblings, 0 replies; 9+ messages in thread
From: Stefan Monnier @ 2007-03-23 16:43 UTC (permalink / raw)
  To: Thomas Christensen; +Cc: bug-cc-mode, Alan Mackenzie, emacs-devel

>> It probably works OK to treat it as C as long as your C mode is sufficiently
>> unsophisticated.
> I don't find CC Mode unsophisticated

Indeed, which is why it's not working well with PHP code.


        Stefan

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

* Re: [christensenthomas@gmail.com: C indentation (problem)]
  2007-03-22  4:37     ` Stefan Monnier
  2007-03-22 19:44       ` Thomas Christensen
@ 2007-03-25  1:45       ` Chong Yidong
  1 sibling, 0 replies; 9+ messages in thread
From: Chong Yidong @ 2007-03-25  1:45 UTC (permalink / raw)
  To: emacs-devel

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>  <?php
>>  function foo() {
>>    echo "bar\n";
>>    }
>
>>  foo();
>>  ?>
>
>> As you can see php syntax is closely related to C syntax.
>
> Funny, other than the use of {...} and ; I don't see it as closely related
> to C syntax.
>
> It probably works OK to treat it as C as long as your C mode is sufficiently
> unsophisticated.

Indeed; I am not sure what we can do here; it is the third-party
php-mode package should be fixed.

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

end of thread, other threads:[~2007-03-25  1:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-03-19  5:14 [christensenthomas@gmail.com: C indentation (problem)] Richard Stallman
2007-03-19 20:08 ` Alan Mackenzie
2007-03-20 23:45   ` Thomas Christensen
2007-03-21 19:54   ` Thomas Christensen
2007-03-22  4:37     ` Stefan Monnier
2007-03-22 19:44       ` Thomas Christensen
2007-03-23 16:43         ` Stefan Monnier
2007-03-25  1:45       ` Chong Yidong
  -- strict thread matches above, loose matches on Subject: below --
2007-03-14  3:23 Richard Stallman

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).