Paste number 47420: style warning for a defun

Paste number 47420: style warning for a defun
Pasted by: kiuma
When:1 year, 9 months ago
Share:Tweet this! | http://paste.lisp.org/+10L8
Channel:#lisp
Paste contents:
Raw Source | XML | Display As
(defmacro transform-tag (tag-symbol tagname empty)
  (once-only (tagname empty)
    `(defun ,tag-symbol (&key attr)
       (make-instance 'tag 
		      :tagname ,tagname
		      :empty ,empty
		      :attr attr))))

(defun generate-tags (empty &rest body)
  ;Each string is concatenated to '>', so for example the exported symbol   
  ;for string "div" will be div>. Then for each of this symbol a function
  ;that creates an instance of etag class is defined
  (dolist (tag body)
    (let ((tag-name (string-downcase (eval tag)))
	   (tag-symbol (intern (format nil "~a~a" (string-upcase (eval tag)) ">"))))      
      (transform-tag tag-symbol tag-name empty))))

---------------------------------------------------------------------

; file: /home/kiuma/lispWks/cl-webobjects/src/tags.lisp
; in: DEFUN GENERATE-TAGS
;     (LET ((CL-WEBOBJECTS::TAG-NAME (STRING-DOWNCASE (EVAL CL-WEBOBJECTS:TAG)))
;         (CL-WEBOBJECTS::TAG-SYMBOL (INTERN (FORMAT NIL "~a~a" # ">"))))
;     (CL-WEBOBJECTS::TRANSFORM-TAG CL-WEBOBJECTS::TAG-SYMBOL
;                                   CL-WEBOBJECTS::TAG-NAME CL-WEBOBJECTS::EMPTY))
; 
; caught STYLE-WARNING:
;   The variable TAG-SYMBOL is defined but never used.


but when I call (generate-tags t "a" "div" ...) it works. so what's this warning about?

This paste has no annotations.

Colorize as:
Show Line Numbers

Lisppaste pastes can be made by anyone at any time. Imagine a fearsomely comprehensive disclaimer of liability. Now fear, comprehensively.