bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#77744: 31.0.50; Inconsistent error signal in up-list-default-functio


From: Juri Linkov
Subject: bug#77744: 31.0.50; Inconsistent error signal in up-list-default-function and treesit-up-list
Date: Fri, 11 Apr 2025 19:25:17 +0300
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/31.0.50 (x86_64-pc-linux-gnu)

> In Tree-sitter-based major modes, when up-list (or backward-up-list) is
> used, the operation is delegated to the treesit-up-list function. In
> traditional major modes, this is typically handled by
> up-list-default-function if a custom up-list-function is not defined. When
> the top level is reached, up-list-default-function signals scan-error, but
> treesit-up-list signals user-error.

This is because 'up-list-default-function' signals both:

  (if no-syntax-crossing
      ;; Assume called interactively; don't signal an error.
      (user-error "At top level")
    (signal (car err) (cdr err)))





reply via email to

[Prev in Thread] Current Thread [Next in Thread]