2 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
4 ;; MODULE : init-mutator.scm
5 ;; DESCRIPTION : Initialize the 'mutator' plugin
6 ;; COPYRIGHT : (C) 2004 Joris van der Hoeven
8 ;; This software falls under the GNU general public license version 3 or later.
9 ;; It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
10 ;; in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
12 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
14 (use-modules (utils library tree))
16 (tm-define (mutate-date)
19 (tree-set! t (var-eval-system "date +\"%H:%M:%S\""))))
21 (tm-define (mutate-blink)
24 (let* ((mod (lambda (x y) (* y (- (/ x y) (floor (/ x y))))))
25 (s (string->number (var-eval-system "date +\"%S\"")))
27 (if (and (<= e 1) (not (match? t '(strong :%1))))
28 (tree-set! t `(strong ,t)))
29 (if (and (>= e 2) (match? t '(strong :%1)))
30 (tree-set! t (tree-ref t 0))))))
33 ("C-F11" (insert '(mutator "" "(mutate-date)")))
34 ("C-F12" (insert-go-to '(mutator "text" "(mutate-blink)") '(0 4))))
36 (plugin-configure mutator