Hello
I am not sure whether the problem I describe has to do with
the implementation of make-extent in xemacs or the problems
lies in a different part of the code.
Matlab.el (version 3.1.1) allows to debug matlab
code. During the debugging matlab.el, split the window, opens the file you
debug, the cursor jumps from line to line and show in the
other window via the matlab-shell the result of the executed
command.
However GNU emacs and Xemacs behave differently
In GNU emacs you see in the matlab-shell buffer
Someting like
1 tspan=[0 1]
Where 1 is underlined and clicking with the mouse on it is
jumps to the matlab file which is debugged.
In Xemacs however the matlab-buffer displays
<a href="matlab:
opentoline('/home/oub/ALLES/Matlab-init/testeuler.m',1,1)">1
</a>tspan=[0 1]
Which I find very annoying. I tried to debug it but can
localise the problem. It seems to me the issue is the code
(defun matlab-shell-render-errors-as-anchor (str)
"Detect non-url errors, and treat them as if they were url anchors.
Argument STR is the text that might have errors in it."
(when (string-match matlab-shell-error-stack-end str)
(save-excursion
(when (re-search-backward matlab-shell-error-stack-start nil t)
(let ((groupend nil)
(first nil))
(save-excursion
(setq groupend (re-search-forward matlab-shell-error-stack-end))
)
;; We have found an error stack to investigate.
(while (re-search-forward gud-matlab-error-regexp nil t)
(let* ((err-start (match-beginning 0))
(err-end (match-end 0))
(err-text (match-string 0))
(err-file (match-string 2))
(err-line (match-string 3))
(o (matlab-make-overlay err-start err-end))
(url (concat "opentoline('" err-file "'," err-line
",0)"))
)
(matlab-overlay-put o 'mouse-face 'highlight)
(matlab-overlay-put o 'face 'underline)
;; The url will recycle opentoline code.
(matlab-overlay-put o 'matlab-url url)
(matlab-overlay-put o 'keymap matlab-shell-html-map)
;; Keep track of the very first error in this error stack.
;; It will represent the "place to go" for "go-to-last-error".
(matlab-overlay-put o 'first-in-error-stack first)
(when (not first) (setq first url))
))
)))))
Where the various overlay functions are defaliases to
(defalias 'matlab-make-overlay 'make-extent)
(defalias 'matlab-overlay-put 'set-extent-property)
(defalias 'matlab-overlay-get 'extent-property)
(defalias 'matlab-delete-overlay 'delete-extent)
(defalias 'matlab-overlay-start 'extent-start-position)
(defalias 'matlab-overlay-end 'extent-end-position)
(defalias 'matlab-previous-overlay-change 'previous-extent-change)
(defalias 'matlab-next-overlay-change 'next-extent-change)
Etc.
So since GNU emacs and Xemacs behave so differently I
thought that maybe make-extent and friend a implemented in a
different way.
Anybody has an idea?
regards
Uwe Brauer
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://lists.xemacs.org/mailman/listinfo/xemacs-beta