]> code.delx.au - gnu-emacs/commitdiff
(cc-bytecomp-defun): Fixed bug that caused existing function
authorMartin Stjernholm <mast@lysator.liu.se>
Sat, 16 Nov 2002 01:37:44 +0000 (01:37 +0000)
committerMartin Stjernholm <mast@lysator.liu.se>
Sat, 16 Nov 2002 01:37:44 +0000 (01:37 +0000)
definitions to be overridden by phonies when the bytecomp environment
is restored.

lisp/ChangeLog
lisp/progmodes/cc-bytecomp.el

index 324f92526f160289b0eda4d4868259fd9b3ea3e2..5e37056b161ca414884aeb2aa229d7b3a8fc8dcd 100644 (file)
@@ -1,3 +1,9 @@
+2002-11-16  Martin Stjernholm  <bug-cc-mode@gnu.org>
+
+       * 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  <nick@nick.uklinux.net>
 
        * toolbar/gud-break.pbm, toolbar/gud-cont.pbm, toolbar/gud-display.pbm,
index 6df60efef70c1e714f971d227d2b7eb88302dfeb..b0e33a97491a1c5ace3f74db856d02d3b36c9fb9 100644 (file)
@@ -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)