summaryrefslogtreecommitdiff
path: root/lisp/emacs-lisp/backquote.el
diff options
context:
space:
mode:
authorKaroly Lorentey <lorentey@elte.hu>2004-03-25 22:21:45 +0000
committerKaroly Lorentey <lorentey@elte.hu>2004-03-25 22:21:45 +0000
commit945c3bbb15ab1af18e94ab6f81e9c72c8ce1402f (patch)
tree05e55d5c123e596a9ce2b3faa4f0cdd4c60da06b /lisp/emacs-lisp/backquote.el
parent628ef544965db216898fbded4baac86343312a11 (diff)
parentabdb9b8306ccc3dc1d0603017466c023f09b9228 (diff)
downloademacs-945c3bbb15ab1af18e94ab6f81e9c72c8ce1402f.tar.gz
emacs-945c3bbb15ab1af18e94ab6f81e9c72c8ce1402f.tar.bz2
emacs-945c3bbb15ab1af18e94ab6f81e9c72c8ce1402f.zip
Merged in changes from CVS HEAD
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-161 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-162 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-163 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-164 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-165 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-166 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-167 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-168 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-169 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-170 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-171 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-172 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-122
Diffstat (limited to 'lisp/emacs-lisp/backquote.el')
-rw-r--r--lisp/emacs-lisp/backquote.el10
1 files changed, 8 insertions, 2 deletions
diff --git a/lisp/emacs-lisp/backquote.el b/lisp/emacs-lisp/backquote.el
index 81e1a91f76c..6a2baeb3fe9 100644
--- a/lisp/emacs-lisp/backquote.el
+++ b/lisp/emacs-lisp/backquote.el
@@ -1,6 +1,6 @@
;;; backquote.el --- implement the ` Lisp construct
-;;; Copyright (C) 1990, 1992, 1994, 2001 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 92, 1994, 2001, 2004 Free Software Foundation, Inc.
;; Author: Rick Sladkey <jrs@world.std.com>
;; Maintainer: FSF
@@ -44,6 +44,9 @@
"Like `list' but the last argument is the tail of the new list.
For example (backquote-list* 'a 'b 'c) => (a b . c)"
+ ;; The recursive solution is much nicer:
+ ;; (if list (cons first (apply 'backquote-list*-function list)) first))
+ ;; but Emacs is not very good at efficiently processing recursion.
(if list
(let* ((rest list) (newlist (cons first nil)) (last newlist))
(while (cdr rest)
@@ -58,7 +61,10 @@ For example (backquote-list* 'a 'b 'c) => (a b . c)"
"Like `list' but the last argument is the tail of the new list.
For example (backquote-list* 'a 'b 'c) => (a b . c)"
- (setq list (reverse (cons first list))
+ ;; The recursive solution is much nicer:
+ ;; (if list (list 'cons first (cons 'backquote-list*-macro list)) first))
+ ;; but Emacs is not very good at efficiently processing such things.
+ (setq list (nreverse (cons first list))
first (car list)
list (cdr list))
(if list