emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] feature/mhtml-mode c366e52 07/11: make smie.el respect pro


From: Tom Tromey
Subject: [Emacs-diffs] feature/mhtml-mode c366e52 07/11: make smie.el respect prog-first-column
Date: Thu, 23 Mar 2017 23:15:04 -0400 (EDT)

branch: feature/mhtml-mode
commit c366e52f2d5a63aecff2c9e540382864b695c1b8
Author: Tom Tromey <address@hidden>
Commit: Tom Tromey <address@hidden>

    make smie.el respect prog-first-column
    
    * lisp/emacs-lisp/smie.el (smie-indent-bob): Call prog-first-column.
---
 lisp/emacs-lisp/smie.el | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lisp/emacs-lisp/smie.el b/lisp/emacs-lisp/smie.el
index 4d02b75..7baccbc 100644
--- a/lisp/emacs-lisp/smie.el
+++ b/lisp/emacs-lisp/smie.el
@@ -123,6 +123,8 @@
 
 (eval-when-compile (require 'cl-lib))
 
+(require 'prog-mode)
+
 (defgroup smie nil
   "Simple Minded Indentation Engine."
   :group 'languages)
@@ -1455,7 +1457,7 @@ in order to figure out the indentation of some other 
(further down) point."
   ;; Start the file at column 0.
   (save-excursion
     (forward-comment (- (point)))
-    (if (bobp) 0)))
+    (if (bobp) (prog-first-column))))
 
 (defun smie-indent-close ()
   ;; Align close paren with opening paren.



reply via email to

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