Mercurial > hg > xemacs-beta
comparison tests/automated/lisp-tests.el @ 5462:97ac18bd1fa3
Make sure distinct symbol macros with identical names expand distinctly.
lisp/ChangeLog addition:
2011-04-24 Aidan Kehoe <kehoea@parhasard.net>
* cl-macs.el (symbol-macrolet):
* cl-macs.el (lexical-let):
* cl.el:
* cl.el (cl-macroexpand):
Distinct symbol macros with identical string names should
nonetheless expand to different things; implement this, storing
the symbol's eq-hash in the macro environment, rather than its
string name.
tests/ChangeLog addition:
2011-04-24 Aidan Kehoe <kehoea@parhasard.net>
* automated/lisp-tests.el:
Check that distinct symbol macros with identical string names
expand to different things.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 24 Apr 2011 09:52:45 +0100 |
parents | d967d96ca043 |
children | f2881cb841b4 |
comparison
equal
deleted
inserted
replaced
5461:568ec109e73d | 5462:97ac18bd1fa3 |
---|---|
2912 (Known-Bug-Expect-Failure | 2912 (Known-Bug-Expect-Failure |
2913 (Assert (eql 0 (needs-lexical-context 2 nil nil)) | 2913 (Assert (eql 0 (needs-lexical-context 2 nil nil)) |
2914 "the function special operator doesn't create a lexical context.")) | 2914 "the function special operator doesn't create a lexical context.")) |
2915 (Assert (eql 0 (needs-lexical-context 2 nil nil))))) | 2915 (Assert (eql 0 (needs-lexical-context 2 nil nil))))) |
2916 | 2916 |
2917 ;; Test symbol-macrolet with symbols with identical string names. | |
2918 | |
2919 (macrolet | |
2920 ((test-symbol-macrolet () | |
2921 (let* ((symbol 'my-symbol) | |
2922 (copy-symbol (copy-symbol symbol)) | |
2923 (third (copy-symbol copy-symbol))) | |
2924 `(symbol-macrolet ((,symbol [symbol expansion]) | |
2925 (,copy-symbol [copy expansion]) | |
2926 (,third [third expansion])) | |
2927 (list ,symbol ,copy-symbol ,third))))) | |
2928 (Assert (equal '([symbol expansion] [copy expansion] [third expansion]) | |
2929 (test-symbol-macrolet)))) | |
2930 | |
2917 ;;; end of lisp-tests.el | 2931 ;;; end of lisp-tests.el |