diff options
| author | Glenn Morris | 2008-10-23 02:40:37 +0000 |
|---|---|---|
| committer | Glenn Morris | 2008-10-23 02:40:37 +0000 |
| commit | 0ee35e515b9a2002fe8a06c85925e023c2248979 (patch) | |
| tree | aaeb5bc159b75d5ddb1151e8386793aadef21173 | |
| parent | 91236f636eff8b9edcc73ef7e4798ad547eee9a8 (diff) | |
| download | emacs-0ee35e515b9a2002fe8a06c85925e023c2248979.tar.gz emacs-0ee35e515b9a2002fe8a06c85925e023c2248979.zip | |
(flet): Throw an error when trying to byte-compile a redefinition of a
function with special byte-compile handling. (Bug#411)
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-macs.el | 12 |
2 files changed, 14 insertions, 4 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a1cbe8d7914..390c816145a 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2008-10-23 Glenn Morris <rgm@gnu.org> | ||
| 2 | |||
| 3 | * emacs-lisp/cl-macs.el (flet): Throw an error when trying to | ||
| 4 | byte-compile a redefinition of a function with special byte-compile | ||
| 5 | handling. (Bug#411) | ||
| 6 | |||
| 1 | 2008-10-22 Vinicius Jose Latorre <viniciusjl@ig.com.br> | 7 | 2008-10-22 Vinicius Jose Latorre <viniciusjl@ig.com.br> |
| 2 | 8 | ||
| 3 | * ps-print.el: Deal with page sizes for label printes. Suggested by | 9 | * ps-print.el: Deal with page sizes for label printes. Suggested by |
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el index 9ca675f08c4..08864962f08 100644 --- a/lisp/emacs-lisp/cl-macs.el +++ b/lisp/emacs-lisp/cl-macs.el | |||
| @@ -1328,10 +1328,14 @@ go back to their previous definitions, or lack thereof). | |||
| 1328 | (let ((func (list 'function* | 1328 | (let ((func (list 'function* |
| 1329 | (list 'lambda (cadr x) | 1329 | (list 'lambda (cadr x) |
| 1330 | (list* 'block (car x) (cddr x)))))) | 1330 | (list* 'block (car x) (cddr x)))))) |
| 1331 | (if (and (cl-compiling-file) | 1331 | (when (cl-compiling-file) |
| 1332 | (boundp 'byte-compile-function-environment)) | 1332 | ;; Bug#411. It would be nice to fix this. |
| 1333 | (push (cons (car x) (eval func)) | 1333 | (and (get (car x) 'byte-compile) |
| 1334 | byte-compile-function-environment)) | 1334 | (error "Byte-compiling a redefinition of `%s' \ |
| 1335 | will not work - use `labels' instead" (symbol-name (car x)))) | ||
| 1336 | (and (boundp 'byte-compile-function-environment) | ||
| 1337 | (push (cons (car x) (eval func)) | ||
| 1338 | byte-compile-function-environment))) | ||
| 1335 | (list (list 'symbol-function (list 'quote (car x))) func)))) | 1339 | (list (list 'symbol-function (list 'quote (car x))) func)))) |
| 1336 | bindings) | 1340 | bindings) |
| 1337 | body)) | 1341 | body)) |