Skip to content
Snippets Groups Projects
Commit cdbc0399 authored by rtoy's avatar rtoy
Browse files

Oops. Previous implementation of with-textdomain didn't actually

work.  Use this new one.

code/intl.lisp:
o New WITH-TEXTDOMAIN.

code/signal.lisp:
o Update uses of WITH-TEXTDOMAIN.

bootfiles/20a/boot-2010-07-1.lisp:
o Update with new WITH-TEXTDOMAIN.
parent e7572f0f
No related branches found
No related tags found
No related merge requests found
...@@ -26,13 +26,9 @@ ...@@ -26,13 +26,9 @@
(ext:without-package-locks (ext:without-package-locks
;; Not the same as the definition in intl.lisp, but this works (defmacro with-textdomain ((old-domain new-domain) &body body)
;; around a bootstrap issue. It's good enough until the real `(progn
;; definition is in place. (intl:textdomain ,new-domain)
(defmacro with-textdomain ((new-domain) &body body)
`(eval-when (:compile-toplevel :load-toplevel :execute)
(setf intl::*default-domain* ,new-domain)
,@body ,@body
(setf intl::*default-domain* "cmucl"))) (intl:textdomain ,old-domain)))
) )
;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: INTL -*- ;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Package: INTL -*-
;;; $Revision: 1.7 $ ;;; $Revision: 1.8 $
;;; Copyright 1999-2010 Paul Foley (mycroft@actrix.gen.nz) ;;; Copyright 1999-2010 Paul Foley (mycroft@actrix.gen.nz)
;;; ;;;
;;; Permission is hereby granted, free of charge, to any person obtaining ;;; Permission is hereby granted, free of charge, to any person obtaining
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
;;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE ;;; (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
;;; USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH ;;; USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
;;; DAMAGE. ;;; DAMAGE.
(ext:file-comment "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/intl.lisp,v 1.7 2010/07/13 23:43:39 rtoy Exp $") (ext:file-comment "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/intl.lisp,v 1.8 2010/07/14 03:13:20 rtoy Rel $")
(in-package "INTL") (in-package "INTL")
...@@ -527,10 +527,11 @@ ...@@ -527,10 +527,11 @@
;; Set the textdomain to New-Domain for the body and then restore the ;; Set the textdomain to New-Domain for the body and then restore the
;; domain to the original. ;; domain to the original.
(defmacro with-textdomain ((new-domain) &body body) (defmacro with-textdomain ((old-domain new-domain) &body body)
`(eval-when (:compile-toplevel :load-toplevel :execute) `(progn
(let ((intl::*default-domain* ,new-domain)) (intl:textdomain ,new-domain)
,@body))) ,@body
(intl:textdomain ,old-domain)))
(defmacro gettext (string) (defmacro gettext (string)
"Look up STRING in the current message domain and return its translation." "Look up STRING in the current message domain and return its translation."
......
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
;;; Carnegie Mellon University, and has been placed in the public domain. ;;; Carnegie Mellon University, and has been placed in the public domain.
;;; ;;;
(ext:file-comment (ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/signal.lisp,v 1.40 2010/07/13 23:43:39 rtoy Exp $") "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/code/signal.lisp,v 1.41 2010/07/14 03:13:20 rtoy Rel $")
;;; ;;;
;;; ********************************************************************** ;;; **********************************************************************
;;; ;;;
...@@ -103,9 +103,9 @@ ...@@ -103,9 +103,9 @@
(def-unix-signal :SIGTRAP 5 "Trace trap") (def-unix-signal :SIGTRAP 5 "Trace trap")
(def-unix-signal :SIGIOT 6 "Iot instruction") ; Compatibility (def-unix-signal :SIGIOT 6 "Iot instruction") ; Compatibility
(def-unix-signal :SIGABRT 6 "C abort()") (def-unix-signal :SIGABRT 6 "C abort()")
(intl::with-textdomain (#+linux "cmucl-linux-os" (intl::with-textdomain ("cmucl" #+linux "cmucl-linux-os"
#+sparc "cmucl-sparc-svr4" #+sparc "cmucl-sparc-svr4"
#+bsd "cmucl-bsd-os") #+bsd "cmucl-bsd-os")
#-linux #-linux
(def-unix-signal :SIGEMT 7 "Emt instruction")) (def-unix-signal :SIGEMT 7 "Emt instruction"))
...@@ -114,18 +114,18 @@ ...@@ -114,18 +114,18 @@
(def-unix-signal :SIGKILL 9 "Kill") (def-unix-signal :SIGKILL 9 "Kill")
(def-unix-signal :SIGBUS #-linux 10 #+linux 7 "Bus error") (def-unix-signal :SIGBUS #-linux 10 #+linux 7 "Bus error")
(def-unix-signal :SIGSEGV 11 "Segmentation violation") (def-unix-signal :SIGSEGV 11 "Segmentation violation")
(intl::with-textdomain (#+linux "cmucl-linux-os" (intl::with-textdomain ("cmucl" #+linux "cmucl-linux-os"
#+sparc "cmucl-sparc-svr4" #+sparc "cmucl-sparc-svr4"
#+bsd "cmucl-bsd-os") #+bsd "cmucl-bsd-os")
#-linux #-linux
(def-unix-signal :SIGSYS 12 "Bad argument to system call")) (def-unix-signal :SIGSYS 12 "Bad argument to system call"))
(def-unix-signal :SIGPIPE 13 "Write on a pipe with no one to read it") (def-unix-signal :SIGPIPE 13 "Write on a pipe with no one to read it")
(def-unix-signal :SIGALRM 14 "Alarm clock") (def-unix-signal :SIGALRM 14 "Alarm clock")
(def-unix-signal :SIGTERM 15 "Software termination signal") (def-unix-signal :SIGTERM 15 "Software termination signal")
(intl::with-textdomain (#+linux "cmucl-linux-os" (intl::with-textdomain ("cmucl" #+linux "cmucl-linux-os"
#+sparc "cmucl-sparc-svr4" #+sparc "cmucl-sparc-svr4"
#+bsd "cmucl-bsd-os") #+bsd "cmucl-bsd-os")
#+linux #+linux
(def-unix-signal :SIGSTKFLT 16 "Stack fault on coprocessor")) (def-unix-signal :SIGSTKFLT 16 "Stack fault on coprocessor"))
...@@ -162,9 +162,9 @@ ...@@ -162,9 +162,9 @@
#+linux 12 "User defined signal 2") #+linux 12 "User defined signal 2")
;;; SVR4 (or Solaris?) specific signals ;;; SVR4 (or Solaris?) specific signals
(intl::with-textdomain (#+linux "cmucl-linux-os" (intl::with-textdomain ("cmucl" #+linux "cmucl-linux-os"
#+sparc "cmucl-sparc-svr4" #+sparc "cmucl-sparc-svr4"
#+bsd "cmucl-bsd-os") #+bsd "cmucl-bsd-os")
#+svr4 #+svr4
(def-unix-signal :SIGWAITING 32 "Process's lwps are blocked")) (def-unix-signal :SIGWAITING 32 "Process's lwps are blocked"))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment