Message 1 of 7
How autoload subroutines code
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Goodnight. I would like to know how to load subroutines that I have in a directory, so that they only load when executing their command. The initial code is the following:
;loads all needed subroutines
(vl-load-com)
(if (findfile ".\\Subrutinas\\LeeMac")
(mapcar '(lambda (x)
(if (wcmatch (strcase x) "*.LSP")
(load
(strcat (findfile ".\\Subrutinas\\LeeMac") "\\" x)
) ;_load
) ;_ if
) ;_ lambda
(vl-directory-files
(findfile ".\\Subrutinas\\LeeMac")
) ;_ vl-directory-files
) ;_ mapcar
) ;_ if
I tried to change "load" for "autoload", but it does not work.