[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112551: * progmodes/octave.el (octav
From: |
Leo Liu |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112551: * progmodes/octave.el (octave-begin-keywords, octave-end-keywords) |
Date: |
Sat, 11 May 2013 15:39:59 +0800 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 112551
committer: Leo Liu <address@hidden>
branch nick: trunk
timestamp: Sat 2013-05-11 15:39:59 +0800
message:
* progmodes/octave.el (octave-begin-keywords, octave-end-keywords)
(octave-reserved-words, octave-smie-bnf-table)
(octave-smie-rules): Add new keywords from Octave 3.6.4.
modified:
lisp/ChangeLog
lisp/progmodes/octave.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2013-05-11 06:20:10 +0000
+++ b/lisp/ChangeLog 2013-05-11 07:39:59 +0000
@@ -5,6 +5,9 @@
out of more syntactic contructs since moving to smie.
(octave-indent-comment): New function.
(octave-mode): Use it in smie-indent-functions. (Bug#14350)
+ (octave-begin-keywords, octave-end-keywords)
+ (octave-reserved-words, octave-smie-bnf-table)
+ (octave-smie-rules): Add new keywords from Octave 3.6.4.
2013-05-11 Glenn Morris <address@hidden>
=== modified file 'lisp/progmodes/octave.el'
--- a/lisp/progmodes/octave.el 2013-05-11 06:20:10 +0000
+++ b/lisp/progmodes/octave.el 2013-05-11 07:39:59 +0000
@@ -68,20 +68,22 @@
"Regexp to match the start of an Octave comment up to its body.")
(defvar octave-begin-keywords
- '("do" "for" "function" "if" "switch" "try" "unwind_protect" "while"))
+ '("classdef" "do" "enumeration" "events" "for" "function" "if" "methods"
+ "parfor" "properties" "switch" "try" "unwind_protect" "while"))
(defvar octave-else-keywords
'("case" "catch" "else" "elseif" "otherwise" "unwind_protect_cleanup"))
(defvar octave-end-keywords
- '("endfor" "endfunction" "endif" "endswitch" "end_try_catch"
+ '("endclassdef" "endenumeration" "endevents" "endfor" "endfunction" "endif"
+ "endmethods" "endparfor" "endproperties" "endswitch" "end_try_catch"
"end_unwind_protect" "endwhile" "until" "end"))
(defvar octave-reserved-words
(append octave-begin-keywords
octave-else-keywords
octave-end-keywords
- '("break" "continue" "end" "global" "persistent" "return"))
+ '("break" "continue" "global" "persistent" "return"))
"Reserved words in Octave.")
(defvar octave-function-header-regexp
@@ -303,6 +305,8 @@
("unwind_protect" exp "unwind_protect_cleanup" exp "end")
("for" exp "endfor")
("for" exp "end")
+ ("parfor" exp "endparfor")
+ ("parfor" exp "end")
("do" exp "until" atom)
("while" exp "endwhile")
("while" exp "end")
@@ -316,7 +320,17 @@
("switch" exp "case" exp "case" exp "otherwise" exp "endswitch")
("switch" exp "case" exp "case" exp "otherwise" exp "end")
("function" exp "endfunction")
- ("function" exp "end"))
+ ("function" exp "end")
+ ("enumeration" exp "endenumeration")
+ ("enumeration" exp "end")
+ ("events" exp "endevents")
+ ("events" exp "end")
+ ("methods" exp "endmethods")
+ ("methods" exp "end")
+ ("properties" exp "endproperties")
+ ("properties" exp "end")
+ ("classdef" exp "endclassdef")
+ ("classdef" exp "end"))
;; (fundesc (atom "=" atom))
))
@@ -406,8 +420,10 @@
;; aligns it with "switch".
(`(:before . "case") (if (not (smie-rule-sibling-p)) octave-block-offset))
(`(:after . ";")
- (if (smie-rule-parent-p "function" "if" "while" "else" "elseif" "for"
- "otherwise" "case" "try" "catch" "unwind_protect"
+ (if (smie-rule-parent-p "classdef" "events" "enumeration" "function" "if"
+ "while" "else" "elseif" "for" "parfor"
+ "properties" "methods" "otherwise" "case"
+ "try" "catch" "unwind_protect"
"unwind_protect_cleanup")
(smie-rule-parent octave-block-offset)
;; For (invalid) code between switch and case.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112551: * progmodes/octave.el (octave-begin-keywords, octave-end-keywords),
Leo Liu <=