]> code.delx.au - gnu-emacs/blobdiff - lispref/objects.texi
(Syntactic Font Lock): Mention font-lock-syntactic-face-function.
[gnu-emacs] / lispref / objects.texi
index 0e35741a1aadbc8ce7be4ddb05266e7e5de33cbd..cfb3864e9c99a8c4fd6c7809925ee0648ceb84d7 100644 (file)
@@ -431,6 +431,20 @@ Numerically, the
 bit values are 2**22 for alt, 2**23 for super and 2**24 for hyper.
 @end ifnottex
 
+@cindex unicode character escape
+  Emacs provides a syntax for specifying characters by their Unicode
+code points.  @code{?\u@var{nnnn}} represents a character that maps to
+the Unicode code point @samp{U+@var{nnnn}}.  There is a slightly
+different syntax for specifying characters with code points above
+@code{#xFFFF}; @code{\U00@var{nnnnnn}} represents the character whose
+Unicode code point is @samp{U+@var{nnnnnn}}, if such a character
+is supported by Emacs.  If the corresponding character is not
+supported, Emacs signals an error.
+
+  This peculiar and inconvenient syntax was adopted for compatibility
+with other programming languages.  Unlike some other languages, Emacs
+Lisp supports this syntax in only character literals and strings.
+
 @cindex @samp{\} in character constant
 @cindex backslash in character constant
 @cindex octal character code
@@ -618,7 +632,7 @@ come to refer to any structure made out of cons cells.
 
 @cindex atom
   Because cons cells are so central to Lisp, we also have a word for
-``an object which is not a cons cell''.  These objects are called
+``an object which is not a cons cell.''  These objects are called
 @dfn{atoms}.
 
 @cindex parenthesis
@@ -1000,6 +1014,9 @@ this produces a unibyte string.  However, using any hex escape in a
 string (even for an @acronym{ASCII} character) forces the string to be
 multibyte.
 
+  You can also specify characters in a string by their numeric values
+in Unicode, using @samp{\u} and @samp{\U} (@pxref{Character Type}).
+
   @xref{Text Representations}, for more information about the two
 text representations.
 
@@ -1178,18 +1195,19 @@ Hash tables have no read syntax, and print using hash notation.
 @node Function Type
 @subsection Function Type
 
-  Just as functions in other programming languages are executable,
-@dfn{Lisp function} objects are pieces of executable code.  However,
-functions in Lisp are primarily Lisp objects, and only secondarily the
-text which represents them.  These Lisp objects are lambda expressions:
-lists whose first element is the symbol @code{lambda} (@pxref{Lambda
-Expressions}).
+  Lisp functions are executable code, just like functions in other
+programming languages.  In Lisp, unlike most languages, functions are
+also Lisp objects.  A non-compiled function in Lisp is a lambda
+expression: that is, a list whose first element is the symbol
+@code{lambda} (@pxref{Lambda Expressions}).
 
   In most programming languages, it is impossible to have a function
 without a name.  In Lisp, a function has no intrinsic name.  A lambda
-expression is also called an @dfn{anonymous function} (@pxref{Anonymous
-Functions}).  A named function in Lisp is actually a symbol with a valid
-function in its function cell (@pxref{Defining Functions}).
+expression can be called as a function even though it has no name; to
+emphasize this, we also call it an @dfn{anonymous function}
+(@pxref{Anonymous Functions}).  A named function in Lisp is just a
+symbol with a valid function in its function cell (@pxref{Defining
+Functions}).
 
   Most of the time, functions are called when their names are written in
 Lisp expressions in Lisp programs.  However, you can construct or obtain
@@ -1221,7 +1239,7 @@ without qualification, we mean a Lisp macro, not a keyboard macro.
   A @dfn{primitive function} is a function callable from Lisp but
 written in the C programming language.  Primitive functions are also
 called @dfn{subrs} or @dfn{built-in functions}.  (The word ``subr'' is
-derived from ``subroutine''.)  Most primitive functions evaluate all
+derived from ``subroutine.'')  Most primitive functions evaluate all
 their arguments when they are called.  A primitive function that does
 not evaluate all its arguments is called a @dfn{special form}
 (@pxref{Special Forms}).@refill
@@ -1425,10 +1443,9 @@ in any given window can change frequently.
 @node Frame Type
 @subsection Frame Type
 
-  A @dfn{frame} is a rectangle on the screen that contains one or more
-Emacs windows.  A frame initially contains a single main window (plus
-perhaps a minibuffer window) which you can subdivide vertically or
-horizontally into smaller windows.
+  A @dfn{frame} is a screen area that contains one or more Emacs
+windows; we also use the term ``frame'' to refer to the Lisp object
+that Emacs uses to refer to the screen area.
 
   Frames have no read syntax.  They print in hash notation, giving the
 frame's title, plus its address in core (useful to identify the frame
@@ -1781,10 +1798,10 @@ with references to further information.
 @xref{Basic Windows, windowp}.
 
 @item booleanp
-@xref{nil and t, booleanp}
+@xref{nil and t, booleanp}.
 
 @item string-or-null-p
-@xref{Predicates for Strings, string-or-null-p}
+@xref{Predicates for Strings, string-or-null-p}.
 @end table
 
   The most general way to check the type of an object is to call the
@@ -1806,12 +1823,14 @@ This function returns a symbol naming the primitive type of
 @example
 (type-of 1)
      @result{} integer
+@group
 (type-of 'nil)
      @result{} symbol
 (type-of '())    ; @r{@code{()} is @code{nil}.}
      @result{} symbol
 (type-of '(x))
      @result{} cons
+@end group
 @end example
 @end defun