From: Lars Ingebrigtsen Date: Wed, 18 Sep 2019 14:01:56 +0000 (+0200) Subject: Fix a bug in callback functions in align-areas X-Git-Tag: emacs-27.0.90~1545 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=b82f34f996c25deda1b89fc7006833335bb1a6fa;p=emacs.git 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" . --- diff --git a/lisp/align.el b/lisp/align.el index 443237b451b..cd72d52df47 100644 --- a/lisp/align.el +++ b/lisp/align.el @@ -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))