Mercurial > hg > xemacs-beta
changeset 4561:44d10aae73ef
Automated merge with file:/Sources/xemacs-21.5-checked-out
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 01 Jun 2008 18:11:37 +0200 |
parents | 017044266245 (current diff) a99eb40f0b5b (diff) |
children | 1c6cf8aa798b |
files | |
diffstat | 5 files changed, 71 insertions(+), 25 deletions(-) [+] |
line wrap: on
line diff
--- a/man/ChangeLog Sun May 25 22:06:30 2008 +0200 +++ b/man/ChangeLog Sun Jun 01 18:11:37 2008 +0200 @@ -1,3 +1,17 @@ +2008-05-29 Aidan Kehoe <kehoea@parhasard.net> + + * lispref/objects.texi (Equality Predicates): + Expand on bignum equality; correct an omitted word in the last + commit. + +2008-05-27 Aidan Kehoe <kehoea@parhasard.net> + + * lispref/objects.texi (Equality Predicates): + Cross reference to the section on comparison of numbers when + talking about using #'eq with integers; also mention that + #'eq gives t when passed identical integers, and that #'char= is + also available there. + 2008-05-21 Aidan Kehoe <kehoea@parhasard.net> * internals/internals.texi (Ben's README):
--- a/man/lispref/objects.texi Sun May 25 22:06:30 2008 +0200 +++ b/man/lispref/objects.texi Sun Jun 01 18:11:37 2008 +0200 @@ -2246,12 +2246,19 @@ change in one will be reflected by the same change in the other. @code{eq} returns @code{t} if @var{object1} and @var{object2} are -integers with the same value. Also, since symbol names are normally -unique, if the arguments are symbols with the same name, they are -@code{eq}. For other types (e.g., lists, vectors, strings), two -arguments with the same contents or elements are not necessarily -@code{eq} to each other: they are @code{eq} only if they are the same -object. +integers with the same value. It is preferable to use @code{=} or +@code{eql} in many contexts for numeric comparison, especially since +bignums (integers with values that would have otherwise overflowed, only +available on some builds) with the same value are not @code{eq}; +@pxref{Comparison of Numbers}. @code{eq} also returns @code{t} if +@var{object1} and @var{object2} are identical characters, though in this +case you may prefer to use @code{char=}. + +Also, since symbol names are normally unique, if the arguments are +symbols with the same name, they are @code{eq}. For other types (e.g., +lists, vectors, strings), two arguments with the same contents or +elements are not necessarily @code{eq} to each other: they are @code{eq} +only if they are the same object. (The @code{make-symbol} function returns an uninterned symbol that is not interned in the standard @code{obarray}. When uninterned symbols @@ -2259,11 +2266,11 @@ the same name are not @code{eq}. @xref{Creating Symbols}.) NOTE: Under XEmacs 19, characters are really just integers, and thus -characters and integers are @code{eq}. Under XEmacs 20, it was -necessary to preserve remnants of this in function such as @code{old-eq} -in order to maintain byte-code compatibility. Byte code compiled -under any Emacs 19 will automatically have calls to @code{eq} mapped -to @code{old-eq} when executed under XEmacs 20. +characters and integers with the same numeric code are @code{eq}. Under +XEmacs 20, it was necessary to preserve remnants of this in function +such as @code{old-eq} in order to maintain byte-code compatibility. +Byte code compiled under any Emacs 19 will automatically have calls to +@code{eq} mapped to @code{old-eq} when executed under XEmacs 20. @example @group
--- a/src/ChangeLog Sun May 25 22:06:30 2008 +0200 +++ b/src/ChangeLog Sun Jun 01 18:11:37 2008 +0200 @@ -1,3 +1,17 @@ +2008-05-27 Aidan Kehoe <kehoea@parhasard.net> + + * editfns.c (Ftranslate_region): + Correct a thinko in the last commit; I meant #'get-char-table, not + #'put-char-table. + +2008-05-25 Aidan Kehoe <kehoea@parhasard.net> + + * chartab.c (Fmake_char_table): + Document the default return values for the various char table + types. + * editfns.c (Ftranslate_region): Document why `generic' char tables + are preferable to `char' char tables for this function. + 2008-05-21 Aidan Kehoe <kehoea@parhasard.net> * fileio.c (Fmake_symbolic_link):
--- a/src/chartab.c Sun May 25 22:06:30 2008 +0200 +++ b/src/chartab.c Sun Jun 01 18:11:37 2008 +0200 @@ -566,25 +566,32 @@ sorts of values. The different char table types are `category' - Used for category tables, which specify the regexp categories - that a character is in. The valid values are nil or a - bit vector of 95 elements. Higher-level Lisp functions are - provided for working with category tables. Currently categories + Used for category tables, which specify the regexp categories that a + character is in. The valid values are nil or a bit vector of 95 + elements, and values default to nil. Higher-level Lisp functions + are provided for working with category tables. Currently categories and category tables only exist when Mule support is present. `char' - A generalized char table, for mapping from one character to - another. Used for case tables, syntax matching tables, - `keyboard-translate-table', etc. The valid values are characters. + A generalized char table, for mapping from one character to another. + Used for case tables, syntax matching tables, + `keyboard-translate-table', etc. The valid values are characters, + and the default result given by `get-char-table' if a value hasn't + been set for a given character or for a range that includes it, is + ?\x00. `generic' - An even more generalized char table, for mapping from a - character to anything. + An even more generalized char table, for mapping from a character to + anything. The default result given by `get-char-table' is nil. `display' - Used for display tables, which specify how a particular character - is to appear when displayed. #### Not yet implemented. + Used for display tables, which specify how a particular character is + to appear when displayed. #### Not yet implemented; currently, the + display table code uses generic char tables, and it's not clear that + implementing this char table type would be useful. `syntax' Used for syntax tables, which specify the syntax of a particular character. Higher-level Lisp functions are provided for - working with syntax tables. The valid values are integers. + working with syntax tables. The valid values are integers, and the + default result given by `get-char-table' is the syntax code for + `inherit'. */ (type)) {
--- a/src/editfns.c Sun May 25 22:06:30 2008 +0200 +++ b/src/editfns.c Sun Jun 01 18:11:37 2008 +0200 @@ -1824,8 +1824,12 @@ nil (nil meaning don't replace.) If TABLE is a char-table, its elements describe the mapping between -characters and their replacements. The char-table should be of type -`char' or `generic'. +characters and their replacements. The char-table should be of type `char' +or `generic'. If the value given by `get-char-table' for a given character +is nil, that character will not be translated by `translate-region'. Since +`get-char-table' can never return nil with a char table of type `char', and +since most translation involves a subset of the possible XEmacs characters, +not all of them, the most generally useful table type here is `generic'. Returns the number of substitutions performed. */