(defun riece-insert-struct-template (prefix struct)
- (interactive "sPrefix:
-sStruct: ")
+ (interactive "sPrefix: \nsStruct: ")
(let (attributes
optional-attributes
name
arglist
strings
(index 0))
+ (if (and prefix
+ (not (string-match "-\\'" prefix)))
+ (setq prefix (concat prefix "-")))
(catch 'finish
(while t
(setq name (read-from-minibuffer "Attribute: "))
optional-attributes " "))))
(setq strings (list (format "\
\(defun %smake-%s (%s)
- \"Make a %s%s object.\"
+ \"Make %s%s object.\"
(vector %s))"
prefix struct arglist
prefix struct