GNU bug report logs - #19342
auto-fill scan-error in sh-mode

Previous Next

Package: emacs;

Reported by: Glenn Morris <rgm <at> gnu.org>

Date: Wed, 10 Dec 2014 21:52:02 UTC

Severity: normal

Tags: confirmed

Found in versions 24.4, 28.0.50

Done: Stefan Monnier <monnier <at> iro.umontreal.ca>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Lars Ingebrigtsen <larsi <at> gnus.org>
Cc: Glenn Morris <rgm <at> gnu.org>, 19342 <at> debbugs.gnu.org
Subject: bug#19342: auto-fill scan-error in sh-mode
Date: Fri, 06 May 2022 10:12:21 -0400
Lars Ingebrigtsen [2021-08-31 03:24:35] wrote:
> Stefan Monnier <monnier <at> iro.umontreal.ca> writes:
>> It's not issuing an error.  It's emitting a message, the purpose
>> of which is to warn the user that the behavior was affected by
>> that problem.
>
> I get your point, and as you say, it works fine -- it auto-fills as it's
> supposed to.
>
> But it's literally signalling an error.  (And this is one of those rare
> instances where "literally" isn't a general intensifier.)  Changing it
> to a message would solve the issue, I think?

BTW, AFAICT it does not *literally* signal an error: the error is caught
inside `smie-auto-fill` and turned into a message (by
`with-demoted-errors`).

So if we want to silence the message, all it takes is to use
`ignore-error` instead as in the patch below, no?


        Stefan


diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
index 2bab1319132..2be1ca3218b 100644
--- a/lisp/emacs-lisp/smie.el
+++ b/lisp/emacs-lisp/smie.el
@@ -1846,7 +1846,7 @@ smie-auto-fill
                            (move-to-column fc)
                            (syntax-ppss))))
         (while
-            (and (with-demoted-errors "SMIE Error: %S"
+            (and (ignore-error scan-error
                    (save-excursion
                      (let ((end (point))
                            (bsf nil)    ;Best-so-far.





This bug report was last modified 3 years and 73 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.