- 13 May, 2017 1 commit
-
-
Philipp Stephani authored
* src/lread.c (load_warn_unescaped_character_literals) (syms_of_lread): lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Improve formatting of unescaped character literal warnings. * test/src/lread-tests.el (lread-tests--unescaped-char-literals): test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--unescaped-char-literals): Adapt unit tests.
-
- 10 May, 2017 2 commits
-
-
Glenn Morris authored
* test/Makefile.in (ELFILES): Exclude the data/ directory. * test/src/lread-tests.el (lread-test-bug26837): Revert previous.
-
Tino Calancha authored
This test fails in my local machine because the data files are compiled, and the test doesn't expect that. * test/src/lread-tests.el (lread-test-bug26837): Match a suffix ending with '.elc' when the data files are compiled.
-
- 09 May, 2017 1 commit
-
-
Glenn Morris authored
* src/lread.c (readevalloop): Fix the "whole buffer" check to operate in the correct buffer. (Feval_buffer): Move point back to the start after checking for lexical binding. * test/src/lread-tests.el (lread-test-bug26837): New test. * test/data/somelib.el, test/data/somelib2.el: New test data files.
-
- 01 May, 2017 1 commit
-
-
Philipp Stephani authored
* src/lread.c (load_warn_unescaped_character_literals, Fload, read1) (syms_of_lread): Warn if unescaped character literals are found (Bug#20152). * lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Check for unescaped character literals during byte compilation. * test/src/lread-tests.el (lread-tests--unescaped-char-literals): New unit test. (lread-tests--with-temp-file, lread-tests--last-message): Helper functions for unit test. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--unescaped-char-literals): New unit test. * test/lisp/emacs-lisp/bytecomp-tests.el (bytecomp-tests--with-temp-file): Helper macro for unit test.
-
- 08 Apr, 2017 1 commit
-
-
Lars Brinkhoff authored
* lread.c (substitute_object_recurse): Work with records. * lread-tests.el (lread-record-1): New test.
-
- 01 Jan, 2017 1 commit
-
-
Paul Eggert authored
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.
-
- 23 Dec, 2016 1 commit
-
-
Philipp Stephani authored
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.
-
- 25 Apr, 2016 1 commit
-
-
Paul Eggert authored
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.
-
- 22 Apr, 2016 3 commits
-
-
Paul Eggert authored
* 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.
-
Philipp Stephani authored
* 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.
-
Philipp Stephani authored
* 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.
-