diff options
| author | Luc Teirlinck | 2005-02-12 17:58:37 +0000 |
|---|---|---|
| committer | Luc Teirlinck | 2005-02-12 17:58:37 +0000 |
| commit | a795e09a78dabe829220ec58d70b59302462db70 (patch) | |
| tree | 9ab1bee9d9bf029017007b14db70919e2bb53a52 | |
| parent | 4b52e77985b573d9f568a09d738ffa9237afabc4 (diff) | |
| download | emacs-a795e09a78dabe829220ec58d70b59302462db70.tar.gz emacs-a795e09a78dabe829220ec58d70b59302462db70.zip | |
(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.
| -rw-r--r-- | lisp/frame.el | 44 |
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.") | |||
| 1253 | 1253 | ||
| 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' every `blink-cursor-interval' seconds.") | 1256 | This timer calls `blink-cursor-timer-function' every |
| 1257 | `blink-cursor-interval' seconds.") | ||
| 1258 | |||
| 1259 | ;; The strange sequence below is meant to set both the right temporary | ||
| 1260 | ;; value and the right "standard expression" , according to Custom, | ||
| 1261 | ;; for blink-cursor-mode. We do not know the standard _evaluated_ | ||
| 1262 | ;; value yet, because the standard expression uses values that are not | ||
| 1263 | ;; yet set. Evaluating it now would yield an error, but we make sure | ||
| 1264 | ;; that it is not evaluated, by ensuring that blink-cursor-mode is set | ||
| 1265 | ;; before the defcustom is evaluated and by using the right :initialize | ||
| 1266 | ;; function. The correct evaluated standard value will be installed | ||
| 1267 | ;; in startup.el using exactly the same expression as in the defcustom. | ||
| 1268 | (defvar blink-cursor-mode) | ||
| 1269 | (unless (boundp 'blink-cursor-mode) (setq blink-cursor-mode nil)) | ||
| 1270 | (defcustom blink-cursor-mode | ||
| 1271 | (not (or noninteractive | ||
| 1272 | emacs-quick-startup | ||
| 1273 | (eq system-type 'ms-dos) | ||
| 1274 | (not (memq window-system '(x w32))))) | ||
| 1275 | "*Non-nil means Blinking Cursor mode is active." | ||
| 1276 | :group 'cursor | ||
| 1277 | :tag "Blinking cursor" | ||
| 1278 | :type 'boolean | ||
| 1279 | :initialize 'custom-initialize-set | ||
| 1280 | :set #'(lambda (symbol value) | ||
| 1281 | (set-default symbol value) | ||
| 1282 | (blink-cursor-mode (or value 0)))) | ||
| 1257 | 1283 | ||
| 1258 | (defvar blink-cursor-mode nil | 1284 | (defvaralias 'blink-cursor 'blink-cursor-mode) |
| 1259 | "Non-nil means blinking cursor is active.") | 1285 | (make-obsolete-variable 'blink-cursor 'blink-cursor-mode "22.1") |
| 1260 | 1286 | ||
| 1261 | (defun blink-cursor-mode (arg) | 1287 | (defun blink-cursor-mode (arg) |
| 1262 | "Toggle blinking cursor mode. | 1288 | "Toggle blinking cursor mode. |
| @@ -1289,18 +1315,6 @@ cursor display. On a text-only terminal, this is not implemented." | |||
| 1289 | (setq blink-cursor-mode t)) | 1315 | (setq blink-cursor-mode t)) |
| 1290 | (internal-show-cursor nil t)))) | 1316 | (internal-show-cursor nil t)))) |
| 1291 | 1317 | ||
| 1292 | ;; Note that this is really initialized from startup.el before | ||
| 1293 | ;; the init-file is read. | ||
| 1294 | |||
| 1295 | (defcustom blink-cursor nil | ||
| 1296 | "*Non-nil means blinking cursor mode is active." | ||
| 1297 | :group 'cursor | ||
| 1298 | :tag "Blinking cursor" | ||
| 1299 | :type 'boolean | ||
| 1300 | :set #'(lambda (symbol value) | ||
| 1301 | (set-default symbol value) | ||
| 1302 | (blink-cursor-mode (or value 0)))) | ||
| 1303 | |||
| 1304 | (defun blink-cursor-start () | 1318 | (defun blink-cursor-start () |
| 1305 | "Timer function called from the timer `blink-cursor-idle-timer'. | 1319 | "Timer function called from the timer `blink-cursor-idle-timer'. |
| 1306 | This starts the timer `blink-cursor-timer', which makes the cursor blink | 1320 | This starts the timer `blink-cursor-timer', which makes the cursor blink |