;ELC ;;; compiled by jwz@thalidomide on Fri Dec 31 02:08:10 1993 ;;; from file /th/jwz/emacs19/lisp/utils/backquote.el ;;; emacs version 19.9 Lucid (beta9). ;;; bytecomp version 2.22; 22-dec-93. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19.")) (fset 'bq-push '(macro . #[(v l) " EE" [setq l cons v] 5 "\ Pushes evaluated first form onto second unevaluated object a list-value atom"])) (byte-code "MMM" [bq-caar (macro . #[(l) " DD" [car l] 3]) bq-cadr (macro . #[(l) "\nDD" [car cdr l] 3]) bq-cdar (macro . #[(l) "\nDD" [cdr car l] 3])] 2) (defconst backquote-unquote '(\,) "\ *A list of all objects that stimulate unquoting in `. Memq test.") (defconst backquote-splice '(\,@) "\ *A list of all objects that stimulate splicing in `. Memq test.") (fset '\` '(macro . #[(form) " !" [bq-make-maker form] 2 "\ (` FORM) is a macro that expands to code to construct FORM. Note that this is very slow in interpreted code, but fast if you compile. FORM is one or more nested lists, which are `almost quoted': They are copied recursively, with non-lists used unchanged in the copy. (` a b) == (list 'a 'b) constructs a new list with two elements, `a' and `b'. (` a (b c)) == (list 'a (list 'b 'c)) constructs two nested new lists. However, certain special lists are not copied. They specify substitution. Lists that look like (, EXP) are evaluated and the result is substituted. (` a (, (+ x 5))) == (list 'a (+ x 5)) Elements of the form (,@ EXP) are evaluated and then all the elements of the result are substituted. This result must be a list; it may be `nil'. As an example, a simple macro `push' could be written: (defmacro push (v l) (` (setq (, l) (cons (,@ (list v l)))))) or as (defmacro push (v l) (` (setq (, l) (cons (, v) (, l))))) LIMITATIONS: \"dotted lists\" are not allowed in FORM. The ultimate cdr of each list scanned by ` must be `nil'. (This does not apply to constants inside expressions to be substituted.) Substitution elements are not allowed as the cdr of a cons cell. For example, (` (A . (, B))) does not work. Instead, write (` (A (,@ B))). You cannot construct vectors, only lists. Vectors are treated as constants. BEWARE BEWARE BEWARE Inclusion of (,ATOM) rather than (, ATOM) or of (,@ATOM) rather than (,@ ATOM) will result in errors that will show up very late."])) (fset 'bq-make-maker #[(form) " !\"\n\n=\n  D GU\n A@ !\n B," [nil 0 state ec qc tailmaker mapcar bq-iterative-list-builder reverse form quote 1 bq-singles] 4 "\ Given argument FORM, a `mostly quoted' object, produces a maker. See backquote.el for details"]) (byte-code "MMMM  MMMMMMMMMMMMMMM!" [('bq-quotecar (append car) (list bq-make-list) (cons bq-id)) bq-singles bq-id (lambda (x) x) bq-quotecar #[(x) " @D" [quote x] 2] bq-make-list #[(x) " B" [list x] 2] bq-iterative-list-builder #[(form) ": \nA@!@ > A@A@!@ > A@A@!!<@= \nA@A@! A@!)" [form state bq-quotefns backquote-unquote bq-evalfns backquote-splice bq-splicefns bq-make-maker newform quote] 3] ((nil bq-splicenil) (append bq-spliceappend) (list bq-splicelist) 'bq-splicequote (cons bq-splicecons)) bq-splicefns ((nil bq-evalnil) (append bq-evalappend) (list bq-evallist) 'bq-evalquote (cons bq-evalcons)) bq-evalfns ((nil bq-quotenil) (append bq-quoteappend) (list bq-quotelist) 'bq-quotequote (cons bq-quotecons)) bq-quotefns bq-quotecons #[(form) "@<@@=\n@A@DDA@D\nD@EA@Dĉ" [tailmaker quote form list append state] 3] bq-quotequote #[(form) " B" [form tailmaker] 2] bq-quotelist #[(form) " D\nB" [quote form tailmaker] 2] bq-quoteappend #[(form) "<@<@@=@A\n@A@B\nCDB" [tailmaker quote form] 3] bq-quotenil #[(form) "C‰" [form tailmaker quote state] 2] bq-evalcons #[(form) " \n@E\nA@DÉ" [list form tailmaker append state] 3] bq-evalquote #[(form) "GW\n\"Bʼn\nDDDȉ" [tailmaker 3 form mapcar #[(x) " D" [quote x] 2] list state quote append] 4] bq-evallist #[(form) " B" [form tailmaker] 2] bq-evalappend #[(form) "<@<@@=@\n@ABGU\nBĉ\nDB" [tailmaker list form 1 cons state] 3] bq-evalnil #[(form) "C‰" [form tailmaker list state] 2] bq-splicecons #[(form) "\n@\nA@EDÉ" [form cons tailmaker append state] 4] bq-splicequote #[(form) "\nDDÉ" [form quote tailmaker append state] 3] bq-splicelist #[(form) "\nBDÉ" [form list tailmaker append state] 3] bq-spliceappend #[(form) " B" [form tailmaker] 2] bq-splicenil #[(form) "\nC" [append state form tailmaker] 2] provide backquote] 2)