comparison lisp/frame.el @ 64201:43f2b7f50a25

(blink-cursor-mode): Use `custom-initialize-safe-default' and simplify :init-value.
author Luc Teirlinck <teirllm@auburn.edu>
date Sun, 10 Jul 2005 16:36:04 +0000
parents 6fb026ad601f
children f83907a4c795
comparison
equal deleted inserted replaced
64200:25277c60733f 64201:43f2b7f50a25
1254 (defvar blink-cursor-timer nil 1254 (defvar blink-cursor-timer nil
1255 "Timer started from `blink-cursor-start'. 1255 "Timer started from `blink-cursor-start'.
1256 This timer calls `blink-cursor-timer-function' every 1256 This timer calls `blink-cursor-timer-function' every
1257 `blink-cursor-interval' seconds.") 1257 `blink-cursor-interval' seconds.")
1258 1258
1259 ;; We do not know the standard _evaluated_ value yet, because the standard
1260 ;; expression uses values that are not yet set. The correct evaluated
1261 ;; standard value will be installed in startup.el using exactly the same
1262 ;; expression as in the defcustom.
1263 (define-minor-mode blink-cursor-mode 1259 (define-minor-mode blink-cursor-mode
1264 "Toggle blinking cursor mode. 1260 "Toggle blinking cursor mode.
1265 With a numeric argument, turn blinking cursor mode on iff ARG is positive. 1261 With a numeric argument, turn blinking cursor mode on iff ARG is positive.
1266 When blinking cursor mode is enabled, the cursor of the selected 1262 When blinking cursor mode is enabled, the cursor of the selected
1267 window blinks. 1263 window blinks.
1268 1264
1269 Note that this command is effective only when Emacs 1265 Note that this command is effective only when Emacs
1270 displays through a window system, because then Emacs does its own 1266 displays through a window system, because then Emacs does its own
1271 cursor display. On a text-only terminal, this is not implemented." 1267 cursor display. On a text-only terminal, this is not implemented."
1272 :init-value (not (or noninteractive 1268 :init-value (not (or noninteractive
1273 (if (boundp 'no-blinking-cursor) no-blinking-cursor) 1269 no-blinking-cursor
1274 (eq system-type 'ms-dos) 1270 (eq system-type 'ms-dos)
1275 (not (memq window-system '(x w32))))) 1271 (not (memq window-system '(x w32)))))
1272 :initialize 'custom-initialize-safe-default
1276 :group 'cursor 1273 :group 'cursor
1277 :global t 1274 :global t
1278 (if blink-cursor-idle-timer (cancel-timer blink-cursor-idle-timer)) 1275 (if blink-cursor-idle-timer (cancel-timer blink-cursor-idle-timer))
1279 (if blink-cursor-timer (cancel-timer blink-cursor-timer)) 1276 (if blink-cursor-timer (cancel-timer blink-cursor-timer))
1280 (setq blink-cursor-idle-timer nil 1277 (setq blink-cursor-idle-timer nil