/[emacs]/emacs/lisp/frame.el
ViewVC logotype

Diff of /emacs/lisp/frame.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.216 by teirllm, Sat Feb 12 17:58:37 2005 UTC revision 1.217 by monnier, Mon Feb 21 13:43:53 2005 UTC
# Line 1  Line 1 
1  ;;; frame.el --- multi-frame management independent of window systems  ;;; frame.el --- multi-frame management independent of window systems
2    
3  ;; Copyright (C) 1993, 1994, 1996, 1997, 2000, 2001, 2003, 2004  ;; Copyright (C) 1993, 1994, 1996, 1997, 2000, 2001, 2003, 2004, 2005
4  ;;   Free Software Foundation, Inc.  ;;   Free Software Foundation, Inc.
5    
6  ;; Maintainer: FSF  ;; Maintainer: FSF
# Line 1256  The function `blink-cursor-start' is cal Line 1256  The function `blink-cursor-start' is cal
1256  This timer calls `blink-cursor-timer-function' every  This timer calls `blink-cursor-timer-function' every
1257  `blink-cursor-interval' seconds.")  `blink-cursor-interval' seconds.")
1258    
1259  ;; The strange sequence below is meant to set both the right temporary  ;; We do not know the standard _evaluated_ value yet, because the standard
1260  ;; value and the right "standard expression" , according to Custom,  ;; expression uses values that are not yet set.  The correct evaluated
1261  ;; for blink-cursor-mode.  We do not know the standard _evaluated_  ;; standard value will be installed in startup.el using exactly the same
1262  ;; value yet, because the standard expression uses values that are not  ;; expression as in the defcustom.
1263  ;; yet set.  Evaluating it now would yield an error, but we make sure  (define-minor-mode blink-cursor-mode
 ;; 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))))  
   
 (defvaralias 'blink-cursor 'blink-cursor-mode)  
 (make-obsolete-variable 'blink-cursor 'blink-cursor-mode "22.1")  
   
 (defun blink-cursor-mode (arg)  
1264    "Toggle blinking cursor mode.    "Toggle blinking cursor mode.
1265  With a numeric argument, turn blinking cursor mode on iff ARG is positive.  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  When blinking cursor mode is enabled, the cursor of the selected
# Line 1293  window blinks. Line 1269  window blinks.
1269  Note that this command is effective only when Emacs  Note that this command is effective only when Emacs
1270  displays through a window system, because then Emacs does its own  displays through a window system, because then Emacs does its own
1271  cursor display.  On a text-only terminal, this is not implemented."  cursor display.  On a text-only terminal, this is not implemented."
1272    (interactive "P")    :init-value (not (or noninteractive
1273    (let ((on-p (if (null arg)                         emacs-quick-startup
1274                    (not blink-cursor-mode)                         (eq system-type 'ms-dos)
1275                  (> (prefix-numeric-value arg) 0))))                         (not (memq window-system '(x w32)))))
1276      (if blink-cursor-idle-timer    :global t
1277          (cancel-timer blink-cursor-idle-timer))    (if blink-cursor-idle-timer (cancel-timer blink-cursor-idle-timer))
1278      (if blink-cursor-timer    (if blink-cursor-timer (cancel-timer blink-cursor-timer))
1279          (cancel-timer blink-cursor-timer))    (setq blink-cursor-idle-timer nil
1280      (setq blink-cursor-idle-timer nil          blink-cursor-timer nil)
1281            blink-cursor-timer nil    (if blink-cursor-mode
1282            blink-cursor-mode nil)        (progn
1283      (if on-p          ;; Hide the cursor.
1284          (progn          ;;(internal-show-cursor nil nil)
1285            ;; Hide the cursor.          (setq blink-cursor-idle-timer
1286            ;(internal-show-cursor nil nil)                (run-with-idle-timer blink-cursor-delay
1287            (setq blink-cursor-idle-timer                                     blink-cursor-delay
1288                  (run-with-idle-timer blink-cursor-delay                                     'blink-cursor-start)))
1289                                       blink-cursor-delay      (internal-show-cursor nil t)))
1290                                       'blink-cursor-start))  
1291            (setq blink-cursor-mode t))  (defvaralias 'blink-cursor 'blink-cursor-mode)
1292        (internal-show-cursor nil t))))  (make-obsolete-variable 'blink-cursor 'blink-cursor-mode "22.1")
1293    
1294  (defun blink-cursor-start ()  (defun blink-cursor-start ()
1295    "Timer function called from the timer `blink-cursor-idle-timer'.    "Timer function called from the timer `blink-cursor-idle-timer'.
# Line 1379  Use Custom to set this variable to get t Line 1355  Use Custom to set this variable to get t
1355    
1356  (provide 'frame)  (provide 'frame)
1357    
1358  ;;; arch-tag: 82979c70-b8f2-4306-b2ad-ddbd6b328b56  ;; arch-tag: 82979c70-b8f2-4306-b2ad-ddbd6b328b56
1359  ;;; frame.el ends here  ;;; frame.el ends here

Legend:
Removed from v.1.216  
changed lines
  Added in v.1.217

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26