windows.elのsee-you-again上書きをdefadviceで書き換える
自分のinit.el見てたら
(defun see-you-again () "Save all of the window configurations if you say yes, and kill-emacs." (interactive) (when win:current-config (if (yes-or-no-p "Save All Configurations? ") (win-save-all-configurations)) (save-buffers-kill-emacs)))
ってのがC-x C-cに割り当てられていて、
てっきり独自の関数かと思ってたらwindows.elでdefunされてるやつを上書きしてたみたい。
調べたら何かみんな同じようなコードで上書きしてるんだけど、
これってdefadviceでいいんじゃないの?って思って書き直した。
(defadvice see-you-again (around see-you-again-around activate) "Save all of the window configurations if you say yes, and kill-emacs." (if (yes-or-no-p "Save All Configurations? ") ad-do-it) (save-buffers-kill-emacs))
これがベストかどうかは知らない。皆上書きしてるから何か理由があるのかなぁと思ったり。
(Emacs先生が周りにいないのです。id:odz先生〜)