2009-01-01から1年間の記事一覧

hideshow.elとhideshowvis.elで、折りたたみ時にjavadoc形式のコメントのヘッドラインを表示させる

TODO javadoc以外のコメントのヘッドライン表示 if () {とは違い{が次の行に来ていた場合のhs-hide-toggleの挙動 (defun get-javadoc-comment-headline (start end) "Return Javadoc comment headline." (save-excursion (save-restriction (narrow-to-regio…

anything.elでphtmlやrhtmlを開くときにウェブブラウザで開こうとするのを防ぐ

phpのコードやrubyのコードが含まれているので、たぶんウェブブラウザでは開きたくない。 diff --git a/plugins/anything-config.el b/plugins/anything-config.el index 8e0a797..607e61d 100644 --- a/plugins/anything-config.el +++ b/plugins/anything-…

yasnippet-0.6.1cとauto-complete-yasnippet

こんな感じにした。こっちは動くかなら diff --git a/plugins/auto-complete-yasnippet.el b/plugins/auto-complete-yasnippet.el index b4ea9a8..c47b447 100644 --- a/plugins/auto-complete-yasnippet.el +++ b/plugins/auto-complete-yasnippet.el @@ -3…

yasnippet-0.6.1b(c?)を使うとanything-c-yasnippet.elが動かない

yasnippet-0.6.1b(c?)では、yas/snippet-table-hashのデータ構造とyas/expand-snippetの引数の順番が以前のバージョンとは違うらしい。 以下パッチ diff --git a/plugins/anything-c-yasnippet.el b/plugins/anything-c-yasnippet.el index b74c115..79020d9…

auto-install.elをバッチモードで動かす その2

以前の案ではコンパイルに失敗すると止まったので書き直した。 バッファーにauto-install.elの出力を書き出して終了を表す文字列が表示されたらwaitループを抜ける。 (progn (setq install_dir (expand-file-name "#{install_dir}") load-path (cons install…

anything-read-bufferの件つづき

read-bufferって内部でread-buffer-functionが定義されていればそれを、定義されていなければcompleting-readを呼び出す。 anything-completing-readがanythingの結果がnilの場合keyboard-quitしているんだからanything-read-bufferがkeyboard-quitしないの…

anything-read-bufferがシグナルのquitをハンドリングするのでkill-bufferでC-gで取り消したつもりがバッファが削除される

Twitter / troter: kill-buffer->interactiv ...とりあえずコレで回避できるけど絶対正攻法ではない。this-commandとかよくわからない (defadvice anything-read-buffer (around transmissive-keyboard-quit-anything-read-buffer) (let ((it ad-do-it)) (if…

anything-complete.elのanything-read-file-name-follow-directoryでシンボルpromptが未束縛というエラー

多分これで直ります。id:rubikitchさんどうでしょうか? @@ -907,12 +907,13 @@ used by `anything-lisp-complete-symbol-set-timer' and `anything-apropos'" (interactive) (let ((anything-map (anything-read-file-name-map)) ;; anything-read-file-nam…

anything-complete.elでちょっと思ったこと

anything-complete.elのanything-find-fileはアクションが選択できない。sudoしたいとき不便なのでkeymapを上書きする。ついでにsuじゃなくてsudoにする。 (setq anything-su-or-sudo "sudo") (define-key (anything-read-file-name-map) "\C-i" 'anything-s…

auto-install.elをバッチモードで動かす

めも emacs --batch -no-init-file -no-site-file --directory ~/.emacs.d/elisp/ \ --eval " (progn (require 'auto-install) (require 'cl) (setq auto-install-directory (concat (car load-path) \\"/\\") auto-install-save-confirm nil auto-install-p…

遅延初期化する attr_reader を追加するモジュール(改良)

すっきりさせてみた。 # add lazy initialization attribute definition module LazyInitializationAttribute def LazyInitializationAttribute.append_features(mod) super def mod.lazy_attr_accesser name, hook=nil, &block attr_writer name lazy_attr_…

遅延初期化する attr_reader を追加するモジュール

module LazyInitializationAttribute def LazyInitializationAttribute.append_features(mod) super mod.const_set("LAZY_INITIALIZE_BLOCK_TABLE", {}) def mod.lazy_attr_accesser name, hook=nil, &block lazy_attr_reader name, hook, &block attr_write…

install-elispをバッチモードで動かす

めも echo "http://www.emacswiki.org/emacs/download/auto-complete.el" | \ emacs --batch --load /path/to/install-elisp.el \ -eval "(setq install-elisp-repository-directory \"~/.emacs.d/elisp/\")" \ -eval "(setq install-elisp-confirm-flag nil…

nokogiri習作 antのビルドファイルの概要を出力

出力結果 targetとコメントを抽出 ruby buildxmltarget.rb apache-tomcat-6.0.18-src/build.xml build-prepare [] compile [] Compile internal server components Copy static resource files build-only [build-prepare,compile,package] package [] Commo…

macを買ってやったこと

インストールしたもの Beginning OS X 10.5/インフラ整備編 - Beginning OS X Beginning OS X 10.5/アプリ導入編 - Beginning OS X MacPorts zsh subversion git stow screen Firefox 3.0 Firebug FireGestures Firemacs Greasemonkey iMacros Read it Later…

何も生産していない

仕事でしか生産性を発揮していない件について!アパートにも帰れないし。RSSを消費するだけの日々が続いている。

新年の抱負

そのまえに、去年(2008年)のやりたいことの確認 確認してみる。 C++をまともに使えるようになりたい。そのための教科書としてプログラミング言語C++とC++Primerを買う →本を買ったのはよいが、結局C++を使って何か作ることはしなかった。未達成 templateの…