Mercurial > hg > xemacs-beta
comparison tests/automated/lisp-tests.el @ 4394:cacc942c0d0f
Avoid clearing print-gensym-alist inappropriately when printing hash tables.
2008-01-15 Aidan Kehoe <kehoea@parhasard.net>
* automated/lisp-tests.el (thing):
Check that printing a hash table literal doesn't clear
print-gensym-alist.
2008-01-15 Aidan Kehoe <kehoea@parhasard.net>
* print.c (prin1_to_string): New.
The guts of Fprin1_to_string, without resetting
Vprint_gensym_alist.
(Fprin1_to_string):
Call prin1_to_string, wrapped with RESET_PRINT_GENSYM calls.
* doprnt.c (emacs_doprnt_1):
Call prin1_to_string, not Fprin1_to_string (dos veces). Avoids an
inappropriate reset of print-gensym-alist.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Tue, 15 Jan 2008 21:35:01 +0100 |
parents | 89e64783d068 |
children | e97f16fb2e25 |
comparison
equal
deleted
inserted
replaced
4391:cbf129b005df | 4394:cacc942c0d0f |
---|---|
1297 (Check-Error invalid-read-syntax (read (format "%u" -1)))) | 1297 (Check-Error invalid-read-syntax (read (format "%u" -1)))) |
1298 | 1298 |
1299 ;; Check all-completions ignore element start with space. | 1299 ;; Check all-completions ignore element start with space. |
1300 (Assert (not (all-completions "" '((" hidden" . "object"))))) | 1300 (Assert (not (all-completions "" '((" hidden" . "object"))))) |
1301 (Assert (all-completions " " '((" hidden" . "object")))) | 1301 (Assert (all-completions " " '((" hidden" . "object")))) |
1302 | |
1303 (let* ((literal-with-uninterned | |
1304 '(first-element | |
1305 [#1=#:G32976 #2=#:G32974 #3=#:G32971 #4=#:G32969 alias | |
1306 #s(hash-table size 256 data (969 ?ù 55 ?7 166 ?¦ )) | |
1307 #5=#:G32970 #6=#:G32972])) | |
1308 (print-readably t) | |
1309 (print-gensym t) | |
1310 (printed-with-uninterned (prin1-to-string literal-with-uninterned)) | |
1311 (awkward-regexp "#1=#") | |
1312 (first-match-start (string-match awkward-regexp | |
1313 printed-with-uninterned))) | |
1314 (Assert (null (string-match awkward-regexp printed-with-uninterned | |
1315 (1+ first-match-start))))) |