From 2aeb3a1dbaca57eb0fa38aa89f08a66563272041 Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Mon, 13 May 2013 08:07:18 +0800 Subject: [PATCH] * progmodes/octave.el (octave-indent-comment): Fix the indentation of ### or %%%. --- lisp/ChangeLog | 5 +++++ lisp/progmodes/octave.el | 11 +++++++---- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5a2d5c991d4..62f094dc6e4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-05-13 Leo Liu + + * progmodes/octave.el (octave-indent-comment): Fix the indentation + of ### or %%%. + 2013-05-12 Leo Liu * progmodes/octave.el (inferior-octave-startup): Store the value diff --git a/lisp/progmodes/octave.el b/lisp/progmodes/octave.el index 75c2508dd30..f00347d319a 100644 --- a/lisp/progmodes/octave.el +++ b/lisp/progmodes/octave.el @@ -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))))) (defvar octave-font-lock-keywords -- 2.39.2