]> git.eshelyaron.com Git - emacs.git/commitdiff
* progmodes/octave.el (octave-indent-comment): Fix the indentation
authorLeo Liu <sdl.web@gmail.com>
Mon, 13 May 2013 00:07:18 +0000 (08:07 +0800)
committerLeo Liu <sdl.web@gmail.com>
Mon, 13 May 2013 00:07:18 +0000 (08:07 +0800)
of ### or %%%.

lisp/ChangeLog
lisp/progmodes/octave.el

index 5a2d5c991d4dcd7b3e9dd827802a7afd8f921964..62f094dc6e4f18ddd165b90a152abe94c6db6561 100644 (file)
@@ -1,3 +1,8 @@
+2013-05-13  Leo Liu  <sdl.web@gmail.com>
+
+       * progmodes/octave.el (octave-indent-comment): Fix the indentation
+       of ### or %%%.
+
 2013-05-12  Leo Liu  <sdl.web@gmail.com>
 
        * progmodes/octave.el (inferior-octave-startup): Store the value
index 75c2508dd306ef7ecc13bbf297438d1269e6ef20..f00347d319ad12eafadd9f6b2267b7454841a6e0 100644 (file)
@@ -434,10 +434,13 @@ Non-nil means always go to the next Octave code line after sending."
   "A function for `smie-indent-functions' (which see)."
   (save-excursion
     (back-to-indentation)
-    (when (and (not (octave-in-string-or-comment-p))
-               (looking-at-p "\\s<\\(?:[^{}]\\|$\\)")
-               (not (looking-at-p "\\s<\\s<")))
-      (comment-choose-indent))))
+    (cond
+     ((octave-in-string-or-comment-p) nil)
+     ((looking-at-p "\\s<\\{3,\\}")
+      0)
+     ((and (looking-at-p "\\s<\\(?:[^{}]\\|$\\)")
+           (not (looking-at-p "\\s<\\s<")))
+      (comment-choose-indent)))))
 
 \f
 (defvar octave-font-lock-keywords