mmm-mode 쓰시는 분

lazycoder의 이미지


php를 편집하는데 mmm-mode를 사용하려고 합니다.
그런데 php영역에서 탭키만 누르면 wrong argument : stringp, nil
오류가 떠서 편집이 불가능한데 다른 분들은 문제가 없으신가요?

제 환경입니다.
Windows XP Home
emacsw32(http://ourcomments.org/Emacs/EmacsW32.html)

php-mode
css-mode
mmm-mode
generic-x

이건 제 설정파일..

; PHP
(require 'php-mode)
;(autoload 'php-mode "php-mode")
;(add-to-list 'auto-mode-alist '("\\.php$'" . php-mode))
 
(defun php-mode-common-hook ()
  "customizations for php-mode"
  (c-set-style "ellemtel")
  (setq c-basic-offset 4))
 
(add-hook 'php-mode-hook 'php-mode-common-hook)
 
; CSS
(autoload 'css-mode "css-mode")
(add-to-list 'auto-mode-alist '("\\.css\\'" . css-mode))
(setq cssm-indent-function #'cssm-c-style-indenter)
(setq cssm-indent-level '2)
 
; Javascript
(require 'generic-x)
;(add-to-list 'generic-extras-enable-list 'javascript-generic-mode)
 
; MMM
(add-to-list 'load-path "c:/program files/emacs/site-lisp/mmm-mode-0.4.8/")
(require 'mmm-mode)
(setq mmm-global-mode 'maybe)
 
;; set up an mmm group for fancy html editing
(mmm-add-group
 'fancy-html
 '(
   (html-php-embedded
	:submode php-mode
	:face mmm-code-submode-face
	:front "<[?]\\(php\\|=\\)"
	:back "[?]>")
   (html-css-embedded
	:submode css-mode
	:face mmm-declaration-submode-face
	:front "<style\[^>\]*>"
	:back "</style>")
   (html-css-attribute
	:submode css-mode
	:face mmm-declaration-submode-face
	:front "\\bstyle=\\s-*\""
	:back "\"")
   (html-javascript-embedded
	:submode javascript-generic-mode
	:face mmm-code-submode-face
	:front "<script\[^>\]*>"
	:back "</script>")
   (html-javascript-attribute
	:submode javascript-generic-mode
	:face mmm-code-submode-face
	:front "\\bon\\w+=\\s-*\""
	:back "\"")))
 
(add-to-list 'auto-mode-alist '("\\.inc\\'" . html-mode))
(add-to-list 'auto-mode-alist '("\\.php[34]?\\'" . html-mode))
(add-to-list 'auto-mode-alist '("\\.[sj]?html?\\'" . html-mode))
 
(add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil html-js))
(add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil embedded-css))
(add-to-list 'mmm-mode-ext-classes-alist '(html-mode nil fancy-html))

임시로 단축키를 통해 수동으로 php와 html모드를 왔다갔다 하면서 쓰고 있습니다.

(defun toggle-php-html-mode ()
  (interactive)
  "Toggle mode between PHP & HTML modes"
  (cond ((string= mode-name "HTML")
         (php-mode))
        ((string= mode-name "PHP")
         (html-mode))))
 
(global-set-key [f5] 'toggle-php-html-mode)

omnimook의 이미지

비슷한 증상이, linux에서 emacs 22, mmm mode 0.4.8 php mode 1.2.0 에서 나타나서 찾아봤습니다.

http://osdir.com/ml/emacs.mmm-mode/2005-12/msg00008.html

http://www.emacswiki.org/cgi-bin/emacs/HtmlModeDeluxe

(defun save-mmm-c-locals ()
      (with-temp-buffer
        (php-mode)
        (dolist (v (buffer-local-variables))
          (when (string-match "\\`c-" (symbol-name (car v)))
            (add-to-list 'mmm-save-local-variables `(,(car v) nil ,mmm-c-derived-modes))))))    
(save-mmm-c-locals)

를 mmm-mode와 php-mode require한 이후에 넣으니 발생안되더군요. 혹시 모르니 참고해보세요. ^^;
saillinux의 이미지

nxhtml-mode의 html 완성기능이라던지 validation이라던지 원격으로 파일을
올린다던지 웹페이지를 관리한다던지등 기능면으로 매우 흡족합니다.
(설정이 어려운게 흠인거 같습니다.)

그리고 mumamo-mode로 mmm-mode 효과를 얻을수 있구요. mmm-mode의 차후 버젼이라고
생각하며(착각?) 사용하고 있었습니다.

참조링크
http://ourcomments.org/Emacs/nXhtml/doc/nxhtml.html

http://www.ourcomments.org/cgi-bin/emacsw32-dl-latest.pl
여기서 nxhtml이랑 mumamo-mode가 이미 포함된 이맥스 바이너리를 받을수 있습니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.