Mercurial > hg > xemacs-beta
comparison lisp/dialog.el @ 404:2f8bb876ab1d r21-2-32
Import from CVS: tag r21-2-32
author | cvs |
---|---|
date | Mon, 13 Aug 2007 11:16:07 +0200 |
parents | cc15677e0335 |
children | b8cc9ab3f761 |
comparison
equal
deleted
inserted
replaced
403:9f011ab08d48 | 404:2f8bb876ab1d |
---|---|
35 Takes one argument, which is the string to display to ask the question." | 35 Takes one argument, which is the string to display to ask the question." |
36 (let ((echo-keystrokes 0) | 36 (let ((echo-keystrokes 0) |
37 event) | 37 event) |
38 (popup-dialog-box | 38 (popup-dialog-box |
39 ;; "Non-violent language please!" says Robin. | 39 ;; "Non-violent language please!" says Robin. |
40 (cons prompt '(["Yes" yes t] ["No" no t] nil ["Cancel" abort t]))) | 40 (cons prompt '(["%_Yes" yes t] ["%_No" no t] nil ["%_Cancel" abort t]))) |
41 ; (cons prompt '(["Yes" yes t] ["No" no t] nil ["Abort" abort t]))) | 41 ; (cons prompt '(["%_Yes" yes t] ["%_No" no t] nil ["A%_bort" abort t]))) |
42 (catch 'ynp-done | 42 (catch 'ynp-done |
43 (while t | 43 (while t |
44 (setq event (next-command-event event)) | 44 (setq event (next-command-event event)) |
45 (cond ((and (misc-user-event-p event) (eq (event-object event) 'yes)) | 45 (cond ((and (misc-user-event-p event) (eq (event-object event) 'yes)) |
46 (throw 'ynp-done t)) | 46 (throw 'ynp-done t)) |
136 (progn | 136 (progn |
137 (clear-message nil) | 137 (clear-message nil) |
138 nil) | 138 nil) |
139 (let ((str (apply 'format fmt args))) | 139 (let ((str (apply 'format fmt args))) |
140 (if (device-on-window-system-p) | 140 (if (device-on-window-system-p) |
141 (get-dialog-box-response nil (list str (cons "OK" t))) | 141 (get-dialog-box-response nil (list str (cons "%_OK" t))) |
142 (display-message 'message str)) | 142 (display-message 'message str)) |
143 str))) | 143 str))) |
144 | 144 |
145 (defun message-or-box (fmt &rest args) | 145 (defun message-or-box (fmt &rest args) |
146 "Display a message in a dialog box or in the echo area.\n\ | 146 "Display a message in a dialog box or in the echo area.\n\ |