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

Luke Lau via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 18 03:23:32 PDT 2023


luke marked 2 inline comments as done.
luke 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)
----------------
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 `{`


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