Permalink
Browse files

[#13306] Defer construction of the inflections list at evaluation

The define-inflectors macro use to compute the
inflection-uncountables, inflection-irregulars and others at compile
time, doing nothing of the result. We now defer this evaluation at
evaluation time.
  • Loading branch information...
1 parent f2c4f8f commit e6de74aee55710ee9090ab52df3db6487a2631d4 @vanicat vanicat committed Apr 29, 2008
Showing with 8 additions and 7 deletions.
  1. +8 −7 inflections.el
View
@@ -33,13 +33,14 @@
(defvar inflection-uncountables nil)
(defmacro define-inflectors (&rest specs)
- (loop for (type . rest) in specs do
- (case type
- (:singular (push rest inflection-singulars))
- (:plural (push rest inflection-plurals))
- (:irregular (push rest inflection-irregulars))
- (:uncountable (setf inflection-uncountables
- (append rest inflection-uncountables))))))
+ `(progn
+ ,@(loop for (type . rest) in specs collect
+ (case type
+ (:singular `(push ',rest inflection-singulars))
+ (:plural `(push ',rest inflection-plurals))
+ (:irregular `(push ',rest inflection-irregulars))
+ (:uncountable `(setf inflection-uncountables
+ (append ',rest inflection-uncountables)))))))
(define-inflectors
(:plural "$" "s")

0 comments on commit e6de74a

Please sign in to comment.