<feed xmlns='http://www.w3.org/2005/Atom'>
<title>emacs/test/src/lread-tests.el, branch scratch/record</title>
<subtitle>Emacs is the extensible, customizable, self-documenting real-time display editor. 
</subtitle>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/'/>
<entry>
<title>Update copyright year to 2017 in master</title>
<updated>2017-01-01T09:48:59+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2017-01-01T09:48:38+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=e6a782ee1af7e9d2fe52c3a8cddaf7f02c1ad150'/>
<id>e6a782ee1af7e9d2fe52c3a8cddaf7f02c1ad150</id>
<content type='text'>
Run admin/update-copyright in the master branch.  This fixes files
that were not already fixed in the emacs-25 branch before it was
merged here.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Run admin/update-copyright in the master branch.  This fixes files
that were not already fixed in the emacs-25 branch before it was
merged here.
</pre>
</div>
</content>
</entry>
<entry>
<title>Treat incomplete integer literals as errors</title>
<updated>2016-12-23T12:21:34+00:00</updated>
<author>
<name>Philipp Stephani</name>
</author>
<published>2016-12-10T14:36:11+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=6eaadcc7c821b7a8c75ce6d1d56cd7f50898f809'/>
<id>6eaadcc7c821b7a8c75ce6d1d56cd7f50898f809</id>
<content type='text'>
See Bug#25120.

* src/lread.c (read_integer): Treat incomplete integer literals as errors.
* test/src/lread-tests.el (lread-empty-int-literal): New unit test for
incomplete integer literals.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
See Bug#25120.

* src/lread.c (read_integer): Treat incomplete integer literals as errors.
* test/src/lread-tests.el (lread-empty-int-literal): New unit test for
incomplete integer literals.
</pre>
</div>
</content>
</entry>
<entry>
<title>New function ‘char-from-name’</title>
<updated>2016-04-25T17:42:48+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2016-04-25T17:41:29+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=86d083438dba60dc00e9e96414bf7e832720c05a'/>
<id>86d083438dba60dc00e9e96414bf7e832720c05a</id>
<content type='text'>
This also fixes the mishandling of "\N{CJK COMPATIBILITY
IDEOGRAPH-F900}", "\N{VARIATION SELECTOR-1}", etc.
Problem reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00614.html
* doc/lispref/nonascii.texi (Character Codes), etc/NEWS: Document this.
* lisp/international/mule-cmds.el (char-from-name): New function.
(read-char-by-name): Use it.  Document that "BED" is treated as
a name, not as a hexadecimal number.  Reject out-of-range integers,
floating-point numbers, and strings with trailing junk.
* src/lread.c (character_name_to_code): Call char-from-name
instead of inspecting ucs-names directly, so that we handle
computed names like "VARIATION SELECTOR-1".  Do not use an auto
string, since char-from-name might GC.
* test/src/lread-tests.el: Add tests for new behavior, and
fix some old tests that were wrong.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This also fixes the mishandling of "\N{CJK COMPATIBILITY
IDEOGRAPH-F900}", "\N{VARIATION SELECTOR-1}", etc.
Problem reported by Eli Zaretskii in:
http://lists.gnu.org/archive/html/emacs-devel/2016-04/msg00614.html
* doc/lispref/nonascii.texi (Character Codes), etc/NEWS: Document this.
* lisp/international/mule-cmds.el (char-from-name): New function.
(read-char-by-name): Use it.  Document that "BED" is treated as
a name, not as a hexadecimal number.  Reject out-of-range integers,
floating-point numbers, and strings with trailing junk.
* src/lread.c (character_name_to_code): Call char-from-name
instead of inspecting ucs-names directly, so that we handle
computed names like "VARIATION SELECTOR-1".  Do not use an auto
string, since char-from-name might GC.
* test/src/lread-tests.el: Add tests for new behavior, and
fix some old tests that were wrong.
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve character name escapes</title>
<updated>2016-04-22T02:29:41+00:00</updated>
<author>
<name>Paul Eggert</name>
</author>
<published>2016-04-22T02:26:34+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=bd1c7ca67e7429e07f78d4ff49163fd7a67a6765'/>
<id>bd1c7ca67e7429e07f78d4ff49163fd7a67a6765</id>
<content type='text'>
* doc/lispref/nonascii.texi (Character Properties):
Avoid duplication of Unicode names.  Reformat examples to fit in
narrow pages.
* doc/lispref/objects.texi (General Escape Syntax):
Simplify and better-organize explanation of \N{...} escapes.
* src/character.h (CHAR_SURROGATE_PAIR_P): Remove; unused.
(char_surrogate_p): New inline function.
* src/lread.c: Do not include string.h; no longer needed.
(invalid_character_name, check_scalar_value): Remove; the ideas
behind these functions are now bundled into character_name_to_code.
(character_name_to_code): Remove undocumented support for "CJK
IDEOGRAPH-XXXX" names, as "U+XXXX" suffices.  Reject monstrosities
like "\N{U+-0}" and null bytes in \N escapes.  Reject floating
point in \N escapes instead of returning garbage.  Use
AUTO_STRING_WITH_LEN to lessen pressure on the garbage collector.
* test/src/lread-tests.el (lread-char-number, lread-char-name)
(lread-string-char-number, lread-string-char-name):
Test runtime behavior, not compile-time, as the test framework
is not set up to test compile-time.
(lread-char-surrogate-1, lread-char-surrogate-2)
(lread-char-surrogate-3, lread-char-surrogate-4)
(lread-string-char-number-2, lread-string-char-number-3):
New tests.
(lread-string-char-number-1): Rename from lread-string-char-number.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* doc/lispref/nonascii.texi (Character Properties):
Avoid duplication of Unicode names.  Reformat examples to fit in
narrow pages.
* doc/lispref/objects.texi (General Escape Syntax):
Simplify and better-organize explanation of \N{...} escapes.
* src/character.h (CHAR_SURROGATE_PAIR_P): Remove; unused.
(char_surrogate_p): New inline function.
* src/lread.c: Do not include string.h; no longer needed.
(invalid_character_name, check_scalar_value): Remove; the ideas
behind these functions are now bundled into character_name_to_code.
(character_name_to_code): Remove undocumented support for "CJK
IDEOGRAPH-XXXX" names, as "U+XXXX" suffices.  Reject monstrosities
like "\N{U+-0}" and null bytes in \N escapes.  Reject floating
point in \N escapes instead of returning garbage.  Use
AUTO_STRING_WITH_LEN to lessen pressure on the garbage collector.
* test/src/lread-tests.el (lread-char-number, lread-char-name)
(lread-string-char-number, lread-string-char-name):
Test runtime behavior, not compile-time, as the test framework
is not set up to test compile-time.
(lread-char-surrogate-1, lread-char-surrogate-2)
(lread-char-surrogate-3, lread-char-surrogate-4)
(lread-string-char-number-2, lread-string-char-number-3):
New tests.
(lread-string-char-number-1): Rename from lread-string-char-number.
</pre>
</div>
</content>
</entry>
<entry>
<title>Use 'ucs-names' for character name escapes</title>
<updated>2016-04-22T02:29:40+00:00</updated>
<author>
<name>Philipp Stephani</name>
</author>
<published>2016-04-21T21:51:30+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=e7cb38edc946ff60c1c878b30b068376d6ef56d2'/>
<id>e7cb38edc946ff60c1c878b30b068376d6ef56d2</id>
<content type='text'>
* lread.c (invalid_character_name, check_scalar_value)
(parse_code_after_prefix, character_name_to_code): New helper
functions that use 'ucs-names' and parsing for CJK ideographs.
(read_escape): Use helper functions.
(syms_of_lread): New symbol 'ucs-names'.
* test/src/lread-tests.el: New tests; fix a couple of bugs in
existing tests.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lread.c (invalid_character_name, check_scalar_value)
(parse_code_after_prefix, character_name_to_code): New helper
functions that use 'ucs-names' and parsing for CJK ideographs.
(read_escape): Use helper functions.
(syms_of_lread): New symbol 'ucs-names'.
* test/src/lread-tests.el: New tests; fix a couple of bugs in
existing tests.
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement named character escapes, similar to Perl</title>
<updated>2016-04-22T02:29:40+00:00</updated>
<author>
<name>Philipp Stephani</name>
</author>
<published>2016-04-21T21:45:22+00:00</published>
<link rel='alternate' type='text/html' href='https://jason.zzq.org/git/emacs/commit/?id=de7d5f36e0f3261a7300fa3a3d87ae3b758b8a73'/>
<id>de7d5f36e0f3261a7300fa3a3d87ae3b758b8a73</id>
<content type='text'>
* lread.c (init_character_names): New function.
(read_escape): Read Perl-style named character escape sequences.
(syms_of_lread): Initialize new variable 'character_names'.
* test/src/lread-tests.el (lread-char-empty-name): Add test file
for src/lread.c.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* lread.c (init_character_names): New function.
(read_escape): Read Perl-style named character escape sequences.
(syms_of_lread): Initialize new variable 'character_names'.
* test/src/lread-tests.el (lread-char-empty-name): Add test file
for src/lread.c.
</pre>
</div>
</content>
</entry>
</feed>
