Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 311259 - app-emacs/mmm-mode-0.4.8-r1 does not work if mode-name isn't a string on emacs-23.1-r2
Summary: app-emacs/mmm-mode-0.4.8-r1 does not work if mode-name isn't a string on emac...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Emacs project
URL:
Whiteboard:
Keywords: Inclusion
Depends on:
Blocks:
 
Reported: 2010-03-25 03:16 UTC by Seong-Kook Shin
Modified: 2010-04-20 16:13 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
This patch solves the problem (mmm-mode-0.4.8-mode-line-fixed.diff,662 bytes, patch)
2010-03-25 03:19 UTC, Seong-Kook Shin
Details | Diff
mmm-mode-0.4.8-format-mode-line.patch (mmm-mode-0.4.8-format-mode-line.patch,479 bytes, patch)
2010-03-26 09:58 UTC, Ulrich Müller
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Seong-Kook Shin 2010-03-25 03:16:36 UTC
mmm-mode shows the sub-mode on emacs modeline.

However, from emacs 23, the `mode-line` variable may not be a string (e.g. "(sgml-xml-mode "XHTML" "HTML")")

This causes an error when the point enters into the sub-mode region:

Error in post-command-hook: (wrong-type-argument stringp (sgml-xml-mode
XHTML HTML))

Reproducible: Always

Steps to Reproduce:
1. Launch emacs, execute "M-: (require 'mmm-auto)<RET>".
2. open s.html file with following contents, and make sure the major mode is xhtml-mode

---
<html>
  <head>
    <style type="text/css">
      h1
    </style>
  </head>
  <body>
  </body>
</html>
---

3. "M-x mmm-mode", then "C-c % C-r embedded-css<RET>".
4. move point into the CSS area ('h1' in above example).
5. An error will ocurred. (detailed in "*Message*" buffer)


Actual Results:  
Error in post-command-hook: (wrong-type-argument stringp (sgml-xml-mode XHTML HTML))

Expected Results:  
The error should not be happen.

Portage 2.1.7.17 (default/linux/x86/10.0, gcc-4.3.4, glibc-2.10.1-r1, 2.6.28-gentoo-r5 i686)
=================================================================
System uname: Linux-2.6.28-gentoo-r5-i686-Intel-R-_Core-TM-2_Quad_CPU_Q9400_@_2.66GHz-with-gentoo-1.12.13
Timestamp of tree: Tue, 16 Mar 2010 23:30:20 +0000
distcc 3.1 i686-pc-linux-gnu [disabled]
ccache version 2.4 [enabled]
app-shells/bash:     4.0_p35
dev-java/java-config: 2.1.10
dev-lang/python:     2.6.4-r1
dev-python/pycrypto: 2.1.0_beta1
dev-util/ccache:     2.4-r7
dev-util/cmake:      2.6.4-r3
sys-apps/baselayout: 1.12.13
sys-apps/sandbox:    1.6-r2
sys-devel/autoconf:  2.13, 2.63-r1
sys-devel/automake:  1.5, 1.7.9-r1, 1.8.5-r3, 1.9.6-r3, 1.10.3, 1.11.1
sys-devel/binutils:  2.18-r3
sys-devel/gcc:       4.1.2, 4.3.4
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6b
virtual/os-headers:  2.6.30-r1
ACCEPT_KEYWORDS="x86"
ACCEPT_LICENSE="*"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=prescott -O2 -pipe -fomit-frame-pointer -ggdb"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/share/X11/xkb /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="assume-digests ccache distlocks fixpackages news parallel-fetch protect-owned sandbox sfperms strict unmerge-logs unmerge-orphans userfetch"
GENTOO_MIRRORS="http://gentoo.gg3.net/ http://ftp.kaist.ac.kr/pub/gentoo http://ftp.gentoo.or.kr http://distfiles.gentoo.org http://www.ibiblio.org/pub/Linux/distributions/gentoo"
LANG="ko_KR.UTF-8"
LDFLAGS="-Wl,-O1"
LINGUAS="en ko"
MAKEOPTS="-j8"
PKGDIR="/usr/portage/packages"
PORTAGE_CONFIGROOT="/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="X acl acpi alsa bash-completion berkdb branding bzip2 cairo cjk cli consolekit cracklib crypt cups cxx dbus dri emacs encode esd fam firefox flac fortran gdbm gif gnome gpm gstreamer gtk hal iconv jpeg kpathsea libnotify mad mikmod mmx mmx2 modules mp3 mpeg mudflap ncurses nls nptl nptlonly nvidia ogg opengl openmp pam pcre pdf perl png ppds pppd python qt3support readline reflection samba sdl session spell spl sqlite sse sse2 ssl svg sysfs tcpd tiff truetype unicode vorbis x86 xml xorg zlib" ALSA_CARDS="intel8x0 intel8x0m hda-intel" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="keyboard mouse" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en ko" RUBY_TARGETS="ruby18" USERLAND="GNU" VIDEO_CARDS="nvidia" 
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, LC_ALL, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Seong-Kook Shin 2010-03-25 03:19:14 UTC
Created attachment 225177 [details, diff]
This patch solves the problem

The patch modifies `mmm-format-string' so that it calls `format-mode-line' to generate a string type of mode-name.
Comment 2 Michael Pontus 2010-03-26 00:33:13 UTC
(In reply to comment #1)
> Created an attachment (id=225177) [details]
> This patch solves the problem
> 
> The patch modifies `mmm-format-string' so that it calls `format-mode-line' to
> generate a string type of mode-name.
> 
Thank you! It was luck to find your solution, because I had the same problem today. I hope it would be applied to the portage soon.
Comment 3 Ulrich Müller gentoo-dev 2010-03-26 09:58:00 UTC
(In reply to comment #1)
> Created an attachment (id=225177) [details]
> This patch solves the problem

Small problem: We still aim for backwards compatibility with Emacs 21 where function format-mode-line doesn't exist.
Comment 4 Ulrich Müller gentoo-dev 2010-03-26 09:58:58 UTC
Created attachment 225309 [details, diff]
mmm-mode-0.4.8-format-mode-line.patch

Does this updated patch work for you?
Comment 5 Ulrich Müller gentoo-dev 2010-04-20 16:13:06 UTC
Should be fixed in -r2.