changeset 48361:2ac046f0f384

(cc-bytecomp-defun): Fixed bug that caused existing function definitions to be overridden by phonies when the bytecomp environment is restored.
author Martin Stjernholm <mast@lysator.liu.se>
date Sat, 16 Nov 2002 01:35:54 +0000
parents 033719ff91f1
children 90efc09141e5
files lisp/progmodes/cc-bytecomp.el
diffstat 1 files changed, 9 insertions(+), 12 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/progmodes/cc-bytecomp.el	Sat Nov 16 01:21:22 2002 +0000
+++ b/lisp/progmodes/cc-bytecomp.el	Sat Nov 16 01:35:54 2002 +0000
@@ -225,18 +225,15 @@
   "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)