Mercurial > emacs
comparison lisp/foldout.el @ 105649:8606d8028876
(foldout-mouse-swallow-events): Replace obsolete form of sit-for.
author | Glenn Morris <rgm@gnu.org> |
---|---|
date | Sat, 17 Oct 2009 03:15:53 +0000 |
parents | a9dc0e7c3f2b |
children | 1d1d5d9bd884 |
comparison
equal
deleted
inserted
replaced
105648:c97e346c34f6 | 105649:8606d8028876 |
---|---|
1 ;;; foldout.el --- folding extensions for outline-mode and outline-minor-mode | 1 ;;; foldout.el --- folding extensions for outline-mode and outline-minor-mode |
2 | 2 |
3 ;; Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, | 3 ;; Copyright (C) 1994, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, |
4 ;; 2006, 2007, 2008, 2009 Free Software Foundation, Inc. | 4 ;; 2009 Free Software Foundation, Inc. |
5 | 5 |
6 ;; Author: Kevin Broadey <KevinB@bartley.demon.co.uk> | 6 ;; Author: Kevin Broadey <KevinB@bartley.demon.co.uk> |
7 ;; Maintainer: FSF | 7 ;; Maintainer: FSF |
8 ;; Created: 27 Jan 1994 | 8 ;; Created: 27 Jan 1994 |
9 ;; Version: foldout.el 1.10 dated 94/05/19 at 17:09:12 | 9 ;; Version: foldout.el 1.10 dated 94/05/19 at 17:09:12 |
493 | 493 |
494 (defun foldout-mouse-swallow-events (event) | 494 (defun foldout-mouse-swallow-events (event) |
495 "Swallow intervening mouse events so we only get the final click-count. | 495 "Swallow intervening mouse events so we only get the final click-count. |
496 Signal an error if the final event isn't the same type as the first one." | 496 Signal an error if the final event isn't the same type as the first one." |
497 (let ((initial-event-type (event-basic-type event))) | 497 (let ((initial-event-type (event-basic-type event))) |
498 (while (null (sit-for 0 double-click-time 'nodisplay)) | 498 (while (null (sit-for (/ double-click-time 1000.0) 'nodisplay)) |
499 (setq event (read-event))) | 499 (setq event (read-event))) |
500 (or (eq initial-event-type (event-basic-type event)) | 500 (or (eq initial-event-type (event-basic-type event)) |
501 (error ""))) | 501 (error ""))) |
502 event) | 502 event) |
503 | 503 |