From 211927aae1e694f1392571545eb05f15213d5774 Mon Sep 17 00:00:00 2001 From: ueno Date: Fri, 18 Nov 2005 09:26:04 +0000 Subject: [PATCH] * riece-lru.el (riece-lru-node-set-value): New function. (riece-lru-set): Use it. --- lisp/riece-lru.el | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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 -- 1.7.10.4