Hi
Sorry for the late reply. Thanks for the patch. I'll apply it when
I know that it applies to any updates from upstream.
Best regards,
// Ola
On Sat, Jan 26, 2008 at 11:22:34PM +0100, Thue Janus Kristensen wrote:
> I played around with the emacs php mode, and made a few fixes to what
> on my system is /usr/share/emacs/site-lisp/php-elisp/php-mode.el
>
> I made the fixes against the latest version 1.4 from sourceforge, but
> I think they would be easy to apply to the version 1.1 currently in
> Debian unstable.
>
> The fixes are:
> 1) Add support for the "clone" keyword, by copying the existing code
> for the "print" keyword. Both these keywords get special treatment as
> they can be used boat as "print 'lala'" and "print('lala')" (Debian
> bug #342632)
>
> 2) Add support for highlighting the object name to the right of
> "instanceof" keyword, as in "$student instanceof Person", by using the
> existing logic for for example the "new" keyword. (Debian bug #342634)
>
> 3) Make sure that keywords, for example "if", don't become highlighed
> in "$lala_if". This is done by inserting a few "[^_]"'s in the source
> code. For start of line I had to insert "\\(?:^\\|[^_]\\)"
> (non-underscore or start of line), otherwise emacs would not always
> mark up keywords at the start of the line (specifically emacs would
> mark up correctly if the keyword was there when the file was loaded,
> but not when the keyword was freshly written). (Debian bug #212422)
>
> Bug 3) looks somewhat like a bug which could be more elegantly fixed
> at a higher level in emacs, but my band-aid fix could serve in the
> mean-time. I tested using GNU Emacs 21.4.1.
>
>
> Here is some PHP code which illustrates the highlighting bugs:
>
> <?php
> $aa_if;
> $aa_if_aa;
> $aa_break;
> $aa_break_aa;
> $aa_print_aa;
> $aa_class_aa;
> $aa_class;
> $aa_self;
> $a_private;
> $a_continue; //this one is not fixed
>
> function if_a() {}
> function a_if() {}
> function private_aa() {}
> function continue_aa() {}
>
> class Person {}
> $aa instanceof Person;
> clone $aa;
> ?>
>
> Regards, Thue
--
--------------------- Ola Lundqvist ---------------------------
/ [EMAIL PROTECTED] Annebergsslingan 37 \
| [EMAIL PROTECTED] 654 65 KARLSTAD |
| http://inguza.com/ +46 (0)70-332 1551 |
\ gpg/f.p.: 7090 A92B 18FE 7994 0C36 4FE4 18A1 B1CF 0FE5 3DD9 /
---------------------------------------------------------------
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]