]> git.eshelyaron.com Git - emacs.git/commitdiff
Make imenu find defalias entries
authorLars Ingebrigtsen <larsi@gnus.org>
Tue, 10 May 2022 02:41:31 +0000 (04:41 +0200)
committerLars Ingebrigtsen <larsi@gnus.org>
Tue, 10 May 2022 02:41:43 +0000 (04:41 +0200)
* lisp/emacs-lisp/lisp-mode.el (lisp-imenu-generic-expression):
Also find defalias (bug#7855).

lisp/emacs-lisp/lisp-mode.el

index e7c3a4b64f539297b969d492ab40777ca4351241..5dd2f5162ed90af9b12bc8953dab022a52312c2d 100644 (file)
                               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