changeset 26332:37f66ea5d1a1

* frame.el (blink-cursor-mode, blink-cursor-end): Use internal-show-cursor with new interface. (blink-cursor-timer-function): New. (blink-cursor-start): Use blink-cursor-timer-function.
author Gerd Moellmann <gerd@gnu.org>
date Wed, 03 Nov 1999 15:56:19 +0000
parents 5158100a609c
children a7f4d6e2b96f
files lisp/frame.el
diffstat 1 files changed, 7 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/frame.el	Wed Nov 03 15:10:21 1999 +0000
+++ b/lisp/frame.el	Wed Nov 03 15:56:19 1999 +0000
@@ -838,7 +838,7 @@
     (if on-p
 	(progn
 	  ;; Hide the cursor.
-	  (internal-show-cursor 0)
+	  (internal-show-cursor nil nil)
 	  (setq blink-cursor-idle-timer
 		(run-with-idle-timer blink-cursor-delay
 				     blink-cursor-delay
@@ -863,7 +863,11 @@
     (add-hook 'pre-command-hook 'blink-cursor-end)
     (setq blink-cursor-timer
 	  (run-with-timer blink-cursor-interval blink-cursor-interval
-			  'internal-show-cursor))))
+			  'blink-cursor-timer-function))))
+
+(defun blink-cursor-timer-function ()
+  "Timer function of timer `blink-cursor-timer'."
+  (internal-show-cursor nil (not (internal-show-cursor-p))))
 
 (defun blink-cursor-end ()
   "Stop cursor blinking.
@@ -871,7 +875,7 @@
 When run, it cancels the timer `blink-cursor-timer' and removes 
 itself as a pre-command hook."
   (remove-hook 'pre-command-hook 'blink-cursor-end)
-  (internal-show-cursor 0)
+  (internal-show-cursor nil t)
   (cancel-timer blink-cursor-timer)
   (setq blink-cursor-timer nil))