From: David C. <dav...@fr...> - 2010-05-24 09:54:55
|
Hi Assaf, I'm not a matlab-emacs expert, so there might be a way to just do that with matlab-emacs. However, the way I do it relies on emacs tags, which brings other advantages (and surely drawbacks). Download and install the latest version of exhuberant ctags (http://ctags.sourceforge.net) as it natively supports matlab now (with older versions I had to use complex regexps to parse matlab source files) Then you can generate a tags table in the current directory with the following shell command (do not remove the final "-") In Windows: dir /b/s *.m | ctags -e -o TAGS -L - Or in Linux/Unix: find . -follow -type f -name "*.m" | ctags -e -o TAGS -L - Then instruct emacs to use this file, with M-x visit-tags-table. Now you can jump to a function definition with M-x find-tag If you want to just point to a function and open the source code for it, you can just add to your .emacs something like: (define-key matlab-mode-map [(C-return)] (lambda () (interactive) (find-tag(find-tag-default)))) What I find very convenient is that you can come back to the point where you invoked the find-tag command with something like (define-key matlab-mode-map [(C-backspace)] 'pop-tag-mark) Now (C-return) and (C-backspace) respectively allow you to go lower and higher in the functions call tree ! Hope that helps, David. -----Original Message----- From: Assaf B. Shpanier [mailto:shp...@gm...] Sent: 23 May 2010 11:37 To: mat...@li... Subject: [Matlab-emacs-discuss] open selection. Hi, Is there a way to point on a function-name in the source-code and open it -- like the open-selection (F4) option in matlab ? A-ssaf p.s: matlab-emacs is great! ---------------------------------------------------------------------------- -- _______________________________________________ Matlab-emacs-discuss mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matlab-emacs-discuss |