From: Leo Liu Date: Mon, 13 May 2013 00:07:18 +0000 (+0800) Subject: * progmodes/octave.el (octave-indent-comment): Fix the indentation X-Git-Tag: emacs-24.3.90~173^2^2~42^2~45^2~387^2~2026^2~229^2~105 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=2aeb3a1dbaca57eb0fa38aa89f08a66563272041;p=emacs.git * progmodes/octave.el (octave-indent-comment): Fix the indentation of ### or %%%. --- 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