emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] Changes to emacs/lisp/frame.el,v


From: Chong Yidong
Subject: [Emacs-diffs] Changes to emacs/lisp/frame.el,v
Date: Sun, 20 Aug 2006 14:43:30 +0000

CVSROOT:        /sources/emacs
Module name:    emacs
Changes by:     Chong Yidong <cyd>      06/08/20 14:43:29

Index: frame.el
===================================================================
RCS file: /sources/emacs/emacs/lisp/frame.el,v
retrieving revision 1.237
retrieving revision 1.238
diff -u -b -r1.237 -r1.238
--- frame.el    21 Jul 2006 07:42:52 -0000      1.237
+++ frame.el    20 Aug 2006 14:43:29 -0000      1.238
@@ -1291,11 +1291,13 @@
 if appropriate.  It also arranges to cancel that timer when the next
 command starts, by installing a pre-command hook."
   (when (null blink-cursor-timer)
-    (add-hook 'pre-command-hook 'blink-cursor-end)
-    (internal-show-cursor nil nil)
+    ;; Set up the timer first, so that if this signals an error,
+    ;; blink-cursor-end is not added to pre-command-hook.
     (setq blink-cursor-timer
          (run-with-timer blink-cursor-interval blink-cursor-interval
-                         'blink-cursor-timer-function))))
+                         'blink-cursor-timer-function))
+    (add-hook 'pre-command-hook 'blink-cursor-end)
+    (internal-show-cursor nil nil)))
 
 (defun blink-cursor-timer-function ()
   "Timer function of timer `blink-cursor-timer'."
@@ -1308,11 +1310,12 @@
 itself as a pre-command hook."
   (remove-hook 'pre-command-hook 'blink-cursor-end)
   (internal-show-cursor nil t)
+  (condition-case nil
   (cancel-timer blink-cursor-timer)
+    (error nil))
   (setq blink-cursor-timer nil))
 
 
-
 ;; Hourglass pointer
 
 (defcustom display-hourglass t




reply via email to

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