[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112567: * progmodes/octave.el (octav
From: |
Leo Liu |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112567: * progmodes/octave.el (octave-indent-comment): Fix indentation for %!. |
Date: |
Mon, 13 May 2013 15:24:22 +0800 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 112567
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Mon 2013-05-13 15:24:22 +0800
message:
* progmodes/octave.el (octave-indent-comment): Fix indentation for %!.
(octave-comment-start-skip): Include %!.
(octave-mode): Set comment-start-skip to octave-comment-start-skip.
modified:
lisp/ChangeLog
lisp/progmodes/octave.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-05-13 01:36:42 +0000
+++ b/lisp/ChangeLog 2013-05-13 07:24:22 +0000
@@ -1,9 +1,11 @@
2013-05-13 Leo Liu <address@hidden>
- * progmodes/octave.el (octave-indent-comment): Fix the indentation
- of ### or %%%.
+ * progmodes/octave.el (octave-indent-comment): Fix indentation for
+ ###, and %!.
(octave-mode-map): Bind octave-indent-defun to C-c C-q instead of
C-M-q.
+ (octave-comment-start-skip): Include %!.
+ (octave-mode): Set comment-start-skip to octave-comment-start-skip.
2013-05-12 Leo Liu <address@hidden>
=== modified file 'lisp/progmodes/octave.el'
--- a/lisp/progmodes/octave.el 2013-05-13 01:36:42 +0000
+++ b/lisp/progmodes/octave.el 2013-05-13 07:24:22 +0000
@@ -64,7 +64,7 @@
(string octave-comment-char ?\s)
"String to insert to start a new Octave in-line comment.")
-(defvar octave-comment-start-skip "\\s<+\\s-*"
+(defvar octave-comment-start-skip "\\(?:%!\\|\\s<+\\)\\s-*"
"Regexp to match the start of an Octave comment up to its body.")
(defvar octave-begin-keywords
@@ -439,7 +439,8 @@
((octave-in-string-or-comment-p) nil)
((looking-at-p "\\s<\\{3,\\}")
0)
- ((and (looking-at-p "\\s<\\(?:[^{}]\\|$\\)")
+ ;; Exclude %{, %} and %!.
+ ((and (looking-at-p "\\s<\\(?:[^{}!]\\|$\\)")
(not (looking-at-p "\\s<\\s<")))
(comment-choose-indent)))))
@@ -532,10 +533,7 @@
(setq-local comment-start octave-comment-start)
(setq-local comment-end "")
- ;; Don't set it here: it's not really a property of the language,
- ;; just a personal preference of the author.
- ;; (setq-local comment-column 32)
- (setq-local comment-start-skip "\\s<+\\s-*")
+ (setq-local comment-start-skip octave-comment-start-skip)
(setq-local comment-add 1)
(setq-local parse-sexp-ignore-comments t)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112567: * progmodes/octave.el (octave-indent-comment): Fix indentation for %!.,
Leo Liu <=