[Message Prev][Message Next][Thread Prev][Thread Next][Message Index][Thread Index]
perl-modeをcperl-modeに変更
- X-ml-count: 4207
- Subject: perl-modeをcperl-modeに変更
- From: "茂木克夫" <mogi_k@xxxxxxxxxxx>
- Date: Sat, 20 Jul 2002 20:23:42 +0900
- X-mailer: Microsoft Outlook Express 6.00.2600.0000
みなさん初めまして。
茂木克夫(もぎかつお)と申します。
Meadowを利用させていただいてから
まだ日が浅いのですが、どうぞよろしくお願いします。
さっそく本題ですが、
perl-modeよりも現在はcperl-modeの方が何かと
便利なようなので、
(autoload 'perl-mode "cperl-mode" "alternate mode for editing Perl programs" t)
のように .emacsに記述したのですが、
File mode specification error: (error "Autoloading failed to define function perl-mode")
というエラーが出てしまってcperl-modeが起動しませんでした。
さらに調べたところ、以下のような方法で対処することができました。
(defun modify-alist (alist-symbol key value &optional search-cdr)
"alistの要素を変更する。
alist-symbolから要素の値を検索してkeyと一致したものを valueに変更。
search-cdr がtでなければキーを検索。
参考:
ftp://ftp.bora.net/pub/CPAN/authors/id/I/IL/ILYAZ/cperl-mode/INSTALL.example"
(let ((alist (symbol-value alist-symbol)))
(while alist
(if (eq (if search-cdr
(cdr (car alist))
(car (car alist))) key)
(setcdr (car alist) value)
(setq alist (cdr alist))))))
(modify-alist 'interpreter-mode-alist 'perl-mode 'cperl-mode t)
(modify-alist 'auto-mode-alist 'perl-mode 'cperl-mode t)
特にこれで問題があるとかではないのですが、
皆さんは最初の方法でも動作されているのでしょうか?
こちらの環境は
Windows XP
Meadow Ver 1.14
cperl-modeはMeadowに付属しているものです。(過去ログを参考にして再コンパイルしました)
それでは失礼いたします。
//////////////////////////
| 茂木 克夫 #
| mogi_k@xxxxxxxxxxx #
| #
//////////////////////////