From: Lars Ingebrigtsen <larsi@gnus.org>
To: "John Wiegley" <johnw@gnu.org>
Cc: 30139@debbugs.gnu.org, "Michał Kondraciuk" <k.michal@zoho.com>
Subject: bug#30139: 25.3; Passing callback to align-region raises an error when using `justify` rule
Date: Mon, 24 Jun 2019 22:10:46 +0200 [thread overview]
Message-ID: <m3mui6k47k.fsf@gnus.org> (raw)
In-Reply-To: <f232e32e-5e02-f426-39e3-56a686ed2def@zoho.com>
"John Wiegley" <johnw@gnu.org> writes:
>>>>>> "MK" == MichaB Kondraciuk <k.michal@zoho.com> writes:
>
> MK> is there any news on the status of this bug? Should I just send the patch to
> MK> emacs-devel?
>
> Hi MichaB,
>
> 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.
I am guessing that you meant the following change:
diff --git a/lisp/align.el b/lisp/align.el
index 443237b451..cd72d52df4 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -1216,9 +1216,12 @@ align-areas
(when area
(if func
(funcall func
- (marker-position (car area))
- (marker-position (cdr area))
- change)
+ (marker-position (car area))
+ (marker-position (if (and justify
+ (consp (cdr area)))
+ (cadr area)
+ (cdr area)))
+ change)
(if (not (and justify
(consp (cdr area))))
(goto-char (cdr area))
And with it in place, I don't get any errors.
But nothing happens in the *test* buffer at all, so that's a bit
underwhelming...
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog: http://lars.ingebrigtsen.no
next prev parent reply other threads:[~2019-06-24 20:10 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-16 20:23 bug#30139: 25.3; Passing callback to align-region raises an error when using `justify` rule Michał Kondraciuk
2018-01-19 17:04 ` Michał Kondraciuk
[not found] ` <639293e7-4cd9-9297-1ad6-ceba6697a627@zoho.com>
2018-02-20 21:07 ` Michał Kondraciuk
2018-02-21 18:30 ` Eli Zaretskii
2018-02-24 10:21 ` Eli Zaretskii
2018-03-03 11:11 ` Eli Zaretskii
2018-03-19 9:19 ` Eli Zaretskii
2018-03-20 0:43 ` John Wiegley
2018-03-20 0:39 ` John Wiegley
2018-04-01 9:51 ` Eli Zaretskii
2018-04-03 17:47 ` John Wiegley
2019-06-24 20:10 ` Lars Ingebrigtsen [this message]
2019-09-18 14:00 ` Lars Ingebrigtsen
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=m3mui6k47k.fsf@gnus.org \
--to=larsi@gnus.org \
--cc=30139@debbugs.gnu.org \
--cc=johnw@gnu.org \
--cc=k.michal@zoho.com \
/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).