#13 pear hook does not work!


In php-mode-099:
The pear hook is activated if

(string-match "/\\(PEAR\\|pear\\)/" (buffer-file-name))

First, this line is bugged because we're not using vi,
so there should not be any slashes around the
regexp. :)

Then, I really don't understand why only buffers which
name contain "pear" or "PEAR" should use the PEAR
coding standard. Maybe you wanted to test if the
*buffer* contains the word "pear", and not the buffer
file name?

As far as I'm concerned, I think all php buffers
should respect PEAR coding standards.

To finish, why are backslashes in the following lines
groupped by two in the first line and not in the
second line?

(string-match "/\\(PEAR\\|pear\\)/" (buffer-file-name))
(string-match "\.php$" (buffer-file-name))


  • Benjamin Gandon

    Benjamin Gandon - 2001-08-01

    The diff that shows where is the problem

  • Turadg Aleahmad

    Turadg Aleahmad - 2001-10-22
    • assigned_to: nobody --> turadg
    • status: open --> closed-fixed
  • Turadg Aleahmad

    Turadg Aleahmad - 2001-10-22

    Logged In: YES

    You're right, the regexps were screwy. I've changed them
    to "PEAR\\|pear" and "\\.php$" for version 1.0.

    I will continue to test for PEAR standards by the filename
    since people are allowed to code as they please and that's
    the only valid test for a file that is part of PEAR.

    I have added a force-pear option to the customization
    section, though.


Log in to post a comment.