comparison lisp/frame.el @ 90106:bf0d492ea2d5

Revision: miles@gnu.org--gnu-2005/emacs--unicode--0--patch-16 Merge from emacs--cvs-trunk--0 Patches applied: * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-106 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-110 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-111 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-112 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-113 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-114 <no summary provided> * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-115 - miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-123 Update from CVS * miles@gnu.org--gnu-2005/emacs--cvs-trunk--0--patch-124 Merge from gnus--rel--5.10 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-17 - miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-19 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-20 Merge from emacs--cvs-trunk--0 * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-21 More work on moving images to etc/images * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-22 Update from CVS * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-23 Fix errors with image-file installation * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-24 etc/Makefile.in (install): Put gnus-tut.txt in the right place. * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-25 etc/Makefile.in (install, uninstall): Fix installed image dirs. * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-26 etc/Makefile.in (install): Create $(etcdir)/images/gnus dir. * miles@gnu.org--gnu-2005/gnus--rel--5.10--patch-27 Update from CVS
author Miles Bader <miles@gnu.org>
date Wed, 23 Feb 2005 09:18:23 +0000
parents 3ebd9bdb4fe5 261ebd199f28
children bbc2e661b93c
comparison
equal deleted inserted replaced
90105:7e3f621f1dd4 90106:bf0d492ea2d5
1 ;;; frame.el --- multi-frame management independent of window systems 1 ;;; frame.el --- multi-frame management independent of window systems
2 2
3 ;; Copyright (C) 1993, 1994, 1996, 1997, 2000, 2001, 2003, 2004 3 ;; Copyright (C) 1993, 1994, 1996, 1997, 2000, 2001, 2003, 2004, 2005
4 ;; Free Software Foundation, Inc. 4 ;; Free Software Foundation, Inc.
5 5
6 ;; Maintainer: FSF 6 ;; Maintainer: FSF
7 ;; Keywords: internal 7 ;; Keywords: internal
8 8
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 ;; The strange sequence below is meant to set both the right temporary 1259 ;; We do not know the standard _evaluated_ value yet, because the standard
1260 ;; value and the right "standard expression" , according to Custom, 1260 ;; expression uses values that are not yet set. The correct evaluated
1261 ;; for blink-cursor-mode. We do not know the standard _evaluated_ 1261 ;; standard value will be installed in startup.el using exactly the same
1262 ;; value yet, because the standard expression uses values that are not 1262 ;; expression as in the defcustom.
1263 ;; yet set. Evaluating it now would yield an error, but we make sure 1263 (define-minor-mode blink-cursor-mode
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))))
1283
1284 (defvaralias 'blink-cursor 'blink-cursor-mode)
1285 (make-obsolete-variable 'blink-cursor 'blink-cursor-mode "22.1")
1286
1287 (defun blink-cursor-mode (arg)
1288 "Toggle blinking cursor mode. 1264 "Toggle blinking cursor mode.
1289 With a numeric argument, turn blinking cursor mode on iff ARG is positive. 1265 With a numeric argument, turn blinking cursor mode on iff ARG is positive.
1290 When blinking cursor mode is enabled, the cursor of the selected 1266 When blinking cursor mode is enabled, the cursor of the selected
1291 window blinks. 1267 window blinks.
1292 1268
1293 Note that this command is effective only when Emacs 1269 Note that this command is effective only when Emacs
1294 displays through a window system, because then Emacs does its own 1270 displays through a window system, because then Emacs does its own
1295 cursor display. On a text-only terminal, this is not implemented." 1271 cursor display. On a text-only terminal, this is not implemented."
1296 (interactive "P") 1272 :init-value (not (or noninteractive
1297 (let ((on-p (if (null arg) 1273 emacs-quick-startup
1298 (not blink-cursor-mode) 1274 (eq system-type 'ms-dos)
1299 (> (prefix-numeric-value arg) 0)))) 1275 (not (memq window-system '(x w32)))))
1300 (if blink-cursor-idle-timer 1276 :global t
1301 (cancel-timer blink-cursor-idle-timer)) 1277 (if blink-cursor-idle-timer (cancel-timer blink-cursor-idle-timer))
1302 (if blink-cursor-timer 1278 (if blink-cursor-timer (cancel-timer blink-cursor-timer))
1303 (cancel-timer blink-cursor-timer)) 1279 (setq blink-cursor-idle-timer nil
1304 (setq blink-cursor-idle-timer nil 1280 blink-cursor-timer nil)
1305 blink-cursor-timer nil 1281 (if blink-cursor-mode
1306 blink-cursor-mode nil) 1282 (progn
1307 (if on-p 1283 ;; Hide the cursor.
1308 (progn 1284 ;;(internal-show-cursor nil nil)
1309 ;; Hide the cursor. 1285 (setq blink-cursor-idle-timer
1310 ;(internal-show-cursor nil nil) 1286 (run-with-idle-timer blink-cursor-delay
1311 (setq blink-cursor-idle-timer 1287 blink-cursor-delay
1312 (run-with-idle-timer blink-cursor-delay 1288 'blink-cursor-start)))
1313 blink-cursor-delay 1289 (internal-show-cursor nil t)))
1314 'blink-cursor-start)) 1290
1315 (setq blink-cursor-mode t)) 1291 (defvaralias 'blink-cursor 'blink-cursor-mode)
1316 (internal-show-cursor nil t)))) 1292 (make-obsolete-variable 'blink-cursor 'blink-cursor-mode "22.1")
1317 1293
1318 (defun blink-cursor-start () 1294 (defun blink-cursor-start ()
1319 "Timer function called from the timer `blink-cursor-idle-timer'. 1295 "Timer function called from the timer `blink-cursor-idle-timer'.
1320 This starts the timer `blink-cursor-timer', which makes the cursor blink 1296 This starts the timer `blink-cursor-timer', which makes the cursor blink
1321 if appropriate. It also arranges to cancel that timer when the next 1297 if appropriate. It also arranges to cancel that timer when the next
1377 (define-key ctl-x-5-map "0" 'delete-frame) 1353 (define-key ctl-x-5-map "0" 'delete-frame)
1378 (define-key ctl-x-5-map "o" 'other-frame) 1354 (define-key ctl-x-5-map "o" 'other-frame)
1379 1355
1380 (provide 'frame) 1356 (provide 'frame)
1381 1357
1382 ;;; arch-tag: 82979c70-b8f2-4306-b2ad-ddbd6b328b56 1358 ;; arch-tag: 82979c70-b8f2-4306-b2ad-ddbd6b328b56
1383 ;;; frame.el ends here 1359 ;;; frame.el ends here