• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10.1/emacs-93/emacs/lisp/emacs-lisp/

Lines Matching defs:list

33 ;; This backquote will generate calls to the backquote-list* form.
42 ;; function and macro versions of backquote-list*
44 (defun backquote-list*-function (first &rest list)
45 "Like `list' but the last argument is the tail of the new list.
47 For example (backquote-list* 'a 'b 'c) => (a b . c)"
49 ;; (if list (cons first (apply 'backquote-list*-function list)) first))
51 (if list
52 (let* ((rest list) (newlist (cons first nil)) (last newlist))
61 (defmacro backquote-list*-macro (first &rest list)
62 "Like `list' but the last argument is the tail of the new list.
64 For example (backquote-list* 'a 'b 'c) => (a b . c)"
66 ;; (if list (list 'cons first (cons 'backquote-list*-macro list)) first))
68 (setq list (nreverse (cons first list))
69 first (car list)
70 list (cdr list))
71 (if list
72 (let* ((second (car list))
73 (rest (cdr list))
74 (newlist (list 'cons second first)))
76 (setq newlist (list 'cons (car rest) newlist)
81 (defalias 'backquote-list* (symbol-function 'backquote-list*-macro))
129 (list 'vconcat (cdr n)))
130 ((eq (nth 1 n) 'list)
135 (list 'apply '(function vector) (cdr n))))))))
139 (list 'quote s))))
148 item firstlist list lists expression)
149 ;; Scan this list-level, setting LISTS to a list of forms,
150 ;; each of which produces a list of elements
155 ;; as a list of tagged values (TAG . FORM).
160 (setq rest (list (list backquote-splice-symbol (nth 1 rest)))))
167 (setq firstlist list
168 list nil))
170 (if list
171 (setq lists (cons (backquote-listify list '(0 . nil)) lists)))
173 (setq list nil))
175 (setq list (cons item list))))
177 ;; Handle nonsplicing final elements, and the tail of the list
179 (if (or rest list)
180 (setq lists (cons (backquote-listify list (backquote-process rest))
182 ;; Turn LISTS into a form that produces the combined list.
192 (cons 0 (list 'quote s))
196 ;; and decides between append, list, backquote-list*, and cons depending
197 ;; on which tags are in the list.
199 (defun backquote-listify (list old-tail)
200 (let ((heads nil) (tail (cdr old-tail)) (list-tail list) (item nil))
204 (while (consp list-tail)
205 (setq item (car list-tail))
206 (setq list-tail (cdr list-tail))
213 (setq tail (list 'quote tail)))
215 (let ((use-list* (or (cdr heads)
219 (cons (if use-list* 'backquote-list* 'cons)
220 (append heads (list tail))))
222 (t (cons 'list heads)))))