emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 518ff50: TCL indentation fix outside functions


From: Lars Ingebrigtsen
Subject: [Emacs-diffs] master 518ff50: TCL indentation fix outside functions
Date: Sat, 12 Oct 2019 23:18:44 -0400 (EDT)

branch: master
commit 518ff50f7a245f437576c5f7e716be9cba336287
Author: Rolf Ade <address@hidden>
Commit: Lars Ingebrigtsen <address@hidden>

    TCL indentation fix outside functions
    
    * lisp/progmodes/tcl.el (tcl-calculate-indent): Indent code
    correctly outside of function definitions (bug#23565).
    
    Copyright-paperwork-exempt: yes
---
 lisp/progmodes/tcl.el | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/lisp/progmodes/tcl.el b/lisp/progmodes/tcl.el
index 0fd3d6d..0788725 100644
--- a/lisp/progmodes/tcl.el
+++ b/lisp/progmodes/tcl.el
@@ -815,9 +815,14 @@ Returns nil if line starts inside a string, t if in a 
comment."
           state
           containing-sexp
           found-next-line)
-      (if parse-start
-         (goto-char parse-start)
-       (beginning-of-defun))
+      (cond
+       (parse-start
+       (goto-char parse-start))
+       ((not (beginning-of-defun))
+        ;; If we're not in a function, don't use
+        ;; `tcl-beginning-of-defun-function'.
+        (let ((beginning-of-defun-function nil))
+          (beginning-of-defun))))
       (while (< (point) indent-point)
        (setq parse-start (point))
        (setq state (parse-partial-sexp (point) indent-point 0))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]