|
Namazu for hns による簡易全文検索 詳しくは 詳細指定/ヘルプを参照して下さい |
|||||||||||||||||||||||||||||||||||||||||||||
2006年02月25日(土) 旧暦 [n年日記] [更新:"2006/02/25 18:12:30"]#1 [Emacs][MacOSX] Mac OS X Emacs と KINESIS
( つっこみ )
#2 [Emacs] cc-mode の auto-insert
最近新規に hoge.h を開けると、(自分では何も設定したつもりがないのに)
次のように型紙を入れておいてくれる
#ifndef HOGE_H #define HOGE_H #endifこれってどこかなぁと、その時に M-x describe-variable RET auto-insert-alist RET すると、次のような部分がある
(("\\.\\([Hh]\\|hh\\|hpp\\)\\'" . "C / C++ header")
(upcase
(concat
(file-name-nondirectory
(substring buffer-file-name 0
(match-beginning 0)))
"_"
(substring buffer-file-name
(1+
(match-beginning 0)))))
"#ifndef " str n "#define " str "\n\n" _ "\n\n#endif")
これがやってくれているらしい。cc-mode に入った時に auto-insert-alist も設定
されているということか。しかし同様に次のような部分もあるのに、これは効い
ていない気がするのは、*.c の時には、自分で別の mode を設定しているからだらうか ?
(("\\.\\([Cc]\\|cc\\|cpp\\)\\'" . "C / C++ program")
nil "#include \""
(let
((stem
(file-name-sans-extension buffer-file-name)))
(cond
((file-exists-p
(concat stem ".h"))
(file-name-nondirectory
(concat stem ".h")))
((file-exists-p
(concat stem ".hh"))
(file-name-nondirectory
(concat stem ".hh")))))
& 34 | -10)
( つっこみ )
#3 [Emacs] systemc mode
systemc モードは二つある
少なくとも後者は、色を付けるだけ、と言っている。
何故かそのどちらも
Debugger entered--Lisp error: (void-variable c-C++-conditional-key)のようなことを言われる。 試しに一行追加して見ると、それは消える。
ttyq2:makoto@st4200 18:10:25/060225(~/mule/lisp)> diff -u systemc-mode.el-0.2{~,}
--- systemc-mode.el-0.2~ 2006-02-25 16:07:05.000000000 +0900
+++ systemc-mode.el-0.2 2006-02-25 16:56:26.000000000 +0900
@@ -51,6 +51,7 @@
;;; Code:
+(require 'cc-mode)
(require 'derived)
(require 'font-lock)
ttyq2:makoto@st4200 18:10:32/060225(~/mule/lisp)>
いつだったか、
「慣れない人は CVS 版を使うものではない」という人がいて、
「そのようなことはない」と返したが、こういうようなことかな..
( つっこみ )
|
最近の日記 2026年02月28日 ・my first script-fu 2026年01月29日 ・Die Fledermaus at New National theatre 2026/01/29 2025年12月25日 ・pbulk 11.99.3 (emacs30) 2025年11月22日 ・crash dump 2025年10月25日 ・recover from disk error | ||