Mercurial > hg > xemacs-beta
annotate lisp/dialog.el @ 5330:fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
lisp/ChangeLog addition:
2011-01-02 Aidan Kehoe <kehoea@parhasard.net>
* dialog.el (make-dialog-box):
* list-mode.el (display-completion-list):
These functions used to use cl-parsing-keywords; change them to
use defun* instead, fixing the build. (Not sure what led to me
not including this change in d1b17a33450b!)
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 02 Jan 2011 17:04:13 +0000 |
parents | 7031e143e4ee |
children | aa2705c83c24 89331fa1c819 |
rev | line source |
---|---|
209 | 1 ;;; dialog.el --- Dialog-box support for XEmacs |
2 | |
3 ;; Copyright (C) 1991-4, 1997 Free Software Foundation, Inc. | |
844 | 4 ;; Copyright (C) 2000, 2002 Ben Wing. |
209 | 5 |
6 ;; Maintainer: XEmacs Development Team | |
7 ;; Keywords: extensions, internal, dumped | |
8 | |
9 ;; This file is part of XEmacs. | |
10 | |
11 ;; XEmacs is free software; you can redistribute it and/or modify it | |
12 ;; under the terms of the GNU General Public License as published by | |
13 ;; the Free Software Foundation; either version 2, or (at your option) | |
14 ;; any later version. | |
15 | |
16 ;; XEmacs is distributed in the hope that it will be useful, but | |
17 ;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
18 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
19 ;; General Public License for more details. | |
20 | |
21 ;; You should have received a copy of the GNU General Public License | |
22 ;; along with XEmacs; see the file COPYING. If not, write to the | |
23 ;; Free Software Foundation, 59 Temple Place - Suite 330, | |
24 ;; Boston, MA 02111-1307, USA. | |
25 | |
26 ;;; Synched up with: Not in FSF. | |
27 | |
844 | 28 ;;; Authorship: Mostly written or rewritten by Ben Wing; some old old stuff |
29 ;;; that underlies some current code was written by JWZ. | |
30 | |
209 | 31 ;;; Commentary: |
32 | |
33 ;; This file is dumped with XEmacs (when dialog boxes are compiled in). | |
34 | |
442 | 35 ;; Dialog boxes are non-modal at the C level, but made modal at the |
36 ;; Lisp level via hacks in functions such as yes-or-no-p-dialog-box | |
37 ;; below. Perhaps there should be truly modal dialog boxes | |
38 ;; implemented at the C level for safety. All code using dialog boxes | |
39 ;; should be careful to assume that the environment, for example the | |
40 ;; current buffer, might be completely different after returning from | |
41 ;; yes-or-no-p-dialog-box, but such code is difficult to write and test. | |
42 | |
209 | 43 ;;; Code: |
44 (defun yes-or-no-p-dialog-box (prompt) | |
442 | 45 "Ask user a yes-or-no question with a popup dialog box. |
46 Return t if the answer is \"yes\". | |
209 | 47 Takes one argument, which is the string to display to ask the question." |
442 | 48 (save-selected-frame |
49 (make-dialog-box 'question | |
50 :question prompt | |
51 :modal t | |
52 :buttons '(["Yes" (dialog-box-finish t)] | |
53 ["No" (dialog-box-finish nil)] | |
54 nil | |
55 ["Cancel" (dialog-box-cancel)])))) | |
209 | 56 |
442 | 57 ;; FSF has a similar function `x-popup-dialog'. |
209 | 58 (defun get-dialog-box-response (position contents) |
59 "Pop up a dialog box and return user's selection. | |
60 POSITION specifies which frame to use. | |
61 This is normally an event or a window or frame. | |
62 If POSITION is t or nil, it means to use the frame the mouse is on. | |
63 The dialog box appears in the middle of the specified frame. | |
64 | |
65 CONTENTS specifies the alternatives to display in the dialog box. | |
66 It is a list of the form (TITLE ITEM1 ITEM2...). | |
67 Each ITEM is a cons cell (STRING . VALUE). | |
68 The return value is VALUE from the chosen item. | |
69 | |
70 An ITEM may also be just a string--that makes a nonselectable item. | |
71 An ITEM may also be nil--that means to put all preceding items | |
72 on the left of the dialog box and all following items on the right." | |
73 (cond | |
74 ((eventp position) | |
75 (select-frame (event-frame position))) | |
76 ((framep position) | |
77 (select-frame position)) | |
78 ((windowp position) | |
79 (select-window position))) | |
442 | 80 (make-dialog-box 'question |
81 :question (car contents) | |
82 :modal t | |
83 :buttons | |
84 (mapcar #'(lambda (x) | |
85 (cond | |
86 ((null x) | |
87 nil) | |
88 ((stringp x) | |
89 ;;this will never get selected | |
90 `[,x 'ignore nil]) | |
91 (t | |
92 `[,(car x) (dialog-box-finish ',(cdr x)) t]))) | |
93 (cdr contents)))) | |
209 | 94 |
95 (defun message-box (fmt &rest args) | |
96 "Display a message, in a dialog box if possible. | |
97 If the selected device has no dialog-box support, use the echo area. | |
98 The arguments are the same as to `format'. | |
99 | |
100 If the only argument is nil, clear any existing message; let the | |
101 minibuffer contents show." | |
102 (if (and (null fmt) (null args)) | |
103 (progn | |
104 (clear-message nil) | |
105 nil) | |
106 (let ((str (apply 'format fmt args))) | |
107 (if (device-on-window-system-p) | |
442 | 108 (get-dialog-box-response nil (list str (cons "%_OK" t))) |
209 | 109 (display-message 'message str)) |
110 str))) | |
111 | |
112 (defun message-or-box (fmt &rest args) | |
442 | 113 "Display a message in a dialog box or in the echo area. |
114 If this command was invoked with the mouse, use a dialog box. | |
209 | 115 Otherwise, use the echo area. |
116 The arguments are the same as to `format'. | |
117 | |
118 If the only argument is nil, clear any existing message; let the | |
119 minibuffer contents show." | |
120 (if (should-use-dialog-box-p) | |
121 (apply 'message-box fmt args) | |
122 (apply 'message fmt args))) | |
123 | |
5330
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
124 (defun* make-dialog-box (type &rest rest &key (title "XEmacs") |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
125 (parent (selected-frame)) modal properties autosize |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
126 spec &allow-other-keys) |
442 | 127 "Pop up a dialog box. |
128 TYPE is a symbol, the type of dialog box. Remaining arguments are | |
129 keyword-value pairs, specifying the particular characteristics of the | |
130 dialog box. The allowed keywords are particular to each type, but | |
131 some standard keywords are common to many types: | |
132 | |
133 :title | |
134 The title of the dialog box's window. | |
135 | |
136 :modal | |
137 If true, indicates that XEmacs will wait until the user is \"done\" | |
138 with the dialog box (usually, this means that a response has been | |
139 given). Typically, the response is returned. NOTE: Some dialog | |
140 boxes are always modal. If the dialog box is modal, `make-dialog-box' | |
141 returns immediately. The return value will be either nil or a | |
142 dialog box handle of some sort, e.g. a frame for type `general'. | |
143 | |
144 --------------------------------------------------------------------------- | |
145 | |
146 Recognized types are | |
147 | |
148 general | |
149 A dialog box consisting of an XEmacs glyph, typically a `layout' | |
150 widget specifying a dialog box arrangement. This is the most | |
151 general and powerful dialog box type, but requires more work than | |
152 the other types below. | |
153 | |
154 question | |
155 A simple dialog box that displays a question and contains one or | |
156 more user-defined buttons to specify possible responses. (This is | |
157 compatible with the old built-in dialog boxes formerly specified | |
158 using `popup-dialog-box'.) | |
159 | |
160 file | |
161 A file dialog box, of the type typically used in the window system | |
162 XEmacs is running on. | |
163 | |
164 color | |
165 A color picker. | |
166 | |
167 find | |
168 A find dialog box. | |
169 | |
170 font | |
171 A font chooser. | |
172 | |
173 print | |
174 A dialog box used when printing (e.g. number of pages, printer). | |
175 | |
176 page-setup | |
177 A dialog box for setting page options (e.g. margins) for printing. | |
178 | |
179 replace | |
180 A find/replace dialog box. | |
181 | |
182 mswindows-message | |
183 An MS Windows-specific standard dialog box type similar to `question'. | |
184 | |
185 --------------------------------------------------------------------------- | |
186 | |
187 For type `general': | |
188 | |
189 This type creates a frame and puts the specified widget layout in it. | |
190 \(Currently this is done by eliminating all areas but the gutter and placing | |
191 the layout there; but this is an implementation detail and may change.) | |
192 | |
193 The keywords allowed for `general' are | |
194 | |
195 :spec | |
196 The widget spec -- anything that can be passed to `make-glyph'. | |
197 :title | |
198 The title of the frame. | |
199 :parent | |
200 The frame is made a child of this frame (defaults to the selected frame). | |
201 :properties | |
202 Additional properties of the frame, as well as `dialog-frame-plist'. | |
863 | 203 :autosize |
204 If t the frame is sized to exactly fit the widgets given by :spec. | |
442 | 205 |
206 --------------------------------------------------------------------------- | |
207 | |
208 For type `question': | |
209 | |
210 The keywords allowed are | |
211 | |
212 :modal | |
213 t or nil. When t, the dialog box callback should exit the dialog box | |
214 using the functions `dialog-box-finish' or `dialog-box-cancel'. | |
215 :title | |
216 The title of the frame. | |
217 :question | |
218 A string, the question. | |
219 :buttons | |
220 A list, describing the buttons below the question. Each of these is a | |
221 vector, the syntax of which is essentially the same as that of popup menu | |
222 items. They may have any of the following forms: | |
223 | |
224 [ \"name\" callback <active-p> ] | |
225 [ \"name\" callback <active-p> \"suffix\" ] | |
226 [ \"name\" callback :<keyword> <value> :<keyword> <value> ... ] | |
227 | |
228 The name is the string to display on the button; it is filtered through the | |
229 resource database, so it is possible for resources to override what string | |
230 is actually displayed. | |
231 | |
232 Accelerators can be indicated in the string by putting the sequence | |
233 \"%_\" before the character corresponding to the key that will invoke | |
234 the button. Uppercase and lowercase accelerators are equivalent. The | |
235 sequence \"%%\" is also special, and is translated into a single %. | |
236 | |
237 If the `callback' of a button is a symbol, then it must name a command. | |
238 It will be invoked with `call-interactively'. If it is a list, then it is | |
239 evaluated with `eval'. | |
240 | |
241 One (and only one) of the buttons may be `nil'. This marker means that all | |
242 following buttons should be flushright instead of flushleft. | |
243 | |
244 Though the keyword/value syntax is supported for dialog boxes just as in | |
245 popup menus, the only keyword which is both meaningful and fully implemented | |
246 for dialog box buttons is `:active'. | |
247 | |
248 --------------------------------------------------------------------------- | |
249 | |
250 For type `file': | |
251 | |
252 The keywords allowed are | |
253 | |
254 :initial-filename | |
255 The initial filename to be placed in the dialog box (defaults to nothing). | |
256 :initial-directory | |
257 The initial directory to be selected in the dialog box (defaults to the | |
258 current buffer's `default-directory). | |
259 :filter-list | |
260 A list of (filter-desc filter ...) | |
261 :title | |
262 The title of the dialog box (defaults to \"Open\"). | |
263 :allow-multi-select t or nil | |
264 :create-prompt-on-nonexistent t or nil | |
265 :overwrite-prompt t or nil | |
266 :file-must-exist t or nil | |
267 :no-network-button t or nil | |
268 :no-read-only-return t or nil | |
269 | |
270 --------------------------------------------------------------------------- | |
271 | |
673 | 272 For type `directory': |
273 | |
274 The keywords allowed are | |
275 | |
276 :initial-directory | |
277 The initial directory to be selected in the dialog box (defaults to the | |
278 current buffer's `default-directory). | |
279 :title | |
280 The title of the dialog box (defaults to \"Open\"). | |
281 | |
282 --------------------------------------------------------------------------- | |
283 | |
442 | 284 For type `print': |
285 | |
286 This invokes the Windows standard Print dialog. | |
287 This dialog is usually invoked when the user selects the Print command. | |
288 After the user presses OK, the program should start actual printout. | |
289 | |
290 The keywords allowed are | |
291 | |
292 :device | |
293 An 'msprinter device. | |
294 :print-settings | |
295 A printer settings object. | |
510 | 296 :allow-selection |
297 t or nil -- whether the \"Selection\" button is enabled (defaults to nil). | |
298 :allow-pages | |
299 t or nil -- whether the \"Pages\" button and associated edit controls | |
300 are enabled (defaults to t). | |
301 :selected-page-button | |
302 `all', `selection', or `pages' -- which page button is initially | |
303 selected. | |
442 | 304 |
510 | 305 Exactly one of :device and :print-settings must be given. |
442 | 306 |
307 The function brings up the Print dialog, where the user can | |
506 | 308 select a different printer and/or change printer options. Connection |
442 | 309 name can change as a result of selecting a different printer device. If |
506 | 310 a device is specified, then changes are stored into the settings object |
442 | 311 currently selected into that printer. If a settings object is supplied, |
629 | 312 then changes are recorded into it, and, it is selected into a |
442 | 313 printer, then changes are propagated to that printer |
314 too. | |
315 | |
316 Return value is nil if the user has canceled the dialog. Otherwise, it | |
317 is a new plist, with the following properties: | |
510 | 318 name Printer device name, even if unchanged by the user. |
319 from-page First page to print, 1-based. Returned if | |
320 `selected-page-button' is `pages'. | |
321 user, then this value is not included in the plist. | |
322 to-page Last page to print, inclusive, 1-based. Returned if | |
323 `selected-page-button' is `pages'. | |
324 copies Number of copies to print. Always returned. | |
325 selected-page-button Which page button was selected (`all', `selection', | |
326 or `pages'). | |
442 | 327 |
328 The DEVICE is destroyed and an error is signaled in case of | |
329 initialization problem with the new printer. | |
330 | |
510 | 331 See also the `page-setup' dialog box type. |
442 | 332 |
333 --------------------------------------------------------------------------- | |
334 | |
335 For type `page-setup': | |
336 | |
337 This invokes the Windows standard Page Setup dialog. | |
506 | 338 This dialog is usually invoked in response to the Page Setup command, |
339 and used to choose such parameters as page orientation, print margins | |
340 etc. Note that this dialog contains the \"Printer\" button, which | |
341 invokes the Printer Setup dialog so that the user can update the | |
342 printer options or even select a different printer as well. | |
442 | 343 |
344 The keywords allowed are | |
345 | |
346 :device | |
347 An 'msprinter device. | |
348 :print-settings | |
349 A printer settings object. | |
350 :properties | |
351 A plist of job properties. | |
352 | |
353 Exactly one of these keywords must be given. | |
354 | |
355 The function brings up the Page Setup dialog, where the user | |
356 can select a different printer and/or change printer options. | |
357 Connection name can change as a result of selecting a different printer | |
506 | 358 device. If a device is specified, then changes are stored into the |
442 | 359 settings object currently selected into that printer. If a settings |
629 | 360 object is supplied, then changes are recorded into it, and, it is |
442 | 361 selected into a printer, then changes are propagated to that printer |
362 too. | |
363 | |
364 :properties specifies a plist of job properties; | |
365 see `default-msprinter-frame-plist' for the complete list. The plist | |
366 is used to initialize the dialog. | |
367 | |
368 Return value is nil if the user has canceled the dialog. Otherwise, | |
369 it is a new plist, containing the new list of properties. | |
370 | |
506 | 371 NOTE: The margin properties (returned by this function) are *NOT* stored |
372 into the print-settings or device object. | |
373 | |
442 | 374 The DEVICE is destroyed and an error is signaled in case of |
375 initialization problem with the new printer. | |
376 | |
510 | 377 See also the `print' dialog box type. |
442 | 378 |
379 --------------------------------------------------------------------------- | |
380 | |
381 For type `mswindows-message': | |
382 | |
383 The keywords allowed are | |
384 | |
385 :title | |
386 The title of the dialog box. | |
387 :message | |
388 The string to display. | |
389 :flags | |
390 A symbol or list of symbols: | |
391 | |
392 -- To specify the buttons in the message box: | |
393 | |
394 abortretryignore | |
395 The message box contains three push buttons: Abort, Retry, and Ignore. | |
396 ok | |
397 The message box contains one push button: OK. This is the default. | |
398 okcancel | |
399 The message box contains two push buttons: OK and Cancel. | |
400 retrycancel | |
401 The message box contains two push buttons: Retry and Cancel. | |
402 yesno | |
403 The message box contains two push buttons: Yes and No. | |
404 yesnocancel | |
405 The message box contains three push buttons: Yes, No, and Cancel. | |
406 | |
407 | |
408 -- To display an icon in the message box: | |
409 | |
410 iconexclamation, iconwarning | |
411 An exclamation-point icon appears in the message box. | |
412 iconinformation, iconasterisk | |
413 An icon consisting of a lowercase letter i in a circle appears in | |
414 the message box. | |
415 iconquestion | |
416 A question-mark icon appears in the message box. | |
417 iconstop, iconerror, iconhand | |
418 A stop-sign icon appears in the message box. | |
419 | |
420 | |
421 -- To indicate the default button: | |
422 | |
423 defbutton1 | |
424 The first button is the default button. This is the default. | |
425 defbutton2 | |
426 The second button is the default button. | |
427 defbutton3 | |
428 The third button is the default button. | |
429 defbutton4 | |
430 The fourth button is the default button. | |
431 | |
432 | |
433 -- To indicate the modality of the dialog box: | |
434 | |
435 applmodal | |
436 The user must respond to the message box before continuing work in | |
437 the window identified by the hWnd parameter. However, the user can | |
438 move to the windows of other applications and work in those windows. | |
439 Depending on the hierarchy of windows in the application, the user | |
440 may be able to move to other windows within the application. All | |
441 child windows of the parent of the message box are automatically | |
442 disabled, but popup windows are not. This is the default. | |
443 systemmodal | |
444 Same as applmodal except that the message box has the WS_EX_TOPMOST | |
445 style. Use system-modal message boxes to notify the user of serious, | |
446 potentially damaging errors that require immediate attention (for | |
447 example, running out of memory). This flag has no effect on the | |
448 user's ability to interact with windows other than those associated | |
449 with hWnd. | |
450 taskmodal | |
451 Same as applmodal except that all the top-level windows belonging to | |
452 the current task are disabled if the hWnd parameter is NULL. Use | |
453 this flag when the calling application or library does not have a | |
454 window handle available but still needs to prevent input to other | |
455 windows in the current application without suspending other | |
456 applications. | |
457 | |
458 | |
459 In addition, you can specify the following flags: | |
460 | |
461 default-desktop-only | |
462 The desktop currently receiving input must be a default desktop; | |
463 otherwise, the function fails. A default desktop is one an | |
464 application runs on after the user has logged on. | |
465 help | |
466 Adds a Help button to the message box. Choosing the Help button or | |
467 pressing F1 generates a Help event. | |
468 right | |
469 The text is right-justified. | |
470 rtlreading | |
471 Displays message and caption text using right-to-left reading order | |
472 on Hebrew and Arabic systems. | |
473 setforeground | |
474 The message box becomes the foreground window. Internally, Windows | |
475 calls the SetForegroundWindow function for the message box. | |
476 topmost | |
477 The message box is created with the WS_EX_TOPMOST window style. | |
478 service-notification | |
479 Windows NT only: The caller is a service notifying the user of an | |
480 event. The function displays a message box on the current active | |
481 desktop, even if there is no user logged on to the computer. If | |
482 this flag is set, the hWnd parameter must be NULL. This is so the | |
483 message box can appear on a desktop other than the desktop | |
484 corresponding to the hWnd. | |
485 | |
486 | |
487 The return value is one of the following menu-item values returned by | |
488 the dialog box: | |
489 | |
490 abort | |
491 Abort button was selected. | |
492 cancel | |
493 Cancel button was selected. | |
494 ignore | |
495 Ignore button was selected. | |
496 no | |
497 No button was selected. | |
498 ok | |
499 OK button was selected. | |
500 retry | |
501 Retry button was selected. | |
502 yes | |
503 Yes button was selected. | |
504 | |
505 If a message box has a Cancel button, the function returns the | |
506 `cancel' value if either the ESC key is pressed or the Cancel button | |
507 is selected. If the message box has no Cancel button, pressing ESC has | |
508 no effect." | |
509 (flet ((dialog-box-modal-loop (thunk) | |
510 (let* ((frames (frame-list)) | |
511 (result | |
512 ;; ok, this is extremely tricky. normally a modal | |
513 ;; dialog will pop itself down using (dialog-box-finish) | |
514 ;; or (dialog-box-cancel), which throws back to this | |
515 ;; catch. but question dialog boxes pop down themselves | |
516 ;; regardless, so a badly written question dialog box | |
517 ;; that does not use (dialog-box-finish) could seriously | |
518 ;; wedge us. furthermore, we disable all other frames | |
519 ;; in order to implement modality; we need to restore | |
520 ;; them before the dialog box is destroyed, because | |
521 ;; otherwise windows at least will notice that no top- | |
522 ;; level window can have the focus and will shift the | |
523 ;; focus to a different app, raising it and obscuring us. | |
524 ;; so we create `delete-dialog-box-hook', which is | |
525 ;; called right *before* the dialog box gets destroyed. | |
526 ;; here, we put a hook on it, and when it's our dialog | |
527 ;; box and not someone else's that's being destroyed, | |
528 ;; we reenable all the frames and remove the hook. | |
529 ;; BUT ... we still have to deal with exiting the | |
530 ;; modal loop in case it doesn't happen before us. | |
531 ;; we can't do this until after the callbacks for this | |
532 ;; dialog box get executed, and that doesn't happen until | |
533 ;; after the dialog box is destroyed. so to keep things | |
534 ;; synchronous, we enqueue an eval event, which goes into | |
535 ;; the same queue as the misc-user events encapsulating | |
536 ;; the dialog callbacks and will go after it (because | |
537 ;; destroying the dialog box happens after processing | |
538 ;; its selection). if the dialog boxes are written | |
539 ;; properly, we don't see this eval event, because we've | |
540 ;; already exited our modal loop. (Thus, we make sure the | |
541 ;; function given in this eval event is actually defined | |
542 ;; and does nothing.) If we do see it, though, we know | |
543 ;; that we encountered a badly written dialog box and | |
544 ;; need to exit now. Currently we just return nil, but | |
545 ;; maybe we should signal an error or issue a warning. | |
546 (catch 'internal-dialog-box-finish | |
547 (let ((id (eval thunk)) | |
548 (sym (gensym))) | |
549 (fset sym | |
550 `(lambda (did) | |
551 (when (eq ',id did) | |
552 (mapc 'enable-frame ',frames) | |
553 (enqueue-eval-event | |
554 'internal-make-dialog-box-exit did) | |
555 (remove-hook 'delete-dialog-box-hook | |
556 ',sym)))) | |
1066 | 557 (if (framep id) |
558 (add-hook 'delete-frame-hook sym) | |
559 (add-hook 'delete-dialog-box-hook sym)) | |
442 | 560 (mapc 'disable-frame frames) |
561 (block nil | |
562 (while t | |
563 (let ((event (next-event))) | |
564 (if (and (eval-event-p event) | |
565 (eq (event-function event) | |
566 'internal-make-dialog-box-exit) | |
567 (eq (event-object event) id)) | |
568 (return '(nil)) | |
569 (dispatch-event event))))))))) | |
570 (if (listp result) | |
571 (car result) | |
572 (signal 'quit nil))))) | |
573 (case type | |
574 (general | |
5330
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
575 (flet ((create-dialog-box-frame () |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
576 (let* ((ftop (frame-property parent 'top)) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
577 (fleft (frame-property parent 'left)) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
578 (fwidth (frame-pixel-width parent)) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
579 (fheight (frame-pixel-height parent)) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
580 (fonth (font-height (face-font 'default))) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
581 (fontw (font-width (face-font 'default))) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
582 (properties (append properties |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
583 dialog-frame-plist)) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
584 (dfheight (plist-get properties 'height)) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
585 (dfwidth (plist-get properties 'width)) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
586 (unmapped (plist-get properties |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
587 'initially-unmapped)) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
588 (gutter-spec spec) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
589 (name (or (plist-get properties 'name) "XEmacs")) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
590 (frame nil)) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
591 (plist-remprop properties 'initially-unmapped) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
592 ;; allow the user to just provide a glyph |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
593 (or (glyphp spec) (setq spec (make-glyph spec))) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
594 (setq gutter-spec (copy-sequence "\n")) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
595 (set-extent-begin-glyph (make-extent 0 1 gutter-spec) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
596 spec) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
597 ;; under FVWM at least, if I don't specify the |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
598 ;; initial position, it ends up always at (0, 0). |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
599 ;; xwininfo doesn't tell me that there are any |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
600 ;; program-specified position hints, so it must be |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
601 ;; an FVWM bug. So just be smashing and position in |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
602 ;; the center of the selected frame. |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
603 (setq frame |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
604 (make-frame |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
605 (append properties |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
606 `(popup |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
607 ,parent initially-unmapped t |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
608 menubar-visible-p nil |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
609 has-modeline-p nil |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
610 default-toolbar-visible-p nil |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
611 top-gutter-visible-p t |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
612 top-gutter-height ,(* dfheight fonth) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
613 top-gutter ,gutter-spec |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
614 minibuffer none |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
615 name ,name |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
616 modeline-shadow-thickness 0 |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
617 vertical-scrollbar-visible-p nil |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
618 horizontal-scrollbar-visible-p nil |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
619 unsplittable t |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
620 internal-border-width 8 |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
621 left ,(+ fleft (- (/ fwidth 2) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
622 (/ (* dfwidth |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
623 fontw) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
624 2))) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
625 top ,(+ ftop (- (/ fheight 2) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
626 (/ (* dfheight |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
627 fonth) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
628 2))))))) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
629 (set-face-foreground 'modeline [default foreground] frame) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
630 (set-face-background 'modeline [default background] frame) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
631 ;; resize before mapping |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
632 (when autosize |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
633 (set-frame-displayable-pixel-size |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
634 frame |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
635 (image-instance-width |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
636 (glyph-image-instance spec |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
637 (frame-selected-window frame))) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
638 (image-instance-height |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
639 (glyph-image-instance spec |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
640 (frame-selected-window frame))))) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
641 ;; somehow, even though the resizing is supposed |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
642 ;; to be while the frame is not visible, a |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
643 ;; visible resize is perceptible |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
644 (unless unmapped (make-frame-visible frame)) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
645 (let ((newbuf (generate-new-buffer " *dialog box*"))) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
646 (set-buffer-dedicated-frame newbuf frame) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
647 (set-frame-property frame 'dialog-box-buffer newbuf) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
648 (set-window-buffer (frame-root-window frame) newbuf) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
649 (with-current-buffer newbuf |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
650 (set (make-local-variable 'frame-title-format) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
651 title) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
652 (add-local-hook 'delete-frame-hook |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
653 #'(lambda (frame) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
654 (kill-buffer |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
655 (frame-property |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
656 frame |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
657 'dialog-box-buffer)))))) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
658 frame))) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
659 (if modal |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
660 (dialog-box-modal-loop '(create-dialog-box-frame)) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
661 (create-dialog-box-frame)))) |
442 | 662 (question |
5330
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
663 (remf rest :modal) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
664 (if modal |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
665 (dialog-box-modal-loop `(make-dialog-box-internal ',type ',rest)) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
666 (make-dialog-box-internal type rest)))) |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
667 (t |
fbafdc1bb4d2
Use defun*, not cl-parsing-keywords, #'make-dialog-box, #'display-completion-list
Aidan Kehoe <kehoea@parhasard.net>
parents:
2730
diff
changeset
|
668 (make-dialog-box-internal type rest)))) |
442 | 669 |
670 (defun dialog-box-finish (result) | |
671 "Exit a modal dialog box, returning RESULT. | |
672 This is meant to be executed from a dialog box callback function." | |
673 (throw 'internal-dialog-box-finish (list result))) | |
674 | |
675 (defun dialog-box-cancel () | |
676 "Cancel a modal dialog box. | |
677 This is meant to be executed from a dialog box callback function." | |
678 (throw 'internal-dialog-box-finish 'cancel)) | |
679 | |
680 ;; an eval event, used as a trigger inside of the dialog modal loop. | |
681 (defun internal-make-dialog-box-exit (did) | |
682 nil) | |
683 | |
684 (make-obsolete 'popup-dialog-box 'make-dialog-box) | |
685 (defun popup-dialog-box (desc) | |
686 "Obsolete equivalent of (make-dialog-box 'question ...). | |
687 | |
688 \(popup-dialog-box (QUESTION BUTTONS ...) | |
689 | |
690 is equivalent to | |
691 | |
692 \(make-dialog-box 'question :question QUESTION :buttons BUTTONS)" | |
693 (check-argument-type 'stringp (car desc)) | |
694 (or (consp (cdr desc)) | |
695 (error 'syntax-error | |
696 "Dialog descriptor must supply at least one button" | |
697 desc)) | |
698 (make-dialog-box 'question :question (car desc) :buttons (cdr desc))) | |
699 | |
209 | 700 ;;; dialog.el ends here |