From e6c696fafa0f6c99531497e60353743478e70d3a Mon Sep 17 00:00:00 2001 From: Eshel Yaron Date: Fri, 17 Jan 2025 12:47:39 +0100 Subject: [PATCH] (find-function-search-for-symbol): Guard --- lisp/emacs-lisp/find-func.el | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el index 45209dc53c0..d51d3c87dea 100644 --- a/lisp/emacs-lisp/find-func.el +++ b/lisp/emacs-lisp/find-func.el @@ -486,8 +486,11 @@ The search is done in the source for library LIBRARY." (setq library (substring library 0 (match-beginning 1)))) (let* ((filename (find-library-name library)) (regexp-symbol - (alist-get type (append (get symbol 'find-definition-alist) - find-function-regexp-alist)))) + (alist-get + type + (append + (and (symbolp symbol) (get symbol 'find-definition-alist)) + find-function-regexp-alist)))) (with-current-buffer (find-file-noselect filename) (let ((regexp (if (functionp regexp-symbol) regexp-symbol (format (symbol-value regexp-symbol) -- 2.39.5