(semantic-matlab-root-directory): New Function.
(semantic-matlab-function-tags): Update to use above.
This commit is contained in:
parent
1640b6efd5
commit
8d900aff24
|
@ -65,6 +65,12 @@ Use `semantic-matlab-system-paths-include' to let semantic know
|
|||
which system directories you would like to include when doing
|
||||
completions.")
|
||||
|
||||
(defun semantic-matlab-root-directory ()
|
||||
"Calculate the current MATLAB root directory."
|
||||
(if (matlab-shell-active-p)
|
||||
(matlab-shell-matlabroot)
|
||||
semantic-matlab-root-directory))
|
||||
|
||||
;; The version of this variable in MATLAB.el is not condusive to extracting
|
||||
;; the information we need.
|
||||
(defvar semantic-matlab-match-function-re
|
||||
|
@ -86,7 +92,7 @@ START=END=0 and no arguments or return values."
|
|||
(taglist nil)
|
||||
)
|
||||
(goto-char (point-min))
|
||||
(if (and (string-match (format "^%s" semantic-matlab-root-directory)
|
||||
(if (and (string-match (format "^%s" (semantic-matlab-root-directory))
|
||||
(buffer-file-name))
|
||||
(looking-at "%\\([A-Z0-9_]+\\)\\s-+\\(.*\\)\\s-*$"))
|
||||
;; This is a builtin function, ie there's no function line.
|
||||
|
@ -113,7 +119,7 @@ START=END=0 and no arguments or return values."
|
|||
(forward-line)
|
||||
(beginning-of-line)
|
||||
;; snarf doc string
|
||||
(cond
|
||||
(cond
|
||||
;; Mathworks standard
|
||||
((looking-at "%[A-Z0-9_]+\\s-+\\(.*\\)\\s-*$")
|
||||
(match-string-no-properties 1))
|
||||
|
|
Loading…
Reference in a new issue