unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Theodor Thornhill <theo@thornhill.no>
To: Stefan Monnier <monnier@iro.umontreal.ca>, emacs-devel@gnu.org
Cc: Yuan Fu <casouri@gmail.com>
Subject: Re: emacs-29 02e046566e 3/3: Set beginning/end-of-defun-function in treesit-major-mode-setup
Date: Thu, 22 Dec 2022 16:21:24 +0100	[thread overview]
Message-ID: <874jtnea6j.fsf@thornhill.no> (raw)
In-Reply-To: <jwv3597mqp0.fsf-monnier+emacs@gnu.org>

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>> +    ;; `end-of-defun' will not work completely correctly in nested
>> +    ;; defuns due to its implementation.  However, many lisp programs
>> +    ;; use `beginning/end-of-defun', so we should still set
>> +    ;; `beginning/end-of-defun-function' so they still mostly work.
>> +    ;; This is also what `cc-mode' does: rebind user commands and set
>> +    ;; the variables.  In future we should update `end-of-defun' to
>> +    ;; work with nested defuns.
>> +    (setq-local beginning-of-defun-function #'treesit-beginning-of-defun)
>> +    (setq-local end-of-defun-function #'treesit-end-of-defun)))
>
> Is there a bug report for that?
>
>
>         Stefan


bug#60197

Theo



      reply	other threads:[~2022-12-22 15:21 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <167169878178.1257.12592279240667535659@vcs2.savannah.gnu.org>
     [not found] ` <20221222084623.4FFA8C0061B@vcs2.savannah.gnu.org>
2022-12-22 14:59   ` emacs-29 02e046566e 3/3: Set beginning/end-of-defun-function in treesit-major-mode-setup Stefan Monnier
2022-12-22 15:21     ` Theodor Thornhill [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874jtnea6j.fsf@thornhill.no \
    --to=theo@thornhill.no \
    --cc=casouri@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).