HCoop
/
bpt
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
d370591
)
(last): New function.
author
Richard M. Stallman
<rms@gnu.org>
Sat, 23 Aug 1997 19:10:42 +0000
(19:10 +0000)
committer
Richard M. Stallman
<rms@gnu.org>
Sat, 23 Aug 1997 19:10:42 +0000
(19:10 +0000)
lisp/subr.el
patch
|
blob
|
blame
|
history
diff --git
a/lisp/subr.el
b/lisp/subr.el
index
a93cd3f
..
513a63a
100644
(file)
--- a/
lisp/subr.el
+++ b/
lisp/subr.el
@@
-78,6
+78,13
@@
BODY should be a list of lisp expressions."
(defsubst cddr (x)
"Return the cdr of the cdr of X."
(cdr (cdr x)))
+
+(defun last (x)
+ "Return the last element of the list X.
+If X is nil, return nil."
+ (while (cdr x)
+ (setq x (cdr x)))
+ x)
\f
;;;; Keymap support.