[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#21526: 24.5; prolog-mode: broken indentation for if-then-else constr
From: |
Stefan Monnier |
Subject: |
bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct |
Date: |
Mon, 21 Sep 2015 16:22:31 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
> When I try it with your patch, it fails to indent subsequent lines.
Ugh! That should be fixed now (see patch below).
>> IIUC the only remaining issue is the indentation we get when the line is
>> empty.
> This issue also remains. Thank you!
Right. This one requires thinking (but will benefit other modes as well).
Stefan
diff --git a/lisp/progmodes/prolog.el b/lisp/progmodes/prolog.el
index 24ac8d7..8c02e54 100644
--- a/lisp/progmodes/prolog.el
+++ b/lisp/progmodes/prolog.el
@@ -2081,7 +2081,7 @@ Argument BOUND is a buffer position limiting searching."
(defun prolog-find-unmatched-paren ()
"Return the column of the last unmatched left parenthesis."
(save-excursion
- (goto-char (or (car (nth 9 (syntax-ppss))) (point-min)))
+ (goto-char (or (nth 1 (syntax-ppss)) (point-min)))
(current-column)))
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Markus Triska, 2015/09/20
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Stefan Monnier, 2015/09/20
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Markus Triska, 2015/09/20
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Stefan Monnier, 2015/09/20
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Stefan Monnier, 2015/09/20
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Markus Triska, 2015/09/21
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct,
Stefan Monnier <=
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Markus Triska, 2015/09/22
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Stefan Monnier, 2015/09/22
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Markus Triska, 2015/09/22
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Markus Triska, 2015/09/22
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Markus Triska, 2015/09/23
- bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct, Markus Triska, 2015/09/25