清田@東工大 です。
>>>>> On Wed, 08 Nov 1995 19:58:49 +0900, Kazuya Ono <ono@system.tutics.tut.ac.jp> said:
清田> NEmacs/MULE 用 MaTX プログラム入力モード matx-mode.el をベータ公開致し
清田> ます。matx-mode.el は Barry A. Warsaw 氏らの c++-mode.el をベースに作成
小野さん> 少し余裕が出来たので、使ってみました。便利です。
ありがとうございます。^^
小野さん> 普段、cc-mode.elを使っているので、c-mode.elのカスタマイズがわからない
小野さん> こともあり、多少違和感があります。が、インデント機能が正しく働いてくれ
小野さん> ることが、このうえなく幸せです。
じつは、デフォルトのインデントは C 言語の K&R (或は MaTX のマニュアル
の)スタイルに似た(^^;)ものになっています。パラメータ設定(の一部)を示しま
すと、以下のような感じです。
(setq matx-mode-hook
'(lambda ()
(setq matx-brace-offset 0)
(setq matx-indent-level 5)
(setq matx-argdecl-indent 5)
(setq matx-continued-statement-offset 5)
(setq matx-continued-brace-offset -5)
(setq matx-brace-imaginary-offset 0)
(setq matx-label-offset -5)
(setq matx-auto-newline nil)
(setq matx-tab-always-indent t)
(setq matx-comment-only-line-offset 0)
(setq matx-cleanup-}-else-{-p t)
))
#詳しくは、ソースか M-x describe-mode でご覧下さい。
小野さん> しかし、muleで使っても、色が出ない!!
小野さん> これは、僕にとって、致命的です。
そうですね。一度色付きソースを体験してしまうと... 。^^;
matx-mode における hilit19 の設定は古賀さんが直にされたので、わたしは
携わっておらずアナウンス時に失念してしまっていました。すみませんでした。
小野さんも書いておられますが、折角ですので古賀さんのされた設定(と等価
なもの)を添付します。
(hilit-set-mode-patterns
'matx-mode
(append
comments c++-comments strings preprocessor
'(
;; function decls are expected to have types on the previous line
("^\\(\\(\\w\\|[$_]\\)+::\\)?\\(\\w\\|[$_]\\)+\\s *\\(\\(\\w\\|[$_]\\)+\\s *((\\|(\\)[^)]*)+" nil defun)
("^\\(\\(\\w\\|[$_]\\)+[ \t]*::[ \t]*\\)?\\(\\(\\w\\|[$_]\\)+\\|operator.*\\)\\s *\\(\\(\\w\\|[$_]\\)+\\s *((\\|(\\)[^)]*)+" nil defun)
("^\\(template\\|typedef\\|struct\\|union\\|class\\|enum\\|public\\|private\\|protected\\).*$" nil decl)
;; datatype -- black magic regular expression
("[ \n\t({]\\(\\(const\\|register\\|volatile\\|unsigned\\|extern\\|static\\)\\s +\\)*\\(\\(\\w\\|[$_]\\)+_t\\|float\\|double\\|void\\|char\\|short\\|int\\|long\\|Integer\\|Real\\|Complex\\|String\\|Matrix\\|Array\\|Index\\|Polynomial\\|Rational\\|List\\|CoMatrix\\|PoMatrix\\|RaMatrix\\|CoArray\\|PoArray\\|RaArray\\|FILE\\|\\(\\(struct\\|union\\|enum\\|class\\)\\([ \t]+\\(\\w\\|[$_]\\)*\\)\\)\\)\\(\\s +\\*+)?\\|[ \n\t;()]\\)" nil type)
;; key words
("[^_]\\<\\(return\\|goto\\|if\\|else\\|case\\|default\\|switch\\|break\\|continue\\|while\\|do\\|for\\|Func\\|print\\|read\\|public\\|protected\\|private\\|delete\\|new\\)\\>[^_]"
1 keyword))))
では。
清 田 ☆ 洋 光 東京工業大学 大学院 情報理工学研究科
<KIYOTA Hiromitsu> 情報環境学専攻(機械情報系) 三平研究室 McII
E-mail: kiyota@mei.titech.ac.jp URL: http://www.mei.titech.ac.jp/~kiyota