From 4ded1ddb2228f9c392b114ea6a18c7b375e4ac90 Mon Sep 17 00:00:00 2001 From: Stefan Monnier Date: Mon, 12 May 2008 01:45:41 +0000 Subject: [PATCH] (cl-set-nthcdr): Make it a defsubst so that (setf (nthcdr ..) ..) doesn't require CL at runtime. --- lisp/ChangeLog | 5 +++++ lisp/emacs-lisp/cl.el | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 0993ffcd7a5..f91b20804ed 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2008-05-12 Stefan Monnier + + * emacs-lisp/cl.el (cl-set-nthcdr): Make it a defsubst so that + (setf (nthcdr ..) ..) doesn't require CL at runtime. + 2008-05-11 Carsten Dominik * org/org.el (org-modules): Repair problems with loading diff --git a/lisp/emacs-lisp/cl.el b/lisp/emacs-lisp/cl.el index 2a179a5e1db..c03c91d76fa 100644 --- a/lisp/emacs-lisp/cl.el +++ b/lisp/emacs-lisp/cl.el @@ -166,7 +166,7 @@ an element already on the list. (defun cl-set-elt (seq n val) (if (listp seq) (setcar (nthcdr n seq) val) (aset seq n val))) -(defun cl-set-nthcdr (n list x) +(defsubst cl-set-nthcdr (n list x) (if (<= n 0) x (setcdr (nthcdr (1- n) list) x) list)) (defun cl-set-buffer-substring (start end val) -- 2.39.5