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

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

why is this function not instantaneous?


From: B. T. Raven
Subject: why is this function not instantaneous?
Date: Tue, 19 Mar 2013 15:04:35 -0500
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1

A few months ago I somehow misplaced the original of this function:


(defun copy-to-other-window (beg end)  ;; bind to f8
  "Copy region text to buffer in other window\n"
  (interactive "r")
(if (not (use-region-p))
  (progn
    (backward-word)
     (let ((beg (point))) (forward-word) (copy-region-as-kill \
         beg (point)))
   ))
(other-window 1)
  (yank)
)

The earlier version worked with no extraneous disk activity going on.
This version bogs down for 2, 3, or 4 seconds while showing the Windows
7 whirly disk. If transient mark mode is inactive, the "if" form makes a
region out of the word where the cursor is at or inside of. Does any of
you know what this little function would look like if I knew what I were
doing?

Thanks,

Ed


reply via email to

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