Menu

#21 incompatability with mmm-mode

closed-fixed
None
5
2001-10-22
2001-09-24
Anonymous
No

when using mmm-mode with php-mode 0.9.9, I get the
following error backtrace

Signaling: (wrong-type-argument stringp nil)
string-match("/\\(PEAR\|pear\\)/" nil)
php-mode()
mmm-update-mode-info(php-mode)

this is comming from line 235 in the php-mode file.

(if (and (string-match "/\\(PEAR\|pear\\)/"
(buffer-file-name))
(string-match "\.php$" (buffer-file-name)))
(run-hooks 'php-mode-pear-hook))

the problem is that mmm-mode is applying php-mode to
a region. there is no buffer-file-name.

simple fix - check the buffer-file-name first

(if (and (stringp buffer-file-name) (string-match
"/\\(PEAR\|pear\\)/"
(buffer-file-name))
(string-match "\.php$" (buffer-file-name)))
(run-hooks 'php-mode-pear-hook))

Discussion

  • Turadg Aleahmad

    Turadg Aleahmad - 2001-10-22

    Logged In: YES
    user_id=137402

    Thanks for the report and the fix. :)

    I've included it in version 1.0.0.

     
  • Turadg Aleahmad

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

Log in to post a comment.