Mercurial > emacs
changeset 25570:564aae4ff7f0
Don't conditionally define caddr.
(quickurl-url-comment): Use nth, not caddr in
function and defsetf.
author | Dave Love <fx@gnu.org> |
---|---|
date | Mon, 06 Sep 1999 21:20:57 +0000 |
parents | fcdaa4081df4 |
children | 86658a5ab908 |
files | lisp/quickurl.el |
diffstat | 1 files changed, 2 insertions(+), 13 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/quickurl.el Mon Sep 06 19:49:33 1999 +0000 +++ b/lisp/quickurl.el Mon Sep 06 21:20:57 1999 +0000 @@ -98,17 +98,6 @@ (defmacro defcustom (symbol init docstring &rest rest) `(defvar ,symbol ,init ,docstring)))) -;; `caddr' is a function in cl and so might not always be available -;; (remembering the general rule that says cl functions should not be used, -;; only cl macros). So, to make use of `caddr' without forcing the load of -;; cl-seq we'll define our own. - -(eval-when (load eval) - (unless (fboundp 'caddr) - (defun caddr (l) - "Return the `car' of the `cddr' of L." - (car (cddr l))))) - ;; Customize options. (defgroup quickurl nil @@ -238,7 +227,7 @@ If the URL has no comment an empty string is returned. Also note that this function is a setfable place." (if (quickurl-url-commented-p url) - (caddr url) + (nth 2 url) "")) (defsetf quickurl-url-comment (url) (store) @@ -246,7 +235,7 @@ (if (quickurl-url-commented-p ,url) (if (zerop (length ,store)) (setf (cdr ,url) (cadr ,url)) - (setf (caddr ,url) ,store)) + (setf (nth 2 ,url) ,store)) (unless (zerop (length ,store)) (setf (cdr ,url) (list (cdr ,url) ,store)))))