From f529361ccae1f13ccb8b32fb9337c6c6823ee25a Mon Sep 17 00:00:00 2001 From: ram <ram> Date: Tue, 11 Dec 1990 14:36:14 +0000 Subject: [PATCH] In NEW-CACHE-ATTRIBUTE, moved the error check earlier so that we do it before we bogue out with a type error. --- hemlock/syntax.lisp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hemlock/syntax.lisp b/hemlock/syntax.lisp index 5fe83e0a4..55764c09c 100644 --- a/hemlock/syntax.lisp +++ b/hemlock/syntax.lisp @@ -164,12 +164,12 @@ ;;; (defun new-cache-attribute (attribute function) (let* ((hash (hash-it attribute function)) - (values (gethash attribute *character-attributes*)) + (values (or (gethash attribute *character-attributes*) + (error "~S is not a defined character attribute." + attribute))) (bucket (svref *character-attribute-cache* hash)) (bit (nthcdr (- character-attribute-bucket-size 2) bucket)) (end-wins (funcall function (attribute-descriptor-end-value values)))) - (unless values - (error "~S is not a defined character attribute." attribute)) (shiftf bit (cdr bit) nil) (setf (svref *character-attribute-cache* hash) bit (cdr bit) bucket bit (car bit)) -- GitLab