From 6b5bbb986bb93e37356ddd408dd80593246e6c47 Mon Sep 17 00:00:00 2001 From: Martin Stjernholm Date: Sat, 16 Nov 2002 01:37:44 +0000 Subject: [PATCH] (cc-bytecomp-defun): Fixed bug that caused existing function definitions to be overridden by phonies when the bytecomp environment is restored. --- lisp/ChangeLog | 6 ++++++ lisp/progmodes/cc-bytecomp.el | 21 +++++++++------------ 2 files changed, 15 insertions(+), 12 deletions(-) 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) -- 2.39.2