Commit 4d25fd7e authored by Leo Liu's avatar Leo Liu

* progmodes/octave.el (octave-font-lock-keywords): Fix error

during redisplay.
(octave-goto-function-definition, octave-find-definition): Minor tweaks.
parent 61aaeb01
2013-05-14 Leo Liu <sdl.web@gmail.com>
* progmodes/octave.el (octave-font-lock-keywords): Fix error
during redisplay.
(octave-goto-function-definition, octave-find-definition): Minor tweaks.
2013-05-14 Glenn Morris <rgm@gnu.org>
* progmodes/flymake.el (flymake-xml-program): New option.
......
......@@ -459,13 +459,14 @@ Non-nil means always go to the next Octave code line after sending."
(let ((beg (match-beginning 0))
(end (match-end 0)))
(unless (octave-in-string-or-comment-p)
(unwind-protect
(condition-case nil
(progn
(goto-char beg)
(backward-up-list)
(when (memq (char-after) '(?\( ?\[ ?\{))
(put-text-property beg end 'face nil)))
(goto-char end)))))
(put-text-property beg end 'face nil))
(goto-char end))
(error (goto-char end))))))
nil))
;; Fontify all operators.
(cons octave-operator-regexp 'font-lock-builtin-face)
......@@ -929,9 +930,9 @@ directory and makes this the current buffer's default directory."
(defun octave-goto-function-definition ()
"Go to the first function definition."
(when (save-excursion
(goto-char (point-min))
(re-search-forward octave-function-header-regexp nil t))
(if (not (re-search-forward octave-function-header-regexp nil t))
(forward-comment (point-max))
(goto-char (match-beginning 3))
(match-string 3)))
......@@ -1681,9 +1682,10 @@ if iskeyword(\"%s\") disp(\"`%s' is a keyword\") else which(\"%s\") endif\n"
(user-error "%s" (or line (format "`%s' not found" fn)))
(require 'etags)
(ring-insert find-tag-marker-ring (point-marker))
(find-file (funcall octave-find-definition-filename-function file))
(or (octave-goto-function-definition)
(forward-comment (point-max))))))
(setq file (funcall octave-find-definition-filename-function file))
(when file
(find-file file)
(octave-goto-function-definition)))))
(provide 'octave)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment