all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* More about blink-cursor-mode
@ 2005-02-20  1:55 Luc Teirlinck
  2005-02-20 21:38 ` Stefan
  2005-02-21 10:21 ` Richard Stallman
  0 siblings, 2 replies; 11+ messages in thread
From: Luc Teirlinck @ 2005-02-20  1:55 UTC (permalink / raw)


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 ()
============================================================

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2005-02-23  4:23 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-20  1:55 More about blink-cursor-mode Luc Teirlinck
2005-02-20 21:38 ` Stefan
2005-02-21  3:27   ` Luc Teirlinck
2005-02-22  1:24   ` Luc Teirlinck
2005-02-22 13:52     ` Stefan Monnier
2005-02-23  2:53       ` Luc Teirlinck
2005-02-23  4:23         ` Stefan Monnier
2005-02-22  1:37   ` Luc Teirlinck
2005-02-22 13:54     ` Stefan Monnier
2005-02-22  8:42   ` Richard Stallman
2005-02-21 10:21 ` Richard Stallman

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.