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> 2013-05-14 Glenn Morris <rgm@gnu.org>
* progmodes/flymake.el (flymake-xml-program): New option. * 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." ...@@ -459,13 +459,14 @@ Non-nil means always go to the next Octave code line after sending."
(let ((beg (match-beginning 0)) (let ((beg (match-beginning 0))
(end (match-end 0))) (end (match-end 0)))
(unless (octave-in-string-or-comment-p) (unless (octave-in-string-or-comment-p)
(unwind-protect (condition-case nil
(progn (progn
(goto-char beg) (goto-char beg)
(backward-up-list) (backward-up-list)
(when (memq (char-after) '(?\( ?\[ ?\{)) (when (memq (char-after) '(?\( ?\[ ?\{))
(put-text-property beg end 'face nil))) (put-text-property beg end 'face nil))
(goto-char end))))) (goto-char end))
(error (goto-char end))))))
nil)) nil))
;; Fontify all operators. ;; Fontify all operators.
(cons octave-operator-regexp 'font-lock-builtin-face) (cons octave-operator-regexp 'font-lock-builtin-face)
...@@ -929,9 +930,9 @@ directory and makes this the current buffer's default directory." ...@@ -929,9 +930,9 @@ directory and makes this the current buffer's default directory."
(defun octave-goto-function-definition () (defun octave-goto-function-definition ()
"Go to the first function definition." "Go to the first function definition."
(when (save-excursion (goto-char (point-min))
(goto-char (point-min)) (if (not (re-search-forward octave-function-header-regexp nil t))
(re-search-forward octave-function-header-regexp nil t)) (forward-comment (point-max))
(goto-char (match-beginning 3)) (goto-char (match-beginning 3))
(match-string 3))) (match-string 3)))
...@@ -1681,9 +1682,10 @@ if iskeyword(\"%s\") disp(\"`%s' is a keyword\") else which(\"%s\") endif\n" ...@@ -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))) (user-error "%s" (or line (format "`%s' not found" fn)))
(require 'etags) (require 'etags)
(ring-insert find-tag-marker-ring (point-marker)) (ring-insert find-tag-marker-ring (point-marker))
(find-file (funcall octave-find-definition-filename-function file)) (setq file (funcall octave-find-definition-filename-function file))
(or (octave-goto-function-definition) (when file
(forward-comment (point-max)))))) (find-file file)
(octave-goto-function-definition)))))
(provide 'octave) (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