[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
More about blink-cursor-mode
From: |
Luc Teirlinck |
Subject: |
More about blink-cursor-mode |
Date: |
Sat, 19 Feb 2005 19:55:43 -0600 (CST) |
The following patch contains two proposed changes to frame.el. I can
install either one or both changes.
The first change is, I believe, necessary. The docstring of
`blink-cursor-mode' has to tell that one should not try to set the
variable directly.
I do not know about the other change. If setting blink-cursor-mode
buffer locally would make any sense, the code in front of the
defcustom should use default-boundp and setq-default. But
`blink-cursor-mode' never should have a buffer local value. If we use
default-setq in front of the defcustom, then it would be consequent to
use it in the function `blink-cursor-mode' too, for consistency with
the code in startup.el. I do not know whether any of this really
matters anyway. It is a purely stylistic issue for this particular
variable. Maybe we could just keep the current code.
There still is the issue with the effect of the earlier `blink-cursor'
change on Custom, which I pointed out in a separate posting. That
problem is more general, however.
===File ~/frame.el-diff=====================================
*** frame.el 12 Feb 2005 11:14:04 -0600 1.216
--- frame.el 19 Feb 2005 19:33:14 -0600
***************
*** 1266,1278 ****
;; function. The correct evaluated standard value will be installed
;; in startup.el using exactly the same expression as in the defcustom.
(defvar blink-cursor-mode)
! (unless (boundp 'blink-cursor-mode) (setq blink-cursor-mode nil))
(defcustom blink-cursor-mode
(not (or noninteractive
emacs-quick-startup
(eq system-type 'ms-dos)
(not (memq window-system '(x w32)))))
! "*Non-nil means Blinking Cursor mode is active."
:group 'cursor
:tag "Blinking cursor"
:type 'boolean
--- 1266,1281 ----
;; function. The correct evaluated standard value will be installed
;; in startup.el using exactly the same expression as in the defcustom.
(defvar blink-cursor-mode)
! (unless (default-boundp 'blink-cursor-mode)
! (setq-default blink-cursor-mode nil))
(defcustom blink-cursor-mode
(not (or noninteractive
emacs-quick-startup
(eq system-type 'ms-dos)
(not (memq window-system '(x w32)))))
! "*Non-nil means Blinking Cursor mode is active.
! Do not set this variable directly. It would confuse Emacs.
! Either set it through Custom or use the command `blink-cursor-mode'."
:group 'cursor
:tag "Blinking cursor"
:type 'boolean
***************
*** 1302,1318 ****
(if blink-cursor-timer
(cancel-timer blink-cursor-timer))
(setq blink-cursor-idle-timer nil
! blink-cursor-timer nil
! blink-cursor-mode nil)
(if on-p
(progn
;; Hide the cursor.
! ;(internal-show-cursor nil nil)
(setq blink-cursor-idle-timer
(run-with-idle-timer blink-cursor-delay
blink-cursor-delay
'blink-cursor-start))
! (setq blink-cursor-mode t))
(internal-show-cursor nil t))))
(defun blink-cursor-start ()
--- 1305,1321 ----
(if blink-cursor-timer
(cancel-timer blink-cursor-timer))
(setq blink-cursor-idle-timer nil
! blink-cursor-timer nil)
! (setq-default blink-cursor-mode nil)
(if on-p
(progn
;; Hide the cursor.
! ;; (internal-show-cursor nil nil)
(setq blink-cursor-idle-timer
(run-with-idle-timer blink-cursor-delay
blink-cursor-delay
'blink-cursor-start))
! (setq-default blink-cursor-mode t))
(internal-show-cursor nil t))))
(defun blink-cursor-start ()
============================================================
Re: More about blink-cursor-mode, Richard Stallman, 2005/02/21