From: ueno Date: Fri, 18 Nov 2005 09:26:04 +0000 (+0000) Subject: * riece-lru.el (riece-lru-node-set-value): New function. X-Git-Tag: riece-2_0_2~17 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=211927aae1e694f1392571545eb05f15213d5774;p=elisp%2Friece.git * riece-lru.el (riece-lru-node-set-value): New function. (riece-lru-set): Use it. --- diff --git a/lisp/riece-lru.el b/lisp/riece-lru.el index c7d0daa..6c5cbbd 100644 --- a/lisp/riece-lru.el +++ b/lisp/riece-lru.el @@ -10,6 +10,10 @@ "Return value of NODE." (aref node 1)) +(defun riece-lru-node-set-value (node value) + "Set value of NODE to VALUE." + (aset node 1 value)) + (defun riece-lru-node-next (node) "Return next of NODE." (aref node 3)) @@ -112,10 +116,9 @@ (riece-lru-node-value node)))) (defun riece-lru-set (map key value) - (let ((node (riece-lru-get-node map key)) - symbol) + (let ((node (riece-lru-get-node map key))) (if node - (aset node 1 value) + (riece-lru-node-set-value node value) (if (>= (riece-lru-map-hash-length map) (riece-lru-map-max-length map)) (riece-lru-delete map (riece-lru-node-key