Bug 528823 - php-mode inside html-mode does not fully work
Summary: php-mode inside html-mode does not fully work
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: emacs-mmm
Version: 14
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Alan Dunn
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-13 21:18 UTC by Robert K. Moniot
Modified: 2012-08-16 17:01 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 848914 (view as bug list)
Environment:
Last Closed: 2012-08-16 17:01:16 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
sample php file that exhibits the problem (504 bytes, text/html)
2009-10-13 21:18 UTC, Robert K. Moniot
no flags Details

Description Robert K. Moniot 2009-10-13 21:18:42 UTC
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:

Comment 1 Bug Zapper 2010-04-28 10:49:39 UTC
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

Comment 2 Bug Zapper 2010-11-04 09:28:22 UTC
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

Comment 3 Robert K. Moniot 2010-11-08 01:14:24 UTC
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.

Comment 4 Bug Zapper 2011-06-02 17:36:52 UTC
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

Comment 5 Robert K. Moniot 2011-06-02 19:19:20 UTC
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

Comment 6 Fedora End Of Life 2012-08-16 17:01:18 UTC
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


Note You need to log in before you can comment on or make changes to this bug.