アドバイスを追加するときに、elisp 関数の本文の特定の式をどのように一致させますか? find-file-noselect
具体的には、次の例で、の代わりに使用する関数をアドバイスしたいと思いfind-file
ます。行(find-file path)
は有効になります(find-file-noselect path)
。
(defun tst-fun (path line column)
(find-file path)
(goto-char (point-min))
(forward-line (1- line))
(forward-char column))
;; not sure how to structure this
(defadvice tst-fun (around noselect activate)
(find-file-noselect (ad-get-arg 0))
ad-do-it)
私はむしろそれを にしたいad-add-function
のですが、これを最初に機能させようとしています。