diff options
| author | Glenn Morris | 2017-05-06 18:01:34 -0700 |
|---|---|---|
| committer | Glenn Morris | 2017-05-06 18:06:17 -0700 |
| commit | 233cfb0ea93ecdd2b63298be4243059e2e7a91fd (patch) | |
| tree | 37ec219307d2b67ed9764d001efff75fe613c433 | |
| parent | c311b8b15e91dd07e2d23d8d21ebb53d0b5f2204 (diff) | |
| download | emacs-233cfb0ea93ecdd2b63298be4243059e2e7a91fd.tar.gz emacs-233cfb0ea93ecdd2b63298be4243059e2e7a91fd.zip | |
Remove obsolete method of changing byte-compile-dest-file
* lisp/emacs-lisp/bytecomp.el (byte-compile-dest-file):
Define unconditionally.
| -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") |