diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-08-22 18:52:47 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-08-22 18:52:47 +0000 |
commit | 2140206e1c9a6024cf8d45ae6d7b066202f7a7b1 (patch) | |
tree | 78aa8b4fff86e2d92cac54aec73165bdf0135e1f /lisp/emacs-lisp | |
parent | bd0c916883f8e26b9564253e5e072f803761154a (diff) | |
download | emacs-2140206e1c9a6024cf8d45ae6d7b066202f7a7b1.tar.gz |
(byte-compiler-base-file-name): New function.
(byte-compile-dest-file): Call byte-compiler-base-file-name.
Diffstat (limited to 'lisp/emacs-lisp')
-rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 2952badf81f..22592eb2e36 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -195,17 +195,28 @@ "*Regexp which matches Emacs Lisp source files. You may want to redefine `byte-compile-dest-file' if you change this.") +;; This enables file name handlers such as jka-compr +;; to remove parts of the file name that should not be copied +;; through to the output file name. +(defun byte-compiler-base-file-name (filename) + (let ((handler (find-file-name-handler filename + 'byte-compiler-base-file-name))) + (if handler + (funcall handler 'byte-compiler-base-file-name filename) + filename))) + (or (fboundp 'byte-compile-dest-file) ;; The user may want to redefine this along with emacs-lisp-file-regexp, ;; so only define it if it is undefined. (defun byte-compile-dest-file (filename) "Convert an Emacs Lisp source file name to a compiled file name." + (setq filename (byte-compiler-base-file-name filename)) (setq filename (file-name-sans-versions filename)) (cond ((eq system-type 'vax-vms) - (concat (substring filename 0 (string-match ";" filename)) "c")) - ((string-match emacs-lisp-file-regexp filename) - (concat (substring filename 0 (match-beginning 0)) ".elc")) - (t (concat filename ".elc"))))) + (concat (substring filename 0 (string-match ";" filename)) "c")) + ((string-match emacs-lisp-file-regexp filename) + (concat (substring filename 0 (match-beginning 0)) ".elc")) + (t (concat filename ".elc"))))) ;; This can be the 'byte-compile property of any symbol. (autoload 'byte-compile-inline-expand "byte-opt") |