Use scalar instead of embedded_scm for context mod overrides.
[lilypond/mpolesky.git] / lily / file-name-map.cc
blob63ae7eced0e46bcb293c2c4ac07ead7a61b32a13
1 /*
2 file-name-map.cc -- implement map_file_name ()
4 source file of the GNU LilyPond music typesetter
6 (c) 2005--2009 Han-Wen Nienhuys <hanwen@xs4all.nl>
7 */
9 #include <map>
10 using namespace std;
12 #include "file-name-map.hh"
13 #include "lily-guile.hh"
15 map<string, string> file_name_map_global;
17 string
18 map_file_name (string s)
20 if (file_name_map_global.find (s) != file_name_map_global.end ())
21 s = file_name_map_global[s];
22 return s;
25 LY_DEFINE (ly_add_file_name_alist, "ly:add-file-name-alist",
26 1, 0, 0, (SCM alist),
27 "Add mappings for error messages from @var{alist}.")
29 for (SCM s = alist; scm_is_pair (s); s = scm_cdr (s))
31 SCM key = scm_caar (s);
32 SCM val = scm_cdar (s);
34 file_name_map_global[ly_scm2string (key)] = ly_scm2string (val);
36 return SCM_UNSPECIFIED;