diff options
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 23 |
1 files changed, 9 insertions, 14 deletions
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 25102548a9d..201733ff033 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -166,24 +166,19 @@ file name, and return the name of the compiled file." | |||
| 166 | (funcall handler 'byte-compiler-base-file-name filename) | 166 | (funcall handler 'byte-compiler-base-file-name filename) |
| 167 | filename))) | 167 | filename))) |
| 168 | 168 | ||
| 169 | (or (fboundp 'byte-compile-dest-file) | 169 | (defun byte-compile-dest-file (filename) |
| 170 | ;; The user may want to redefine this along with emacs-lisp-file-regexp, | 170 | "Convert an Emacs Lisp source file name to a compiled file name. |
| 171 | ;; so only define it if it is undefined. | ||
| 172 | ;; Note - redefining this function is obsolete as of 23.2. | ||
| 173 | ;; Customize byte-compile-dest-file-function instead. | ||
| 174 | (defun byte-compile-dest-file (filename) | ||
| 175 | "Convert an Emacs Lisp source file name to a compiled file name. | ||
| 176 | If `byte-compile-dest-file-function' is non-nil, uses that | 171 | If `byte-compile-dest-file-function' is non-nil, uses that |
| 177 | function to do the work. Otherwise, if FILENAME matches | 172 | function to do the work. Otherwise, if FILENAME matches |
| 178 | `emacs-lisp-file-regexp' (by default, files with the extension `.el'), | 173 | `emacs-lisp-file-regexp' (by default, files with the extension `.el'), |
| 179 | adds `c' to it; otherwise adds `.elc'." | 174 | adds `c' to it; otherwise adds `.elc'." |
| 180 | (if byte-compile-dest-file-function | 175 | (if byte-compile-dest-file-function |
| 181 | (funcall byte-compile-dest-file-function filename) | 176 | (funcall byte-compile-dest-file-function filename) |
| 182 | (setq filename (file-name-sans-versions | 177 | (setq filename (file-name-sans-versions |
| 183 | (byte-compiler-base-file-name filename))) | 178 | (byte-compiler-base-file-name filename))) |
| 184 | (cond ((string-match emacs-lisp-file-regexp filename) | 179 | (cond ((string-match emacs-lisp-file-regexp filename) |
| 185 | (concat (substring filename 0 (match-beginning 0)) ".elc")) | 180 | (concat (substring filename 0 (match-beginning 0)) ".elc")) |
| 186 | (t (concat filename ".elc")))))) | 181 | (t (concat filename ".elc"))))) |
| 187 | 182 | ||
| 188 | ;; This can be the 'byte-compile property of any symbol. | 183 | ;; This can be the 'byte-compile property of any symbol. |
| 189 | (autoload 'byte-compile-inline-expand "byte-opt") | 184 | (autoload 'byte-compile-inline-expand "byte-opt") |