diff options
| author | Lars Ingebrigtsen <larsi@gnus.org> | 2019-09-18 16:01:56 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen <larsi@gnus.org> | 2019-09-19 14:36:55 +0200 |
| commit | b82f34f996c25deda1b89fc7006833335bb1a6fa (patch) | |
| tree | e7dec78ad68dd04f35dfdecbb69e2d483e4a34b3 /lisp/align.el | |
| parent | d38110efa75372d4c3be702f157d3a8c6b7f37b5 (diff) | |
| download | emacs-b82f34f996c25deda1b89fc7006833335bb1a6fa.tar.gz | |
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>.
Diffstat (limited to 'lisp/align.el')
| -rw-r--r-- | lisp/align.el | 9 |
1 files changed, 6 insertions, 3 deletions
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)) |
