emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] /srv/bzr/emacs/emacs-23 r100230: Document byte-to-string i


From: Chong Yidong
Subject: [Emacs-diffs] /srv/bzr/emacs/emacs-23 r100230: Document byte-to-string in Lisp manual.
Date: Sun, 21 Nov 2010 13:07:47 -0500
User-agent: Bazaar (2.0.3)

------------------------------------------------------------
revno: 100230
committer: Chong Yidong <address@hidden>
branch nick: emacs-23
timestamp: Sun 2010-11-21 13:07:47 -0500
message:
  Document byte-to-string in Lisp manual.
  
  * objects.texi (Symbol Type):
  * text.texi (Near Point):
  * help.texi (Help Functions):
  * functions.texi (Mapping Functions): Use string instead of
  char-to-string in examples.
  
  * nonascii.texi (Converting Representations): Document
  byte-to-string.
  
  * strings.texi (Creating Strings): Don't mention semi-obsolete
  function char-to-string.
  (String Conversion): Shorten discussion of semi-obsolete function
  string-to-char.  Link to Converting Representations.
modified:
  doc/lispref/ChangeLog
  doc/lispref/functions.texi
  doc/lispref/help.texi
  doc/lispref/nonascii.texi
  doc/lispref/objects.texi
  doc/lispref/strings.texi
  doc/lispref/text.texi
  etc/NEWS
=== modified file 'doc/lispref/ChangeLog'
--- a/doc/lispref/ChangeLog     2010-11-20 19:52:20 +0000
+++ b/doc/lispref/ChangeLog     2010-11-21 18:07:47 +0000
@@ -1,3 +1,19 @@
+2010-11-21  Chong Yidong  <address@hidden>
+
+       * nonascii.texi (Converting Representations): Document
+       byte-to-string.
+
+       * strings.texi (Creating Strings): Don't mention semi-obsolete
+       function char-to-string.
+       (String Conversion): Shorten discussion of semi-obsolete function
+       string-to-char.  Link to Converting Representations.
+
+       * objects.texi (Symbol Type):
+       * text.texi (Near Point):
+       * help.texi (Help Functions):
+       * functions.texi (Mapping Functions): Use string instead of
+       char-to-string in examples.
+
 2010-11-20  Chong Yidong  <address@hidden>
 
        * text.texi (Kill Functions, Kill Functions)

=== modified file 'doc/lispref/functions.texi'
--- a/doc/lispref/functions.texi        2010-06-23 03:36:56 +0000
+++ b/doc/lispref/functions.texi        2010-11-21 18:07:47 +0000
@@ -818,7 +818,7 @@
      @result{} (a c e)
 (mapcar '1+ [1 2 3])
      @result{} (2 3 4)
-(mapcar 'char-to-string "abc")
+(mapcar 'string "abc")
      @result{} ("a" "b" "c")
 @end group
 

=== modified file 'doc/lispref/help.texi'
--- a/doc/lispref/help.texi     2010-01-13 08:35:10 +0000
+++ b/doc/lispref/help.texi     2010-11-21 18:07:47 +0000
@@ -551,7 +551,7 @@
 
 @smallexample
 @group
-(define-key global-map (char-to-string help-char) 'help-command)
+(define-key global-map (string help-char) 'help-command)
 (fset 'help-command help-map)
 @end group
 @end smallexample

=== modified file 'doc/lispref/nonascii.texi'
--- a/doc/lispref/nonascii.texi 2010-04-01 15:24:53 +0000
+++ b/doc/lispref/nonascii.texi 2010-11-21 18:07:47 +0000
@@ -202,6 +202,13 @@
 characters.
 @end defun
 
address@hidden byte-to-string byte
address@hidden byte to string
+This function returns a unibyte string containing a single byte of
+character data, @var{character}.  It signals a error if
address@hidden is not an integer between 0 and 255.
address@hidden defun
+
 @defun multibyte-char-to-unibyte char
 This converts the multibyte character @var{char} to a unibyte
 character, and returns that character.  If @var{char} is neither

=== modified file 'doc/lispref/objects.texi'
--- a/doc/lispref/objects.texi  2010-08-19 23:23:13 +0000
+++ b/doc/lispref/objects.texi  2010-11-21 18:07:47 +0000
@@ -582,7 +582,6 @@
 @group
 foo                 ; @r{A symbol named @samp{foo}.}
 FOO                 ; @r{A symbol named @samp{FOO}, different from @samp{foo}.}
-char-to-string      ; @r{A symbol named @samp{char-to-string}.}
 @end group
 @group
 1+                  ; @r{A symbol named @samp{1+}}

=== modified file 'doc/lispref/strings.texi'
--- a/doc/lispref/strings.texi  2010-06-23 03:36:56 +0000
+++ b/doc/lispref/strings.texi  2010-11-21 18:07:47 +0000
@@ -126,9 +126,8 @@
      @result{} ""
 @end example
 
-  Other functions to compare with this one include @code{char-to-string}
-(@pxref{String Conversion}), @code{make-vector} (@pxref{Vectors}), and
address@hidden (@pxref{Building Lists}).
+  Other functions to compare with this one include @code{make-vector}
+(@pxref{Vectors}) and @code{make-list} (@pxref{Building Lists}).
 @end defun
 
 @defun string &rest characters
@@ -565,38 +564,6 @@
 (@code{single-key-description} and @code{text-char-description}).  These
 are used primarily for making help messages.
 
address@hidden char-to-string character
address@hidden character to string
-This function returns a new string containing one character,
address@hidden  This function is semi-obsolete because the function
address@hidden is more general.  @xref{Creating Strings}.
address@hidden defun
-
address@hidden string-to-char string
address@hidden string to character
-  This function returns the first character in @var{string}.  If the
-string is empty, the function returns 0.  The value is also 0 when the
-first character of @var{string} is the null character, @acronym{ASCII} code
-0.
-
address@hidden
-(string-to-char "ABC")
-     @result{} 65
-
-(string-to-char "xyz")
-     @result{} 120
-(string-to-char "")
-     @result{} 0
address@hidden
-(string-to-char "\000")
-     @result{} 0
address@hidden group
address@hidden example
-
-This function may be eliminated in the future if it does not seem useful
-enough to retain.
address@hidden defun
-
 @defun number-to-string number
 @cindex integer to string
 @cindex integer to decimal
@@ -659,19 +626,39 @@
 @code{string-to-int} is an obsolete alias for this function.
 @end defun
 
address@hidden char-to-string character
address@hidden character to string
+This function returns a new string containing one character,
address@hidden  This function is semi-obsolete because the function
address@hidden is more general.  @xref{Creating Strings}.
address@hidden defun
+
address@hidden string-to-char string
+  This function returns the first character in @var{string}.  This
+mostly identical to @code{(aref string 0)}, except that it returns 0
+if the string is empty.  (The value is also 0 when the first character
+of @var{string} is the null character, @acronym{ASCII} code 0.)  This
+function may be eliminated in the future if it does not seem useful
+enough to retain.
address@hidden defun
+
   Here are some other functions that can convert to or from a string:
 
 @table @code
 @item concat
address@hidden can convert a vector or a list into a string.
+This function converts a vector or a list into a string.
 @xref{Creating Strings}.
 
 @item vconcat
address@hidden can convert a string into a vector.  @xref{Vector
+This function converts a string into a vector.  @xref{Vector
 Functions}.
 
 @item append
address@hidden can convert a string into a list.  @xref{Building Lists}.
+This function converts a string into a list.  @xref{Building Lists}.
+
address@hidden byte-to-string
+This function converts a byte of character data into a unibyte string.
address@hidden Representations}.
 @end table
 
 @node Formatting Strings

=== modified file 'doc/lispref/text.texi'
--- a/doc/lispref/text.texi     2010-11-20 19:52:20 +0000
+++ b/doc/lispref/text.texi     2010-11-21 18:07:47 +0000
@@ -86,7 +86,7 @@
 
 @example
 @group
-(char-to-string (char-after 1))
+(string (char-after 1))
      @result{} "@@"
 @end group
 @end example
@@ -121,9 +121,9 @@
 @end group
 
 @group
-(char-to-string (preceding-char))
+(string (preceding-char))
      @result{} "a"
-(char-to-string (following-char))
+(string (following-char))
      @result{} "c"
 @end group
 @end example

=== modified file 'etc/NEWS'
--- a/etc/NEWS  2010-11-21 16:52:05 +0000
+++ b/etc/NEWS  2010-11-21 18:07:47 +0000
@@ -108,6 +108,7 @@
 +++
 ** The yank-handler argument to kill-region and friends is now obsolete.
 
++++
 ** New function byte-to-string, like char-to-string but for bytes.
 
 


reply via email to

[Prev in Thread] Current Thread [Next in Thread]