Subject: bug#19342: auto-fill scan-error in sh-mode

From: Lars Ingebrigtsen <[email-masked]>
Date: Fri, 06 May 2022 14:26:38 +0200

Stefan Monnier <[email-masked]> writes:

>> Sure, sounds simpler...  uhm...  but what would a good point-max be
>> here?  Just the `fc' point?
>
> I'd think `point-max` does the trick.

Tried that, and it leads to breakages in other parts of the loop:

Debugger entered--Lisp error: (scan-error "Containing expression ends prematurely" 74 74)
  signal(scan-error ("Containing expression ends prematurely" 74 74))
  smie-forward-sexp-command(1)
  forward-sexp(1)
  smie-indent-forward-token()
  smie-auto-fill(#f(compiled-function (&rest args) #<bytecode -0x1ddee5fc6c36b776>))
  apply(smie-auto-fill #f(compiled-function (&rest args) #<bytecode -0x1ddee5fc6c36b776>) nil)
  #f(advice smie-auto-fill :around #f(compiled-function (&rest args) #<bytecode -0x1ddee5fc6c36b776>))()
  internal-auto-fill()

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no