]> git.eshelyaron.com Git - emacs.git/commitdiff
(find-function-search-for-symbol): Guard
authorEshel Yaron <me@eshelyaron.com>
Fri, 17 Jan 2025 11:47:39 +0000 (12:47 +0100)
committerEshel Yaron <me@eshelyaron.com>
Fri, 17 Jan 2025 11:47:39 +0000 (12:47 +0100)
lisp/emacs-lisp/find-func.el

index 45209dc53c0c82bf2b70939e85f956698d6b15dc..d51d3c87deabbe09e0ed47ec296065d9b4ec9692 100644 (file)
@@ -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)