diff options
| author | Eli Zaretskii | 2015-11-22 20:38:51 +0200 |
|---|---|---|
| committer | Eli Zaretskii | 2015-11-22 20:38:51 +0200 |
| commit | 40ed767ba0a35dbaeee6bdbd85a108d88a982b1a (patch) | |
| tree | b726762b86a3a5b3fdfaf7216e995a21cb2e1e62 /lisp | |
| parent | 9f0d19f24cd455765123a378a5e2f3e505cbb5ac (diff) | |
| download | emacs-40ed767ba0a35dbaeee6bdbd85a108d88a982b1a.tar.gz emacs-40ed767ba0a35dbaeee6bdbd85a108d88a982b1a.zip | |
Allow loading modules by 'load-file'
* src/lread.c (Fload): Call 'unbind_to' with 'Fmodule_load' as the
2nd arg, to avoid the "binding stack not balanced" error.
(syms_of_lread) <module-file-suffix>: New Lisp variable.
* lisp/files.el (module-file-suffix): Declare.
(load-file): Remove 'module-file-suffix' from
'completion-ignored-extensions', to allow completion on modules.
* etc/NEWS: Mention 'module-file-suffix'.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/files.el | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lisp/files.el b/lisp/files.el index fdc27ead450..ac44e0f0fc7 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -772,11 +772,15 @@ If INCLUDE-DIRECTORIES, also include directories that have matching names." | |||
| 772 | (push (expand-file-name file dir) files))))) | 772 | (push (expand-file-name file dir) files))))) |
| 773 | (nconc result (nreverse files)))) | 773 | (nconc result (nreverse files)))) |
| 774 | 774 | ||
| 775 | (defvar module-file-suffix) | ||
| 776 | |||
| 775 | (defun load-file (file) | 777 | (defun load-file (file) |
| 776 | "Load the Lisp file named FILE." | 778 | "Load the Lisp file named FILE." |
| 777 | ;; This is a case where .elc makes a lot of sense. | 779 | ;; This is a case where .elc and .so/.dll make a lot of sense. |
| 778 | (interactive (list (let ((completion-ignored-extensions | 780 | (interactive (list (let ((completion-ignored-extensions |
| 779 | (remove ".elc" completion-ignored-extensions))) | 781 | (remove module-file-suffix |
| 782 | (remove ".elc" | ||
| 783 | completion-ignored-extensions)))) | ||
| 780 | (read-file-name "Load file: " nil nil 'lambda)))) | 784 | (read-file-name "Load file: " nil nil 'lambda)))) |
| 781 | (load (expand-file-name file) nil nil t)) | 785 | (load (expand-file-name file) nil nil t)) |
| 782 | 786 | ||