2009-07-06 21:48:15 +02:00
|
|
|
;;; cedet-matlab.el --- CEDET Setup support
|
|
|
|
;;
|
2019-11-09 02:49:50 +01:00
|
|
|
;; Copyright (C) 2009, 2012, 2019 Eric Ludlam
|
2009-07-06 21:48:15 +02:00
|
|
|
;;
|
|
|
|
;; Author: Eric Ludlam <eludlam@mathworks.com>
|
|
|
|
;; X-RCS: $Id$
|
|
|
|
;;
|
|
|
|
;; This program is free software; you can redistribute it and/or
|
|
|
|
;; modify it under the terms of the GNU General Public License as
|
2023-07-12 18:55:41 +02:00
|
|
|
;; published by the Free Software Foundation; either version 3, or (at
|
2009-07-06 21:48:15 +02:00
|
|
|
;; your option) any later version.
|
|
|
|
|
|
|
|
;; This program is distributed in the hope that it will be useful, but
|
|
|
|
;; WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
;; General Public License for more details.
|
|
|
|
|
|
|
|
;; You should have received a copy of the GNU General Public License
|
|
|
|
;; along with this program; see the file COPYING. If not, write to
|
|
|
|
;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
|
|
|
;; Boston, MA 02110-1301, USA.
|
|
|
|
|
|
|
|
;;; Commentary:
|
|
|
|
;;
|
|
|
|
;; Setup miscelaneous CEDET tools to work with MATLAB.
|
|
|
|
|
2019-11-09 02:49:50 +01:00
|
|
|
(eval-when-compile
|
|
|
|
(require 'semantic)
|
|
|
|
(require 'srecode/map))
|
2017-12-05 20:08:53 +01:00
|
|
|
|
2009-07-06 21:48:15 +02:00
|
|
|
;;; Code:
|
|
|
|
;;;###autoload
|
|
|
|
(defun matlab-cedet-setup ()
|
2019-11-09 02:49:50 +01:00
|
|
|
"Setup support for CEDET tools for use with MATLAB."
|
2009-07-06 21:48:15 +02:00
|
|
|
(interactive)
|
|
|
|
|
|
|
|
;; Setup Semantic parser:
|
|
|
|
(add-hook 'matlab-mode-hook 'semantic-default-matlab-setup)
|
|
|
|
|
|
|
|
;; Setup semanticdb for MATLAB support:
|
|
|
|
(require 'semanticdb-matlab)
|
|
|
|
|
|
|
|
;; Setup Semantic Recoder (Template support for MATLAB and TLC.):
|
|
|
|
(let* ((lib (locate-library "matlab.el" t))
|
|
|
|
(ededir (file-name-directory lib))
|
|
|
|
(tmpdir (file-name-as-directory
|
|
|
|
(expand-file-name "templates" ededir))))
|
|
|
|
(when (not tmpdir)
|
|
|
|
(error "Unable to locate MATLAB Templates directory"))
|
|
|
|
|
2019-11-09 02:49:50 +01:00
|
|
|
;; Rig up the srecode map.
|
|
|
|
(require 'srecode/map)
|
2013-04-02 02:47:42 +02:00
|
|
|
|
2009-07-06 21:48:15 +02:00
|
|
|
(add-to-list 'srecode-map-load-path tmpdir)
|
2017-12-05 20:08:53 +01:00
|
|
|
(if (fboundp 'srecode-map-update-map)
|
|
|
|
(srecode-map-update-map t)
|
cedet-matlab.el, matlab-cgen.el, matlab-compat.el,
matlab-complete.el, matlab-maint.el, matlab-netshell.el,
matlab-publish.el, matlab-topic.el, semantic-matlab.el,
semanticdb-matlab.el, srecode-matlab.el:
Fix varous issues in doc strings and messages identified by `checkdoc'
command.
2019-12-13 04:36:55 +01:00
|
|
|
(error "Function srecode-map-update-map not found"))
|
2017-12-05 20:08:53 +01:00
|
|
|
))
|
2009-07-06 21:48:15 +02:00
|
|
|
|
|
|
|
|
|
|
|
(provide 'cedet-matlab)
|
|
|
|
;;; cedet-matlab.el ends here
|