[PATCH] D158196: [emacs] Add regexps for defuns

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 18 22:53:00 PDT 2023


goldstein.w.n added inline comments.


================
Comment at: llvm/utils/emacs/llvm-mode.el:111
   (setq font-lock-defaults `(llvm-font-lock-keywords))
+  (setq-local defun-prompt-regexp "^[ \t]*define[ \t]+.+[ \t]+ at .+(.+)[ \t]*")
+  (setq-local add-log-current-defun-function #'llvm-current-defun-name)
----------------
luke wrote:
> goldstein.w.n wrote:
> > Likewise here.
> Whoops. Also found we need to handle trailing attributes like nounwind etc., since `defun-prompt-regexp` needs to match right up to the first `{`
Does this still need to be fixed. Don't see any codes for matching `{`.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D158196/new/

https://reviews.llvm.org/D158196



More information about the llvm-commits mailing list