1 ;;; nnheaderxm.el --- making Gnus backends work under XEmacs
2 ;; Copyright (C) 1996,97,98,99 Free Software Foundation, Inc.
4 ;; Author: Lars Magne Ingebrigtsen <larsi@gnus.org>
5 ;; Katsumi Yamaoka <yamaoka@jpl.org>
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software; you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation; either version 2, or (at your option)
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs; see the file COPYING. If not, write to the
22 ;; Free Software Foundation, Inc., 59 Temple Place - Suite 330,
23 ;; Boston, MA 02111-1307, USA.
29 (defun nnheader-xmas-run-at-time (time repeat function &rest args)
31 "nnheader-run-at-time"
36 (defun nnheader-xmas-Y-or-n-p (prompt)
37 "Ask user a \"Y/n\" question. Return t if answer is neither \"n\", \"N\" nor \"C-g\"."
38 (if (should-use-dialog-box-p)
39 (yes-or-no-p-dialog-box prompt)
40 (let ((cursor-in-echo-area t)
44 (message "%s(Y/n) " prompt)
45 (while (or (not (key-press-event-p (setq event (next-command-event))))
46 (not (or (eq (event-key event) 'escape)
47 (memq (event-to-character event)
48 '(?\ ?N ?Y ?\C-g ?\e ?\n ?\r ?n ?y))))))
49 (if (memq (event-key event) '(?\C-g ?N ?n))
51 (message "%s(Y/n) No" prompt)
53 (message "%s(Y/n) Yes" prompt)
56 (defalias 'nnheader-run-at-time 'nnheader-xmas-run-at-time)
57 (defalias 'nnheader-cancel-timer 'delete-itimer)
58 (defalias 'nnheader-cancel-function-timers 'ignore)
59 (defalias 'nnheader-Y-or-n-p 'nnheader-xmas-Y-or-n-p)
63 ;;; nnheaderxm.el ends here.