CMUCL commit: src/code (macros.lisp)

Raymond Toy rtoy at common-lisp.net
Wed Apr 28 01:29:30 CEST 2010


    Date: Tuesday, April 27, 2010 @ 19:29:30
  Author: rtoy
    Path: /project/cmucl/cvsroot/src/code

Modified: macros.lisp

o Work around issue pointed out by Madhu on cmucl-imp, 2010-04-24.
  Replace the call to (setf info) with a (new) function,
  set-defvar-textdomain, that calls (setf info).  The (setf info) was
  causing the compiler to run and producing an unexpected message.
  The compiler doesn't need to handle the new function specially.

o DEFCONSTANT was not recording the text domain for the new constant.
  Call set-defvar-textdomain to record the text domain.


-------------+
 macros.lisp |   11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)


Index: src/code/macros.lisp
diff -u src/code/macros.lisp:1.118 src/code/macros.lisp:1.119
--- src/code/macros.lisp:1.118	Fri Apr 23 09:23:29 2010
+++ src/code/macros.lisp	Tue Apr 27 19:29:30 2010
@@ -5,7 +5,7 @@
 ;;; Carnegie Mellon University, and has been placed in the public domain.
 ;;;
 (ext:file-comment
-  "$Header: /project/cmucl/cvsroot/src/code/macros.lisp,v 1.118 2010-04-23 13:23:29 rtoy Exp $")
+  "$Header: /project/cmucl/cvsroot/src/code/macros.lisp,v 1.119 2010-04-27 23:29:30 rtoy Exp $")
 ;;;
 ;;; **********************************************************************
 ;;;
@@ -397,6 +397,9 @@
 	  (setq inline-expansion lambda-expression))))
     (c::%%defun name def doc inline-expansion)))
 
+(defun set-defvar-textdomain (name domain)
+  (setf (c::info variable textdomain name) domain))
+
 ;;; DEFCONSTANT  --  Public
 ;;;
 (defmacro defconstant (var val &optional doc)
@@ -410,6 +413,7 @@
      (eval-when (:compile-toplevel)
        (c::do-defconstant-compile-time ',var ,val ',doc))
      (eval-when (:load-toplevel :execute)
+       (set-defvar-textdomain ',var ,intl::*default-domain*)
        (c::%%defconstant ',var ,val ',doc (c::source-location)))))
 
 (defun set-defvar-source-location (name source-location)
@@ -437,7 +441,6 @@
   (set-defvar-source-location name source-location)
   name)
 
-
 (defmacro defvar (var &optional (val nil valp) (doc nil docp))
   "For defining global variables at top level.  Declares the variable
   SPECIAL and, optionally, initializes it.  If the variable already has a
@@ -453,7 +456,7 @@
     ,@(when docp
 	`((setf (documentation ',var 'variable) ',doc)
 	  (eval-when (:load-toplevel :execute)
-	   (setf (c::info variable textdomain ',var) ,intl::*default-domain*))))
+	    (set-defvar-textdomain ',var ,intl::*default-domain*))))
     (set-defvar-source-location ',var (c::source-location))
     ',var))
 
@@ -470,7 +473,7 @@
     ,@(when docp
 	`((setf (documentation ',var 'variable) ',doc)
 	  (eval-when (:load-toplevel :execute)
-	   (setf (c::info variable textdomain ',var) ,intl::*default-domain*))))
+	    (set-defvar-textdomain ',var ,intl::*default-domain*))))
     (set-defvar-source-location ',var (c::source-location))
     ',var))
 



More information about the cmucl-commit mailing list