[librep] Doc. * More details on 'require'. Distinguishes import to module and loading to librep. * Backslash
- From: Christopher Bratusek <chrisb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [librep] Doc. * More details on 'require'. Distinguishes import to module and loading to librep. * Backslash
- Date: Tue, 6 Apr 2010 10:56:18 +0000 (UTC)
commit 3530191cdfa8de849d032f2c924bf403f423eb55
Author: Teika kazura <teika lavabit com>
Date: Sat Apr 3 16:52:31 2010 +0900
Doc.
* More details on 'require'. Distinguishes import to module and
loading to librep.
* Backslash as in ?\] is meaningless, but valid.
* Function 'signal'.
* Distinction between 'make-symbol' and 'intern'.
* Deleted one control code (C-x).
man/lang.texi | 65 ++++++++++++++++++++++++++++++++++++--------------------
man/news.texi | 5 ++-
2 files changed, 45 insertions(+), 25 deletions(-)
---
diff --git a/man/lang.texi b/man/lang.texi
index 59e6784..19010bc 100644
--- a/man/lang.texi
+++ b/man/lang.texi
@@ -2040,26 +2040,26 @@ produce the next @emph{actual} character in the string.
The following escape sequences are supported (all are shown without their
leading backslash @samp{\} character).
- table @samp
- item n
+ table @asis
+ item @samp{n}
A newline character.
- item r
+ item @samp{r}
A carriage return character.
- item f
+ item @samp{f}
A form feed character.
- item t
+ item @samp{t}
A TAB character.
- item a
+ item @samp{a}
A `bell' character (this is Ctrl-g).
- item \
+ item @samp{\}
A backslash character.
- item ^ var{c}
+ item @samp{^ var{c}}
The `control' code of the character @var{c}. This is calculated by toggling
the seventh bit of the @emph{upper-case} version of @var{c}.
@@ -2070,14 +2070,19 @@ For example,
\^@@ ;The NUL character (ASCII value 0)
@end lisp
- item 012
+ item @samp{012}
The character whose ASCII value is the octal value @samp{012}. After the
backslash character the Lisp reader reads up to three octal digits and
combines them into one character.
- item x12
+ item @samp{x12}
The character whose ASCII value is the hexadecimal value @samp{12}, i.e.
an @samp{x} character followed by one or two hex digits.
+
+ item Others
+If none of the above applies, the leading backslash is ignored. This
+is sometimes useful for editors syntax parsing, especially for
+punctuation characters.
@end table
@defun stringp object
@@ -2467,9 +2472,17 @@ This function creates and returns a new, uninterned, symbol whose print
name is the string @var{print-name}. Its value cell is void (undefined)
and it will have an empty property list.
+If you're unsure, use @code{intern} instead. (@pxref{Interning}.)
+
@lisp
(make-symbol "foo")
@result{} foo
+
+(eq 'foo (make-symbol "foo"))
+ @result{} ()
+
+(eq 'foo (intern "foo"))
+ @result{} t
@end lisp
@end defun
@@ -4386,13 +4399,12 @@ Function}). This file should contain a @code{define-structure} form (as
described in the previous section) as the last top-level form in the
file.
-The @code{require} function can also be used to import modules. For
-the details, @xref{Features}.If a module of the same name as the
-requested feature has already been loaded, then it is imported into
-the current module. Otherwise if a file is loaded that contains a
-module definition as its last top-level form, this module is imported
-into the current module.
-
+The @code{require} function can also be used to import modules. In
+fact, @code{require} offers two distinct, but confusing
+functionalities; It loads the module to librep if unloaded. In
+addition, it imports that module to the current module, i.e. access
+the exported symbols, if not yet imported. For the details,
+ xref{Features}
@node Modules and Special Variables, , Module Loading, Modules
@subsection Modules and Special Variables
@@ -5013,6 +5025,11 @@ error message otherwise.
@end lisp
@end defun
+ defun error template #!rest values
+Same as @code{(signal 'error @var{string})}, where @var{string}
+is a string formatted by @var{template} and @var{VALUES}. (@pxref{Formatted Output})
+ end defun
+
@defvar debug-on-error
This variable is consulted by the function @code{signal}. If its value
is either @code{t} or a list containing the @var{error-symbol} to
@@ -5642,11 +5659,13 @@ Show that the caller is planning to use the feature @var{feature} (a
symbol). This function will check the @code{features} variable to see
if @var{feature} is already loaded, if so it will return immediately.
-If @var{feature} is not present it will be loaded. As the filename,
-the print name of the symbol @var{feature} is used, with any @samp{.}
-characters replaced by the operating system's directory separator
-(@pxref{Module Loading}). If the file does not exist, then an error
-is signaled.
+If @var{feature} is not present it will be loaded. If it is already
+loaded into librep, then it's imported in the current module. If not,
+the file which defines the module is searched and
+loaded(@pxref{Load Function}). As the filename, the print name of
+the symbol @var{feature} is used, with any @samp{.} characters
+replaced by the operating system's directory separator (@pxref{Module
+Loading}). If the file does not exist, then an error is signaled.
@lisp
;;;; physics.jl -- the @code{physics} library
@@ -5715,7 +5734,7 @@ which is returned.
@lisp
(compile-form '(setq foo bar))
- @result{} (run-byte-code "F!" [bar foo] 2)
+ @result{} (run-byte-code "\030F!v" [bar foo] 2)
@end lisp
@end defun
diff --git a/man/news.texi b/man/news.texi
index bc17b38..57713a9 100644
--- a/man/news.texi
+++ b/man/news.texi
@@ -11,8 +11,9 @@
@item Minor doc improvements [Teika Kazura]
-Describes function @code{string-split}. Correction in suffix handling
-of @code{load} function.
+Describes functions @code{signal} and @code{string-split}. Correction
+in suffix handling of @code{load} function. More details on the function
+ code{require}
@item improved specfile [Kim B. Heino]
@end itemize
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]