diff options
| -rw-r--r-- | lisp/emacs-lisp/find-func.el | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 8f488a9c00a..6bdfb4bc38b 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el | |||
| @@ -487,11 +487,14 @@ The search is done in the source for library LIBRARY." | |||
| 487 | ;; If the regexp search didn't find the location of | 487 | ;; If the regexp search didn't find the location of |
| 488 | ;; the symbol (for example, because it is generated by | 488 | ;; the symbol (for example, because it is generated by |
| 489 | ;; a macro), try a slightly more expensive search that | 489 | ;; a macro), try a slightly more expensive search that |
| 490 | ;; expands macros until it finds the symbol. | 490 | ;; expands macros until it finds the symbol. Since |
| 491 | ;; macro-expansion involves arbitrary code execution, | ||
| 492 | ;; only attempt it in trusted buffers. | ||
| 491 | (cons (current-buffer) | 493 | (cons (current-buffer) |
| 492 | (find-function--search-by-expanding-macros | 494 | (when (trusted-content-p) |
| 493 | (current-buffer) symbol type | 495 | (find-function--search-by-expanding-macros |
| 494 | form-matcher-factory)))))))))) | 496 | (current-buffer) symbol type |
| 497 | form-matcher-factory))))))))))) | ||
| 495 | 498 | ||
| 496 | ;;;###autoload | 499 | ;;;###autoload |
| 497 | (defun find-function-update-type-alist (symbol type variable) | 500 | (defun find-function-update-type-alist (symbol type variable) |