Subject: Re: bug#30139: 25.3; Passing callback to align-region raises an error when using `justify` rule

From: "John Wiegley" <[email-masked]>
Date: Mon, 19 Mar 2018 17:39:43 -0700

>>>>> "MK" == Michał Kondraciuk <[email-masked]> writes:

MK> is there any news on the status of this bug? Should I just send the patch to
MK> emacs-devel?

Hi Michał,

I would suggest the following code:

    (funcall func
             (marker-position (car area))
             (marker-position (if (and justify
                                       (consp (cdr area)))
                                  (cadr area)
                                (cdr area)))
             change)

I can't really tell you at this point if this is the correct change, but if it
solves the bug, it surely is an improvement.

-- 
John Wiegley                  GPG fingerprint = 4710 CF98 AF9B 327B B80F
http://newartisans.com                          60E1 46C4 BD1A 7AC1 4BA2