mmm-mode with Emacs 22

Emacs 22ベースのMeadow 3でmmm-modeを使うと、php-mode内でエラーが発生する。その対処法。

対処法

  1. mmm-modeがモード切替え時に保存するcc-modeの変数が不足しているため。0.4.8へのパッチがmmm-modeのメーリングリストに流れていたので、それを当てて解決。MLのものはpatchに -R オプションを付けないと当たらない。自分で作成したパッチは下記。

    *** mmm-vars.el.orig	Fri Aug 11 16:27:25 2006
    --- mmm-vars.el	Fri Aug 11 16:28:50 2006
    ***************
    *** 144,186 ****
    ;; These have to be localized in Emacs: see `mmm-mode-on'.
    ,@(mapcar
    #'(lambda (var) (list var nil mmm-c-derived-modes))
    !        '(c++-template-syntax-table
    c-<-op-cont-regexp
    c->-op-cont-regexp
    c-after-suffixed-type-decl-key
    c-after-suffixed-type-maybe-decl-key
    ! 	 c-any-class-key
    c-any-class-key
    c-asm-stmt-kwds
    c-assignment-op-regexp
    c-backslash-column
    c-basic-offset
    c-bitfield-kwds
    c-block-comment-prefix
    c-block-decls-with-vars
    ! 	 c-block-stmt-1-key
    c-block-stmt-1-key
    c-block-stmt-1-kwds
    c-block-stmt-2-key
    - 	 c-block-stmt-2-key
    c-block-stmt-2-kwds
    c-brace-list-key
    c-cast-parens
    ! 	 c-class-key
    c-class-key
    c-class-kwds
    c-cleanup-list
    c-colon-type-list-re
    c-comment-only-line-offset
    c-comment-prefix-regexp
    c-comment-start-regexp
    ! 	 c-comment-start-regexp
    c-cpp-defined-fns
    c-current-comment-prefix
    c-decl-block-key
    ! 	 c-decl-block-key
    c-decl-prefix-re
    c-decl-spec-kwds
    c-doc-comment-start-regexp
    c-expr-kwds
    c-file-offsets
    --- 144,215 ----
    ;; These have to be localized in Emacs: see `mmm-mode-on'.
    ,@(mapcar
    #'(lambda (var) (list var nil mmm-c-derived-modes))
    !        '(c++-make-template-syntax-table
    ! 	 c++-template-syntax-table
    c-<-op-cont-regexp
    + 	 c-<>-arglist-kwds
    + 	 c-<>-multichar-token-regexp
    + 	 c-<>-sexp-kwds
    + 	 c-<>-type-kwds
    c->-op-cont-regexp
    + 	 c-after-id-concat-ops
    c-after-suffixed-type-decl-key
    c-after-suffixed-type-maybe-decl-key
    ! 	 c-all-op-syntax-tokens
    c-any-class-key
    c-asm-stmt-kwds
    c-assignment-op-regexp
    + 	 c-assignment-operators
    + 	 c-at-vsemi-p-fn
    c-backslash-column
    + 	 c-basic-matchers-after
    + 	 c-basic-matchers-before
    c-basic-offset
    + 	 c-before-label-kwds
    c-bitfield-kwds
    + 	 c-block-comment-ender
    c-block-comment-prefix
    + 	 c-block-comment-regexp
    + 	 c-block-comment-start-regexp
    + 	 c-block-comment-starter
    c-block-decls-with-vars
    ! 	 c-block-prefix-charset
    ! 	 c-block-prefix-disallowed-chars
    c-block-stmt-1-key
    c-block-stmt-1-kwds
    c-block-stmt-2-key
    c-block-stmt-2-kwds
    + 	 c-block-stmt-kwds
    + 	 c-brace-id-list-kwds
    + 	 c-brace-list-decl-kwds
    c-brace-list-key
    c-cast-parens
    ! 	 c-class-decl-kwds
    c-class-key
    c-class-kwds
    c-cleanup-list
    + 	 c-colon-type-list-kwds
    c-colon-type-list-re
    c-comment-only-line-offset
    c-comment-prefix-regexp
    c-comment-start-regexp
    ! 	 c-complex-decl-matchers
    ! 	 c-constant-kwds
    c-cpp-defined-fns
    + 	 c-cpp-expr-directives
    + 	 c-cpp-expr-functions
    + 	 c-cpp-include-directives
    + 	 c-cpp-matchers
    + 	 c-cpp-message-directives
    c-current-comment-prefix
    c-decl-block-key
    ! 	 c-decl-hangon-key
    ! 	 c-decl-hangon-kwds
    ! 	 c-decl-prefix-or-start-re
    c-decl-prefix-re
    c-decl-spec-kwds
    + 	 c-decl-start-kwds
    + 	 c-decl-start-re
    c-doc-comment-start-regexp
    c-expr-kwds
    c-file-offsets
    ***************
    *** 192,197 ****
    --- 221,227 ----
    c-hanging-semi\&comma-criteria
    c-identifier-key
    c-identifier-last-sym-match
    + 	 c-identifier-ops
    c-identifier-start
    c-identifier-syntax-modifications
    c-identifier-syntax-table
    ***************
    *** 200,290 ****
    c-indent-comments-syntactically-p
    c-indentation-style
    c-inexpr-block-kwds
    c-inexpr-class-kwds
    c-keywords
    c-keywords-obarray
    c-keywords-regexp
    - 	 c-keywords-regexp
    c-known-type-key
    c-label-key
    - 	 c-label-key
    c-label-kwds
    c-label-kwds-regexp
    - 	 c-label-kwds-regexp
    c-label-minimum-indentation
    c-lambda-kwds
    c-literal-start-regexp
    c-nonsymbol-chars
    c-nonsymbol-token-regexp
    c-not-decl-init-keywords
    c-offsets-alist
    c-opt-<>-arglist-start
    c-opt-<>-arglist-start-in-paren
    c-opt-<>-sexp-key
    c-opt-access-key
    ! 	 c-opt-access-key
    ! 	 c-opt-asm-stmt-key
    c-opt-asm-stmt-key
    c-opt-bitfield-key
    - 	 c-opt-bitfield-key
    c-opt-block-decls-with-vars-key
    c-opt-block-stmt-key
    ! 	 c-opt-block-stmt-key
    c-opt-cpp-prefix
    c-opt-cpp-start
    c-opt-decl-spec-key
    ! 	 c-opt-friend-key
    c-opt-friend-key
    c-opt-identifier-concat-key
    ! 	 c-opt-inexpr-block-key
    c-opt-inexpr-block-key
    c-opt-inexpr-brace-list-key
    c-opt-inexpr-class-key
    - 	 c-opt-inexpr-class-key
    - 	 c-opt-lambda-key
    c-opt-lambda-key
    c-opt-method-key
    ! 	 c-opt-method-key
    c-opt-postfix-decl-spec-key
    c-opt-type-component-key
    c-opt-type-concat-key
    c-opt-type-modifier-key
    c-opt-type-suffix-key
    ! 	 c-other-decl-block-key
    c-other-decl-block-key
    c-other-decl-block-kwds
    c-other-decl-kwds
    c-overloadable-operators-regexp
    c-paragraph-separate
    c-paragraph-start
    c-paren-stmt-key
    c-primary-expr-regexp
    c-primitive-type-key
    c-primitive-type-kwds
    c-protection-kwds
    c-recognize-<>-arglists
    c-recognize-knr-p
    ! 	 c-recognize-knr-p
    c-recognize-paren-inits
    c-recognize-typeless-decls
    c-regular-keywords-regexp
    c-simple-stmt-key
    c-simple-stmt-kwds
    ! 	 c-special-brace-lists
    c-special-brace-lists
    c-specifier-key
    c-specifier-kwds
    c-stmt-delim-chars
    c-stmt-delim-chars-with-comma
    c-symbol-key
    ! 	 c-symbol-key
    c-symbol-start
    c-syntactic-eol
    c-syntactic-ws-end
    c-syntactic-ws-start
    c-type-decl-prefix-key
    c-type-decl-suffix-key
    c-type-prefix-key
    comment-end
    comment-start
    comment-start-skip))
    --- 230,368 ----
    c-indent-comments-syntactically-p
    c-indentation-style
    c-inexpr-block-kwds
    + 	 c-inexpr-brace-list-kwds
    c-inexpr-class-kwds
    + 	 c-keyword-member-alist
    c-keywords
    c-keywords-obarray
    c-keywords-regexp
    c-known-type-key
    c-label-key
    c-label-kwds
    c-label-kwds-regexp
    c-label-minimum-indentation
    + 	 c-label-prefix-re
    c-lambda-kwds
    + 	 c-line-comment-starter
    c-literal-start-regexp
    + 	 c-make-mode-syntax-table
    + 	 c-matchers-1
    + 	 c-matchers-2
    + 	 c-matchers-3
    + 	 c-mode-menu
    + 	 c-mode-syntax-table
    + 	 c-modifier-kwds
    + 	 c-multiline-string-start-char
    + 	 c-nonempty-syntactic-ws
    + 	 c-nonempty-syntactic-ws-depth
    + 	 c-nonlabel-token-key
    c-nonsymbol-chars
    + 	 c-nonsymbol-key
    + 	 c-nonsymbol-sexp-kwds
    + 	 c-nonsymbol-token-char-list
    c-nonsymbol-token-regexp
    + 	 c-nonwhite-syntactic-ws
    c-not-decl-init-keywords
    c-offsets-alist
    + 	 c-operator-list
    + 	 c-operators
    c-opt-<>-arglist-start
    c-opt-<>-arglist-start-in-paren
    c-opt-<>-sexp-key
    c-opt-access-key
    ! 	 c-opt-after-id-concat-key
    c-opt-asm-stmt-key
    c-opt-bitfield-key
    c-opt-block-decls-with-vars-key
    c-opt-block-stmt-key
    ! 	 c-opt-cpp-macro-define
    ! 	 c-opt-cpp-macro-define-start
    c-opt-cpp-prefix
    c-opt-cpp-start
    c-opt-decl-spec-key
    ! 	 c-opt-extra-label-key
    c-opt-friend-key
    c-opt-identifier-concat-key
    ! 	 c-opt-identifier-concat-key-depth
    ! 	 c-opt-identifier-prefix-key
    c-opt-inexpr-block-key
    c-opt-inexpr-brace-list-key
    c-opt-inexpr-class-key
    c-opt-lambda-key
    c-opt-method-key
    ! 	 c-opt-op-identitier-prefix
    c-opt-postfix-decl-spec-key
    c-opt-type-component-key
    c-opt-type-concat-key
    c-opt-type-modifier-key
    c-opt-type-suffix-key
    ! 	 c-other-block-decl-kwds
    c-other-decl-block-key
    c-other-decl-block-kwds
    c-other-decl-kwds
    + 	 c-other-kwds
    + 	 c-other-op-syntax-tokens
    + 	 c-overloadable-operators
    c-overloadable-operators-regexp
    c-paragraph-separate
    c-paragraph-start
    + 	 c-paren-any-kwds
    + 	 c-paren-nontype-kwds
    c-paren-stmt-key
    + 	 c-paren-stmt-kwds
    + 	 c-paren-type-kwds
    + 	 c-postfix-decl-spec-kwds
    + 	 c-postfix-spec-kwds
    + 	 c-prefix-spec-kwds
    + 	 c-prefix-spec-kwds-re
    + 	 c-primary-expr-kwds
    c-primary-expr-regexp
    c-primitive-type-key
    c-primitive-type-kwds
    + 	 c-primitive-type-prefix-kwds
    c-protection-kwds
    c-recognize-<>-arglists
    + 	 c-recognize-colon-labels
    c-recognize-knr-p
    ! 	 c-recognize-paren-inexpr-blocks
    c-recognize-paren-inits
    c-recognize-typeless-decls
    + 	 c-ref-list-kwds
    c-regular-keywords-regexp
    + 	 c-simple-decl-matchers
    c-simple-stmt-key
    c-simple-stmt-kwds
    ! 	 c-simple-ws
    ! 	 c-simple-ws-depth
    ! 	 c-single-line-syntactic-ws
    ! 	 c-single-line-syntactic-ws-depth
    c-special-brace-lists
    c-specifier-key
    c-specifier-kwds
    c-stmt-delim-chars
    c-stmt-delim-chars-with-comma
    + 	 c-string-escaped-newlines
    + 	 c-symbol-chars
    c-symbol-key
    ! 	 c-symbol-key-depth
    c-symbol-start
    c-syntactic-eol
    + 	 c-syntactic-ws
    + 	 c-syntactic-ws-depth
    c-syntactic-ws-end
    c-syntactic-ws-start
    + 	 c-type-decl-end-used
    c-type-decl-prefix-key
    c-type-decl-suffix-key
    + 	 c-type-list-kwds
    + 	 c-type-modifier-kwds
    c-type-prefix-key
    + 	 c-type-prefix-kwds
    + 	 c-type-start-kwds
    + 	 c-typedef-decl-kwds
    + 	 c-typeless-decl-kwds
    + 	 c-unterminated-block-comment-regexp
    + 	 c-vsemi-status-unknown-p-fn
    comment-end
    comment-start
    comment-start-skip))
    

参考リンク

タイトルとURLをコピーしました