From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Luc Teirlinck Newsgroups: gmane.emacs.devel Subject: More about blink-cursor-mode Date: Sat, 19 Feb 2005 19:55:43 -0600 (CST) Message-ID: <200502200155.j1K1thb29289@raven.dms.auburn.edu> NNTP-Posting-Host: main.gmane.org X-Trace: sea.gmane.org 1108865297 4232 80.91.229.2 (20 Feb 2005 02:08:17 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sun, 20 Feb 2005 02:08:17 +0000 (UTC) Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Feb 20 03:08:17 2005 Original-Received: from lists.gnu.org ([199.232.76.165]) by ciao.gmane.org with esmtp (Exim 4.43) id 1D2gW4-0005eU-5I for ged-emacs-devel@m.gmane.org; Sun, 20 Feb 2005 03:08:12 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D2gmi-0006iX-TJ for ged-emacs-devel@m.gmane.org; Sat, 19 Feb 2005 21:25:24 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1D2gmA-0006cH-3o for emacs-devel@gnu.org; Sat, 19 Feb 2005 21:24:50 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1D2gm2-0006XV-Ja for emacs-devel@gnu.org; Sat, 19 Feb 2005 21:24:43 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1D2gm2-0006WP-7a for emacs-devel@gnu.org; Sat, 19 Feb 2005 21:24:42 -0500 Original-Received: from [131.204.53.104] (helo=manatee.dms.auburn.edu) by monty-python.gnu.org with esmtp (Exim 4.34) id 1D2gLt-0005SK-Ol for emacs-devel@gnu.org; Sat, 19 Feb 2005 20:57:41 -0500 Original-Received: from raven.dms.auburn.edu (raven.dms.auburn.edu [131.204.53.29]) by manatee.dms.auburn.edu (8.12.10/8.12.10) with ESMTP id j1K1vf9N007911 for ; Sat, 19 Feb 2005 19:57:41 -0600 (CST) Original-Received: (from teirllm@localhost) by raven.dms.auburn.edu (8.11.7p1+Sun/8.11.7) id j1K1thb29289; Sat, 19 Feb 2005 19:55:43 -0600 (CST) X-Authentication-Warning: raven.dms.auburn.edu: teirllm set sender to teirllm@dms.auburn.edu using -f Original-To: emacs-devel@gnu.org X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org X-MailScanner-To: ged-emacs-devel@m.gmane.org Xref: main.gmane.org gmane.emacs.devel:33641 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:33641 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 () ============================================================