summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp
diff options
context:
space:
mode:
authorYuan Fu <casouri@gmail.com>2023-08-10 14:27:29 -0700
committerYuan Fu <casouri@gmail.com>2023-08-19 14:55:32 -0700
commitbaeb2d71ae7720c5335cd11aefa752f24374fa92 (patch)
tree84a9625a5a41e75928cf7bbcabb53a7ce2f231f0 /lisp/emacs-lisp
parent781ddd7e7d87de150d74d6d8615c25e68b42275b (diff)
downloademacs-baeb2d71ae7720c5335cd11aefa752f24374fa92.tar.gz
emacs-baeb2d71ae7720c5335cd11aefa752f24374fa92.tar.bz2
emacs-baeb2d71ae7720c5335cd11aefa752f24374fa92.zip
Support defun navigation for DEFUN in c-ts-mode (bug#64442)
Before this change, beginning/end-of-defun just ignores DEFUN in c-ts-mode. After this change, beginning/end-of-defun can recognize DEFUN, but a DEFUN definition is considered two defuns. Eg, beginning/end-of-defun will stop at (1) (2) and (3) in the following snippet: (1)DEFUN ("treesit-node-parser", Ftreesit_node_parser, Streesit_node_parser, 1, 1, 0, doc: /* Return the parser to which NODE belongs. */) (Lisp_Object node) (2){ CHECK_TS_NODE (node); return XTS_NODE (node)->parser; } (3) Ideally we want point to only stop at (1) and (3), but that'll be a lot harder to do. * lisp/progmodes/c-ts-mode.el: (c-ts-mode--defun-valid-p): Refactor to take in account of DEFUN body. (c-ts-mode--emacs-defun-body-p): New function. (c-ts-base-mode): Add DEFUN and DEFUN body to recognized types. (c-ts-mode--emacs-defun-at-point): Now that we recognize both parts of a DEFUN as defun, c-ts-mode--emacs-defun-at-point needs to be updated to adapt to it.
Diffstat (limited to 'lisp/emacs-lisp')
0 files changed, 0 insertions, 0 deletions