Created attachment 364660 [details] sample php file that exhibits the problem Description of problem: Using mmm-mode for php files containing a mix of php code and html code, using major mode html-mode and minor mode php-mode. See below for the elisp code to run it. It correctly divides up the code into php and html sections, as indicated by gray background coloration for the former, but both types of section are listed as ``XHTML MMM Abbrev'' in the mode line. First time one enters a PHP region, an error message is issued: ``Error in post-command-hook: (wrong-type-argument stringp (sgml-xml-mode XHTML HTML))''. Thereafter, hitting tab key in an html section gives error message ``byte-code: Wrong type argument: stringp, nil'' or sometimes ``Warning (php-indent): Indentation fails badly with mixed HTML and PHP. Look for an Emacs Lisp library that supports "multiple major modes" like mumamo, mmm-mode or multi-mode.'' Version-Release number of selected component (if applicable): emacs-23.1-5.fc11.i586 emacs-common-23.1-5.fc11.i586 emacs-mmm-0.4.8-1.fc11.noarch How reproducible: always Steps to Reproduce: 1. Move ~/.emacs file aside so no personal customizations apply 2. Start emacs with no arguments 3. Issue command M-x load-library html-php-mode where html-php-mode.el as below is on load-path or fully-qualified path given 4. Visit a php file with mixed php and html code such as attached sample.php 5. Move cursor into php area. Then issue Here is the html-php-mode.el: require 'mmm-mode) (setq mmm-global-mode 'maybe) (mmm-add-mode-ext-class nil "\\.php3?\\'" 'html-php) (mmm-add-classes '((html-php :submode php-mode :front "<\\?\\(php\\)?" :back "\\?>"))) (autoload 'php-mode "php-mode" "PHP editing mode" t) (add-to-list 'auto-mode-alist '("\\.php3?\\'" . html-mode)) Actual results: As described above. Expected results: Should not be any error messages in normal operation, and the mode line should show [PHP] submode when in the php regions. Additional info:
This message is a reminder that Fedora 11 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 11. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '11'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 11's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 11 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
This message is a reminder that Fedora 12 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 12. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '12'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 12's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 12 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Tested with emacs-23.2-4.fc13.i686 emacs-common-23.2-4.fc13.i686 emacs-mmm-0.4.8-2.fc12.noarch on fully updated Fedora 13 system. BTW, in step 5 of "Steps to Reproduce" in Description, the word "issue" should be "hit the tab key." Same results as originally described.
This message is a reminder that Fedora 13 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 13. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '13'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 13's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 13 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Problem continues in fully patched Fedora 14 system. emacs-23.2-7.fc14.x86_64 emacs-common-23.2-7.fc14.x86_64 emacs-mmm-0.4.8-2.fc12.noarch
This message is a notice that Fedora 14 is now at end of life. Fedora has stopped maintaining and issuing updates for Fedora 14. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At this time, all open bugs with a Fedora 'version' of '14' have been closed as WONTFIX. (Please note: Our normal process is to give advanced warning of this occurring, but we forgot to do that. A thousand apologies.) Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, feel free to reopen this bug and simply change the 'version' to a later Fedora version. Bug Reporter: Thank you for reporting this issue and we are sorry that we were unable to fix it before Fedora 14 reached end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged to click on "Clone This Bug" (top right of this page) and open it against that version of Fedora. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping