[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: bug#7814: Fwd: debugger entered on c-electric-paren
From: |
Lennart Borgman |
Subject: |
Re: bug#7814: Fwd: debugger entered on c-electric-paren |
Date: |
Wed, 23 Feb 2011 03:13:21 +0100 |
This seems to have get stucked. That means we do not have a really
working php-mode at the moment. Anything we can do?
On Thu, Jan 13, 2011 at 10:31 PM, Lennart Borgman
<address@hidden> wrote:
> On Thu, Jan 13, 2011 at 10:10 PM, Lennart Borgman
> <address@hidden> wrote:
>> Since Aaron has not had time to respond yet I looked a little bit at
>> php-mode.el. Some comments below.
>>
>>> On Wed, Jan 12, 2011 at 8:35 PM, Alan Mackenzie <address@hidden> wrote:
>>>>
>>>> I've downloaded that and grepped it. There are no CC Mode initialisation
>>>> calls in php-mode.el. For comparison, there are three such calls in
>>>> csharp-mode.el, namely:
>>>>
>>>> (c-initialize-cc-mode t)
>>>> (c-init-language-vars csharp-mode)
>>>> (c-common-init 'csharp-mode)
>>>>
>>>> C#'s initialisation is probably correct, and could serve as a model for
>>>> PHP Mode. In particular the call to `c-common-init' is the essential
>>>> one.
>>
>> But the two modes are defined a bit differently:
>>
>> (defun csharp-mode ()
>>
>> vs
>>
>> (define-derived-mode php-mode c-mode "PHP"
>>
>> This means that php-mode has already called (c-initialize-cc-mode t)
>> since c-mode does it.
>>
>> c-mode also calls
>>
>> (c-init-language-vars-for 'c-mode)
>> (c-common-init 'c-mode)
>>
>> Should these be called again with 'php-mode as parameter, or?
>
> Hm. Tested like this:
>
> (define-derived-mode php-mode c-mode "PHP"
> "Major mode for editing PHP code.\n\n\\{php-mode-map}"
> (c-add-language 'php-mode 'c-mode)
>
> ;; fix-me: testing, adding these for nXhtml bug#336041
> (c-initialize-cc-mode t)
> (c-init-language-vars php-mode)
> (c-common-init 'php-mode)
>
> ...
>
> Same problem.
>
- Re: bug#7814: Fwd: debugger entered on c-electric-paren,
Lennart Borgman <=