1

アドバイスを追加するときに、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のですが、これを最初に機能させようとしています。

4

1 に答える 1