Join/Login

Business Software

Open Source Software

For Vendors

Blog

About

More

Articles

Create

SourceForge Podcast

Site Documentation

Subscribe to our Newsletter

Support Request

For Vendors Help Create Join Login

Business Software

Open Source Software

SourceForge Podcast

Resources

Articles

Case Studies

Blog

Menu

Help

Create

Join

Login

Nidsh Narayanaa Balaji MATLAB in Emacs - matlab-emacs git

Profile

Activity

MATLAB in Emacs - matlab-emacs git

Menu ▾ ▴

Browse Commits

Fork

Merge Requests 0

Clone of

matlab-emacs / src

Branches

master

copyright

documentation

fill-fix

fontlockhang

hairyblocks

mac_init

modernize

org-mode

shellcomplete

More Branches

[9c03eb]: / dl_emacs_support.m  Maximize  Restore  History

Download this file

137 lines (121 with data), 4.5 kB

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135

% Copyright (C) 1992-2023 Eric Ludlam (and others)

% This program is free software: you can redistribute it and/or modify

% it under the terms of the GNU General Public License as published by

% the Free Software Foundation, either version 3 of the License, or

% (at 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. If not, see <http://www.gnu.org/licenses/>.

function dl_emacs_support(varargin)

% Download MATLAB support files for Emacs

%

% DL_EMACS_SUPPRT - download all Emacs support files into the

% current directory.

%

% DL_EMACS_SUPPORT(FILESET) - download a FILESET of Emacs support.

% Sets are:

% dl - Download a new version of this download script.

% core - Just the core MATLAB support files.

% tlc - Just the core MATLAB/TLC support files.

% cedet - Core, plus additional support for MATLAB using CEDET support.

% Learn more about CEDET at: http://cedet.sf.net

% support - Just the build files and READMEs for compiling.

% all - All files

%

% DL_EMACS_SUPPORT(FILESET,DEST) - download FILESET and save in

% destination directory DEST

%

% For the most reliable refresh of the repository, run these two

% commands, the frist will make sure the downloader is current.

%

% dl_emacs_support dl

% dl_emacs_support

%

% On unix, you can then execute:

%

% !make

%

% to compile.

po = inputParser;

addOptional(po, 'fileset', 'all', @ischar)

addOptional(po, 'destination', pwd, @ischar)

po.parse(varargin{:});

stuff = po.Results;

if exist(stuff.destination,'dir') ~= 7

error(['The folder: ''',stuff.destination, ''', does not exist.']);

end

downloader = { 'dl_emacs_support.m' };

coreFiles = { 'matlab-load.el' 'matlab.el' 'mlint.el' ...

'matlab-publish.el' 'company-matlab-shell.el' ...

'linemark.el' ...

'toolbox/emacsinit.m' 'toolbox/opentoline.m' 'toolbox/emacsdocomplete.m' };

tlcFiles = { 'tlc.el' };

cedetFiles = { 'cedet-matlab.el' 'semantic-matlab.el' ...

'semanticdb-matlab.el' 'srecode-matlab.el' ...

'templates/srecode-matlab.srt' };

supportFiles = { 'README.org' 'INSTALL' 'ChangeLog' ...

'Project.ede' 'Makefile' ...

'toolbox/Project.ede' 'toolbox/Makefile' ...

'templates/Project.ede' 'templates/Makefile'};

switch stuff.fileset

case 'dl'

getfiles(downloader);

case 'core'

mktoolboxdir

getfiles(coreFiles);

case 'tlc'

mktoolboxdir

getfiles(coreFiles);

getfiles(tlcFiles);

case 'cedet'

mktoolboxdir

getfiles(coreFiles);

mktemplatedir;

getfiles(cedetFiles);

case 'support'

mktemplatedir;

getfiles(supportFiles);

case 'all'

mktoolboxdir

getfiles(coreFiles);

getfiles(tlcFiles);

mktemplatedir;

getfiles(cedetFiles);

getfiles(supportFiles);

otherwise

error('Unknown fileset %s.', stuff.fileset);

end

function mktemplatedir

templateDir = fullfile(stuff.destination,'templates');

if ~exist(templateDir,'dir')

mkdir(templateDir);

end

end

function mktoolboxdir

toolboxDir = fullfile(stuff.destination,'toolbox');

if ~exist(toolboxDir,'dir')

mkdir(toolboxDir);

end

end

function getfiles(fList)

for i = 1:length(fList)

file = fList{i};

destFullFile = fullfile(stuff.destination,file);

[ contents status ] = ...

urlread(['https://sourceforge.net/p/matlab-emacs/src/ci/master/tree/cedet-matlab.el?format=raw',...

file,'?revision=HEAD']);

if ~status

fprintf('Unable to download %s.\n', file);

else

fid = fopen(destFullFile,'w');

fwrite(fid,contents);

fclose(fid);

fprintf('Successfully downloaded and created: ''%s''.\n',...

destFullFile);

end

end

end

end

SourceForge

Create a Project

Open Source Software

Business Software

Top Downloaded Projects

Company

About

Team

SourceForge Headquarters
225 Broadway Suite 1600
San Diego, CA 92101
+1 (858) 422-6466

Resources

Support

Site Documentation

Site Status

SourceForge Reviews

© 2025 Slashdot Media. All Rights Reserved.

Terms Privacy Opt Out Advertise

×
Want the latest updates on software, tech news, and AI?

Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.

Submit