Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
2140206e
Commit
2140206e
authored
Aug 22, 1995
by
Richard M. Stallman
Browse files
(byte-compiler-base-file-name): New function.
(byte-compile-dest-file): Call byte-compiler-base-file-name.
parent
bd0c9168
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
4 deletions
+15
-4
lisp/emacs-lisp/bytecomp.el
lisp/emacs-lisp/bytecomp.el
+15
-4
No files found.
lisp/emacs-lisp/bytecomp.el
View file @
2140206e
...
...
@@ -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")
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment