Mercurial > emacs
comparison lisp/tempo.el @ 27684:db5b16cdb88d
(tempo-dolist, tempo-mapc): Removed.
(tempo-process-and-insert-string): Use dolist instead of
tempo-dolist.
author | Gerd Moellmann <gerd@gnu.org> |
---|---|
date | Sat, 12 Feb 2000 19:46:42 +0000 |
parents | cbe304a26771 |
children | 58e2bb13d72e |
comparison
equal
deleted
inserted
replaced
27683:9ccf5aad8bcf | 27684:db5b16cdb88d |
---|---|
215 (make-variable-buffer-local 'tempo-match-finder) | 215 (make-variable-buffer-local 'tempo-match-finder) |
216 (make-variable-buffer-local 'tempo-collection) | 216 (make-variable-buffer-local 'tempo-collection) |
217 (make-variable-buffer-local 'tempo-dirty-collection) | 217 (make-variable-buffer-local 'tempo-dirty-collection) |
218 | 218 |
219 ;;; Functions | 219 ;;; Functions |
220 | |
221 ;;; First some useful functions and macros | |
222 | |
223 (defun tempo-mapc (fun lst) | |
224 (if (null lst) nil | |
225 (funcall fun (car lst)) | |
226 (tempo-mapc fun (cdr lst)))) | |
227 | |
228 (defmacro tempo-dolist (il &rest forms) | |
229 (let ((i (car il)) | |
230 (l (car (cdr il)))) | |
231 (list 'tempo-mapc | |
232 (list 'function (append (list 'lambda | |
233 (list i)) | |
234 forms)) | |
235 l))) | |
236 (put 'tempo-dolist 'lisp-indent-function 1) | |
237 | 220 |
238 ;; | 221 ;; |
239 ;; tempo-define-template | 222 ;; tempo-define-template |
240 | 223 |
241 (defun tempo-define-template (name elements &optional tag documentation taglist) | 224 (defun tempo-define-template (name elements &optional tag documentation taglist) |
537 nil) | 520 nil) |
538 ((symbolp tempo-insert-string-functions) | 521 ((symbolp tempo-insert-string-functions) |
539 (setq string | 522 (setq string |
540 (funcall tempo-insert-string-functions string))) | 523 (funcall tempo-insert-string-functions string))) |
541 ((listp tempo-insert-string-functions) | 524 ((listp tempo-insert-string-functions) |
542 (tempo-dolist (fn tempo-insert-string-functions) | 525 (dolist (fn tempo-insert-string-functions) |
543 (setq string (funcall fn string)))) | 526 (setq string (funcall fn string)))) |
544 (t | 527 (t |
545 (error "Bogus value in tempo-insert-string-functions: %s" | 528 (error "Bogus value in tempo-insert-string-functions: %s" |
546 tempo-insert-string-functions))) | 529 tempo-insert-string-functions))) |
547 (insert string)) | 530 (insert string)) |