GNU bug report logs - #21526
24.5; prolog-mode: broken indentation for if-then-else construct

Previous Next

Package: emacs;

Reported by: Markus Triska <triska <at> metalevel.at>

Date: Sun, 20 Sep 2015 16:21:01 UTC

Severity: minor

Found in version 24.5

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Stefan Monnier <monnier <at> IRO.UMontreal.CA>
To: Markus Triska <triska <at> metalevel.at>
Cc: 21526 <at> debbugs.gnu.org
Subject: bug#21526: 24.5; prolog-mode: broken indentation for if-then-else construct
Date: Mon, 21 Sep 2015 16:22:31 -0400
> 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)))
 
 




This bug report was last modified 4 years and 269 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.