4

When I view documentation for beginning-of-defun, there is a note:

This function is advised.

Around-advice `senator':
Move backward to the beginning of a defun.
If semantic tags are available, use them to navigate.

However I can't find in which .el file the defadvice is called. Is there any way to navigate to the original file, where the advice is defined?

Edit: While i marked correct Phils' suggestion to rgrep the .el files, i still hope, that there is some more elegant way to trace back to the defadvice.

Drew
  • 29,895
  • 7
  • 74
  • 104
Mirzhan Irkegulov
  • 17,660
  • 12
  • 105
  • 166
  • I agree. It seems something of an anomaly that you cannot locate these kinds of definitions automatically. – phils Jul 05 '12 at 10:58
  • The discussion on this topic continued in [another question](http://stackoverflow.com/questions/17539241), where eventually I've stumbled over a trick that could provide this information with less effort / more consistently. Leaving this comment for future googlers here :) –  Jul 09 '13 at 09:12

1 Answers1

2

As far as I know there is no way to navigate to the location of a defadvice expression (I'd be delighted to be proved wrong).

This should presumably track it down:

M-x rgrep RET (defadvice 'beginning-of-defun RET *.el RET ~/.emacs.d/ RET

(or failing that, the site-lisp directory would be the next place to look)

You can also view the advice data structure like this (but this doesn't include the information you're looking for).

(ad-get-advice-info 'beginning-of-defun)
phils
  • 71,335
  • 11
  • 153
  • 198