summaryrefslogtreecommitdiff
path: root/lisp/frame.el
diff options
context:
space:
mode:
authorLuc Teirlinck <teirllm@auburn.edu>2005-02-12 17:58:37 +0000
committerLuc Teirlinck <teirllm@auburn.edu>2005-02-12 17:58:37 +0000
commit4a1e8b261ee39bc1afbdb115a9d5dec66f3bccb0 (patch)
tree0bb4f1e686c83449f5cbeda2ce9750029eb0e3fd /lisp/frame.el
parent81f11072b1e5f9d25b0b3f7beb15470b068f4e99 (diff)
downloademacs-4a1e8b261ee39bc1afbdb115a9d5dec66f3bccb0.tar.gz
(blink-cursor-timer): Doc fix.
(blink-cursor-mode): Use correct standard expression in defcustom. (blink-cursor): Make it an alias for `blink-cursor-mode' and declare obsolete.
Diffstat (limited to 'lisp/frame.el')
-rw-r--r--lisp/frame.el44
1 files changed, 29 insertions, 15 deletions
diff --git a/lisp/frame.el b/lisp/frame.el
index 30ea94cde0f..2aff4860cf3 100644
--- a/lisp/frame.el
+++ b/lisp/frame.el
@@ -1253,10 +1253,36 @@ The function `blink-cursor-start' is called when the timer fires.")
(defvar blink-cursor-timer nil
"Timer started from `blink-cursor-start'.
-This timer calls `blink-cursor' every `blink-cursor-interval' seconds.")
+This timer calls `blink-cursor-timer-function' every
+`blink-cursor-interval' seconds.")
+
+;; The strange sequence below is meant to set both the right temporary
+;; value and the right "standard expression" , according to Custom,
+;; for blink-cursor-mode. We do not know the standard _evaluated_
+;; value yet, because the standard expression uses values that are not
+;; yet set. Evaluating it now would yield an error, but we make sure
+;; that it is not evaluated, by ensuring that blink-cursor-mode is set
+;; before the defcustom is evaluated and by using the right :initialize
+;; 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
+ :initialize 'custom-initialize-set
+ :set #'(lambda (symbol value)
+ (set-default symbol value)
+ (blink-cursor-mode (or value 0))))
-(defvar blink-cursor-mode nil
- "Non-nil means blinking cursor is active.")
+(defvaralias 'blink-cursor 'blink-cursor-mode)
+(make-obsolete-variable 'blink-cursor 'blink-cursor-mode "22.1")
(defun blink-cursor-mode (arg)
"Toggle blinking cursor mode.
@@ -1289,18 +1315,6 @@ cursor display. On a text-only terminal, this is not implemented."
(setq blink-cursor-mode t))
(internal-show-cursor nil t))))
-;; Note that this is really initialized from startup.el before
-;; the init-file is read.
-
-(defcustom blink-cursor nil
- "*Non-nil means blinking cursor mode is active."
- :group 'cursor
- :tag "Blinking cursor"
- :type 'boolean
- :set #'(lambda (symbol value)
- (set-default symbol value)
- (blink-cursor-mode (or value 0))))
-
(defun blink-cursor-start ()
"Timer function called from the timer `blink-cursor-idle-timer'.
This starts the timer `blink-cursor-timer', which makes the cursor blink