help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: power-reader-mode


From: Marco Parrone
Subject: Re: power-reader-mode
Date: Fri, 13 Feb 2004 02:26:09 +0100
User-agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux)

I wrote:

> This should work.

(setq flash-training-sit-for-seconds 0)
(setq flash-training-sit-for-milliseconds 15)

(defun flash-training (begin end)
  "Reading exercise."
  (interactive "r")
  (get-buffer-create "*flash-training-temp*")
  (get-buffer-create "*flash-training*")
  (let ((string (buffer-substring begin end)))
    (with-current-buffer "*flash-training-temp*"
      (kill-region (point-min) (point-max))
      (insert string)
      (beginning-of-buffer)
      (set-mark (point))))
  (with-current-buffer "*flash-training*"
    (kill-region (point-min) (point-max))
    (switch-to-buffer "*flash-training*")
    (while (with-current-buffer "*flash-training-temp*"
             (forward-word 1))
      (with-current-buffer "*flash-training-temp*"
        (kill-region (region-beginning) (region-end)))
      (yank)
      (sit-for flash-training-sit-for-seconds
               flash-training-sit-for-milliseconds)))
  (kill-buffer "*flash-training-temp*")
  (message "Type C-x b RET to restore this window."))

-- 
Marco Parrone - address@hidden - 0x45070AD6


reply via email to

[Prev in Thread] Current Thread [Next in Thread]