mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-28 00:01:33 -08:00
(flet): Throw an error when trying to byte-compile a redefinition of a
function with special byte-compile handling. (Bug#411)
This commit is contained in:
parent
91236f636e
commit
0ee35e515b
2 changed files with 14 additions and 4 deletions
|
|
@ -1,3 +1,9 @@
|
|||
2008-10-23 Glenn Morris <rgm@gnu.org>
|
||||
|
||||
* emacs-lisp/cl-macs.el (flet): Throw an error when trying to
|
||||
byte-compile a redefinition of a function with special byte-compile
|
||||
handling. (Bug#411)
|
||||
|
||||
2008-10-22 Vinicius Jose Latorre <viniciusjl@ig.com.br>
|
||||
|
||||
* ps-print.el: Deal with page sizes for label printes. Suggested by
|
||||
|
|
|
|||
|
|
@ -1328,10 +1328,14 @@ go back to their previous definitions, or lack thereof).
|
|||
(let ((func (list 'function*
|
||||
(list 'lambda (cadr x)
|
||||
(list* 'block (car x) (cddr x))))))
|
||||
(if (and (cl-compiling-file)
|
||||
(boundp 'byte-compile-function-environment))
|
||||
(when (cl-compiling-file)
|
||||
;; Bug#411. It would be nice to fix this.
|
||||
(and (get (car x) 'byte-compile)
|
||||
(error "Byte-compiling a redefinition of `%s' \
|
||||
will not work - use `labels' instead" (symbol-name (car x))))
|
||||
(and (boundp 'byte-compile-function-environment)
|
||||
(push (cons (car x) (eval func))
|
||||
byte-compile-function-environment))
|
||||
byte-compile-function-environment)))
|
||||
(list (list 'symbol-function (list 'quote (car x))) func))))
|
||||
bindings)
|
||||
body))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue