Variable: octave-font-lock-keywords
octave-font-lock-keywords is a variable defined in octave.el.gz.
Value
(("\\_<\\(?:break\\|c\\(?:a\\(?:se\\|tch\\)\\|lassdef\\|ontinue\\)\\|do\\|e\\(?:lse\\(?:if\\)?\\|n\\(?:d\\(?:_\\(?:try_catch\\|unwind_protect\\)\\|classdef\\|e\\(?:numeration\\|vents\\)\\|f\\(?:or\\|unction\\)\\|if\\|methods\\|p\\(?:arfor\\|roperties\\)\\|s\\(?:pmd\\|witch\\)\\|while\\)?\\|umeration\\)\\|vents\\)\\|f\\(?:or\\|unction\\)\\|global\\|if\\|methods\\|otherwise\\|p\\(?:arfor\\|ersistent\\|roperties\\)\\|return\\|s\\(?:pmd\\|witch\\)\\|try\\|un\\(?:til\\|wind_protect\\(?:_cleanup\\)?\\)\\|while\\)\\_>" . font-lock-keyword-face)
(#[257 "\300\301\302#\203,\303\224\303\225\304 \204'\305\225\203\306 \202\307 \203'\310\311\312$\210\266\202\312\207"
[re-search-forward "\\_<en\\(?:d\\|umeratio\\(n\\)\\)\\_>" move 0 octave-in-string-or-comment-p 1 octave-smie--funcall-p octave-smie--end-index-p put-text-property face nil]
8 "\n\n(fn LIMIT)"])
("\\(?:!=\\|&&\\|\\*[*=]\\|\\+[+=]\\|-[=-]\\|\\.\\(?:\\*\\*\\|\\.\\.\\|['*/\\^]\\)\\|/=\\|<=\\|==\\|>=\\|||\\|~=\\|[!&'*+,/:->\\|~^-]\\)" . font-lock-builtin-face)
("^\\s-*\\_<\\(function\\)\\_>\\([^=;(\n]*=[ ]*\\|[ ]*\\)\\(\\(?:\\w\\|\\s_\\)+\\)\\_>"
(1 font-lock-keyword-face)
(3 font-lock-function-name-face nil t)))
Documentation
Additional Octave expressions to highlight.
Source Code
;; Defined in /usr/src/emacs/lisp/progmodes/octave.el.gz
(defvar octave-font-lock-keywords
(list
;; Fontify all builtin keywords.
(cons (concat "\\_<" (regexp-opt octave-reserved-words) "\\_>")
'font-lock-keyword-face)
;; Note: 'end' also serves as the last index in an indexing expression,
;; and 'enumerate' is also a function.
;; Ref: https://www.mathworks.com/help/matlab/ref/end.html
;; Ref: https://www.mathworks.com/help/matlab/ref/enumeration.html
(list (lambda (limit)
(while (re-search-forward "\\_<en\\(?:d\\|umeratio\\(n\\)\\)\\_>"
limit 'move)
(let ((beg (match-beginning 0))
(end (match-end 0)))
(unless (octave-in-string-or-comment-p)
(when (if (match-end 1)
(octave-smie--funcall-p)
(octave-smie--end-index-p))
(put-text-property beg end 'face nil)))))
nil))
;; Fontify all operators.
(cons octave-operator-regexp 'font-lock-builtin-face)
;; Fontify all function declarations.
(list octave-function-header-regexp
'(1 font-lock-keyword-face)
'(3 font-lock-function-name-face nil t)))
"Additional Octave expressions to highlight.")