From 04c39c65633502f61ec4c44c0d641c1486ec4e3b Mon Sep 17 00:00:00 2001 From: Didier Verna Date: Fri, 11 May 2012 20:18:12 +0200 Subject: [PATCH] *default-synopsis* -> *synopsis*. ChangeLog entries: 2012-05-11 Didier Verna * src/synopsis.lisp (*synopsis*): Rename from *DEFAULT-SYNOPSIS*. * src/synopsis.lisp (make-synopsis): * src/context.lisp (context): * src/context.lisp (make-context): * package.lisp (:com.dvlsoft.clon): * doc/user.texi (Using Different Synopsis): * doc/user.texi (Initialization Phase API): Update accordingly. --- doc/user.texi | 23 +++++++++++------------ package.lisp | 2 +- src/context.lisp | 4 ++-- src/synopsis.lisp | 4 ++-- 4 files changed, 16 insertions(+), 17 deletions(-) diff --git a/doc/user.texi b/doc/user.texi index dd7844d..4001a89 100644 --- a/doc/user.texi +++ b/doc/user.texi @@ -2232,15 +2232,14 @@ Did you notice that after defining a synopsis, there is actually never any explicit reference to it anymore? So where is the magick? In fact, there's no magick at all involved here. -@vindex *default-synopsis* +@vindex *synopsis* @foindex{defsynopsis,:make-default} @cfiaindex{make-synopsis,:make-default} -@clon{} has a global variable named @code{*default-synopsis*} which -holds the@dots{} default synopsis, yeah. When you define/create a -synopsis with either @code{defsynopsis} or @code{make-synopsis}, it is -automatically made the default one, unless you use the -@code{:make-default} option/initarg with a value of @code{nil}, like -this: +@clon{} has a global variable named @code{*synopsis*} which holds the +current synopsis. When you define/create a synopsis with either +@code{defsynopsis} or @code{make-synopsis}, it is automatically made the +default one, unless you use the @code{:make-default} option/initarg with +a value of @code{nil}, like this: @verbatim (defsynopsis (:make-default nil) ...) @@ -2258,10 +2257,10 @@ is used implicitely, but you have two ways to avoid this. @enumerate @item -@vindex *default-synopsis* +@vindex *synopsis* At any time in your program, you may change the value of -@code{*default-synopsis*}. All subsequent calls to @code{make-context} -will hence use this other synopsis. +@code{*synopsis*}. All subsequent calls to @code{make-context} will +hence use this other synopsis. @item @cfiaindex{make-context,:synopsis}@c If you prefer to use another synopsis only temporarily, you can use the @@ -3002,11 +3001,11 @@ See @ref{Constructors} and @ref{Using Different Synopsis}. See @ref{Synopsis Definition} and @ref{Using Different Synopsis}. @end defmac -@defopt *default-synopsis* +@defopt *synopsis* @xref{Using Different Synopsis}. @end defopt -@defun make-context &key (SYNOPSIS *default-synopsis*) CMDLINE @ +@defun make-context &key (SYNOPSIS *synopsis*) CMDLINE @ (MAKE-CURRENT t) @cfsubindex{make-context} @cfiaindex{make-context,:synopsis} diff --git a/package.lisp b/package.lisp index 77cdcee..40622bc 100644 --- a/package.lisp +++ b/package.lisp @@ -85,7 +85,7 @@ ;; From src/group.lisp: :make-group :defgroup ;; From src/synopsis.lisp: - :*default-synopsis* + :*synopsis* :make-synopsis :defsynopsis ;; From src/context.lisp: :*context* diff --git a/src/context.lisp b/src/context.lisp index e3ee3b8..cef0f0d 100644 --- a/src/context.lisp +++ b/src/context.lisp @@ -163,7 +163,7 @@ :type synopsis :initarg :synopsis :reader synopsis - :initform *default-synopsis*) + :initform *synopsis*) (progname :documentation ~"The program name " ~"as it appears on the command-line." :type string) ;; see below for reader @@ -765,7 +765,7 @@ or FITNESS FOR A PARTICULAR PURPOSE.~%" (defun make-context (&rest keys &key synopsis cmdline (make-current t)) "Make a new context. - SYNOPSIS is the program synopsis to use in that context. - It defaults to *DEFAULT-SYNOPSIS*. + It defaults to *SYNOPSIS*. - CMDLINE is the argument list (strings) to process. It defaults to a POSIX conformant argv. - If MAKE-CURRENT, make the new context current." diff --git a/src/synopsis.lisp b/src/synopsis.lisp index adf069f..ae4c7d5 100644 --- a/src/synopsis.lisp +++ b/src/synopsis.lisp @@ -31,7 +31,7 @@ (in-readtable :com.dvlsoft.clon) -(defvar *default-synopsis* nil "The default synopsis.") +(defvar *synopsis* nil "The current synopsis.") @@ -258,7 +258,7 @@ remainder. (let ((synopsis (apply #'make-instance 'synopsis (remove-keys keys :make-default)))) (when make-default - (setq *default-synopsis* synopsis)) + (setq *synopsis* synopsis)) synopsis)) (defmacro defsynopsis ((&rest keys &key postfix make-default) &body forms) -- 2.11.4.GIT