1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-22 07:09:54 +00:00

Fix a bug in callback functions in align-areas

* lisp/align.el (align-areas): When given a callback function and
JUSTIFY, pick out the correct parameters (bug#30139).  Suggested
by "John Wiegley" <johnw@gnu.org>.
This commit is contained in:
Lars Ingebrigtsen 2019-09-18 16:01:56 +02:00
parent d38110efa7
commit b82f34f996

View File

@ -1216,9 +1216,12 @@ have been aligned. No changes will be made to the buffer."
(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))