From 4c4eda4c314e1226a9e95f4c733416de4df21245 Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Tue, 10 May 2022 04:41:31 +0200 Subject: [PATCH] Make imenu find defalias entries * lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression): Also find defalias (bug#7855). --- lisp/emacs-lisp/lisp-mode.el | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index e7c3a4b64f5..5dd2f5162ed 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -119,6 +119,15 @@ t)) "\\s-+\\(" lisp-mode-symbol-regexp "\\)")) 2) + ;; Like the previous, but uses a quoted symbol as the name. + (list nil + (purecopy (concat "^\\s-*(" + (eval-when-compile + (regexp-opt + '("defalias" "define-obsolete-function-alias") + t)) + "\\s-+'\\(" lisp-mode-symbol-regexp "\\)")) + 2) (list (purecopy "Variables") (purecopy (concat "^\\s-*(" (eval-when-compile -- 2.39.2