From: Martin Stjernholm Date: Sat, 16 Nov 2002 01:37:44 +0000 (+0000) Subject: (cc-bytecomp-defun): Fixed bug that caused existing function X-Git-Tag: ttn-vms-21-2-B4~12420 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=6b5bbb986bb93e37356ddd408dd80593246e6c47;p=emacs.git (cc-bytecomp-defun): Fixed bug that caused existing function definitions to be overridden by phonies when the bytecomp environment is restored. --- diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 324f92526f1..5e37056b161 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,9 @@ +2002-11-16 Martin Stjernholm + + * progmodes/cc-bytecomp.el (cc-bytecomp-defun): Fixed bug that + caused existing function definitions to be overridden by + phonies when the bytecomp environment is restored. + 2002-11-15 Nick Roberts * toolbar/gud-break.pbm, toolbar/gud-cont.pbm, toolbar/gud-display.pbm, diff --git a/lisp/progmodes/cc-bytecomp.el b/lisp/progmodes/cc-bytecomp.el index 6df60efef70..b0e33a97491 100644 --- a/lisp/progmodes/cc-bytecomp.el +++ b/lisp/progmodes/cc-bytecomp.el @@ -225,18 +225,15 @@ to silence the byte compiler. Don't use within `eval-when-compile'." "Bind the symbol as a function during compilation of the file, to silence the byte compiler. Don't use within `eval-when-compile'." `(eval-when-compile - (if (not (assq ',fun cc-bytecomp-original-functions)) - (setq cc-bytecomp-original-functions - (cons (list ',fun - nil - (if (fboundp ',fun) - (symbol-function ',fun) - 'unbound)) - cc-bytecomp-original-functions))) - (if (and (cc-bytecomp-is-compiling) - (= cc-bytecomp-load-depth 0) - (not (fboundp ',fun))) - (fset ',fun 'cc-bytecomp-ignore)))) + (if (fboundp ',fun) + nil + (if (not (assq ',fun cc-bytecomp-original-functions)) + (setq cc-bytecomp-original-functions + (cons (list ',fun nil 'unbound) + cc-bytecomp-original-functions))) + (if (and (cc-bytecomp-is-compiling) + (= cc-bytecomp-load-depth 0)) + (fset ',fun 'cc-bytecomp-ignore))))) (put 'cc-bytecomp-defmacro 'lisp-indent-function 'defun) (defmacro cc-bytecomp-defmacro (fun &rest temp-macro)