Raymond Toy pushed to branch issue-111-fixes-for-motifd-clm at cmucl / cmucl
Commits:
-
254aa315
by Raymond Toy at 2021-09-19T14:03:38-07:00
6 changed files:
- src/interface/debug.lisp
- src/interface/initial.lisp
- src/interface/inspect.lisp
- src/interface/interface.lisp
- src/motif/lisp/initial.lisp
- src/motif/lisp/main.lisp
Changes:
... | ... | @@ -157,9 +157,10 @@ |
157 | 157 |
(di:do-debug-function-variables (v debug-fun)
|
158 | 158 |
(unless any-p
|
159 | 159 |
(setf any-p t)
|
160 |
- (push (create-label frame-view "localsLabel"
|
|
161 |
- :font-list *header-font*
|
|
162 |
- :label-string "Local variables:")
|
|
160 |
+ (push (with-compound-strings ((label-string "Local variables:"
|
|
161 |
+ +header-tag+))
|
|
162 |
+ (create-label frame-view "localsLabel"
|
|
163 |
+ :label-string label-string))
|
|
163 | 164 |
widgets))
|
164 | 165 |
(when (eq (di:debug-variable-validity v location) :valid)
|
165 | 166 |
(let ((value (di:debug-variable-value v frame))
|
... | ... | @@ -176,23 +177,23 @@ |
176 | 177 |
(cond
|
177 | 178 |
((not any-p)
|
178 | 179 |
(push
|
179 |
- (create-label frame-view "noLocals"
|
|
180 |
- :font-list *italic-font*
|
|
181 |
- :label-string
|
|
182 |
- " No local variables in function.")
|
|
180 |
+ (with-compound-strings
|
|
181 |
+ ((label-string " No local variables in function." +italic-tag+))
|
|
182 |
+ (create-label frame-view "noLocals"
|
|
183 |
+ :label-string label-string))
|
|
183 | 184 |
widgets))
|
184 | 185 |
((not any-valid-p)
|
185 | 186 |
(push
|
186 |
- (create-label frame-view "noValidLocals"
|
|
187 |
- :font-list *italic-font*
|
|
188 |
- :label-string
|
|
189 |
- " All variables have invalid values.")
|
|
187 |
+ (with-compound-strings
|
|
188 |
+ ((label-string " All variables have invalid values." +italic-tag+))
|
|
189 |
+ (create-label frame-view "noValidLocals"
|
|
190 |
+ :label-string label-string))
|
|
190 | 191 |
widgets))))
|
191 | 192 |
|
192 |
- (push (create-label frame-view "noVariableInfo"
|
|
193 |
- :font-list *italic-font*
|
|
194 |
- :label-string
|
|
195 |
- " No variable information available.")
|
|
193 |
+ (push (with-compound-strings
|
|
194 |
+ ((label-string " No variable information available." +italic-tag+))
|
|
195 |
+ (create-label frame-view "noVariableInfo"
|
|
196 |
+ :label-string label-string))
|
|
196 | 197 |
widgets))
|
197 | 198 |
(apply #'manage-children widgets)))
|
198 | 199 |
|
... | ... | @@ -203,9 +204,9 @@ |
203 | 204 |
;;;
|
204 | 205 |
(defun debug-display-frame-prompt (frame frame-view)
|
205 | 206 |
(let* ((form (create-form frame-view "promptForm"))
|
206 |
- (label (create-label form "framePrompt"
|
|
207 |
- :label-string "Frame Eval:"
|
|
208 |
- :font-list *header-font*))
|
|
207 |
+ (label (with-compound-strings ((label "Frame Eval:" +header-tag+))
|
|
208 |
+ (create-label form "framePrompt"
|
|
209 |
+ :label-string label)))
|
|
209 | 210 |
(entry (create-text form "frameEval"
|
210 | 211 |
:top-attachment :attach-widget
|
211 | 212 |
:top-widget label
|
... | ... | @@ -254,9 +255,9 @@ |
254 | 255 |
:callback 'frame-view-callback
|
255 | 256 |
:client-data
|
256 | 257 |
(di:debug-function-function debug-fun)))
|
257 |
- (slabel (create-label frame-view "sourceLabel"
|
|
258 |
- :font-list *header-font*
|
|
259 |
- :label-string "Source form:"))
|
|
258 |
+ (slabel (with-compound-strings ((label "Source form:" +header-tag+))
|
|
259 |
+ (create-label frame-view "sourceLabel"
|
|
260 |
+ :label-string label)))
|
|
260 | 261 |
(swindow (create-scrolled-window frame-view "frameSourceWindow"
|
261 | 262 |
:scrolling-policy :automatic
|
262 | 263 |
:scroll-bar-placement :bottom-right))
|
... | ... | @@ -378,12 +379,13 @@ |
378 | 379 |
'(("Close All Frames" close-all-callback)
|
379 | 380 |
("Dump Backtrace" dump-backtrace-callback)
|
380 | 381 |
("Quit Debugger" quit-debugger-callback))))
|
381 |
- (errlabel (create-label form "errorLabel"
|
|
382 |
- :top-attachment :attach-widget
|
|
383 |
- :top-widget menu-bar
|
|
384 |
- :left-attachment :attach-form
|
|
385 |
- :font-list *header-font*
|
|
386 |
- :label-string "Error Message:"))
|
|
382 |
+ (errlabel (with-compound-strings
|
|
383 |
+ ((label "Error Message:" +header-tag+))
|
|
384 |
+ (create-label form "errorLabel"
|
|
385 |
+ :top-attachment :attach-widget
|
|
386 |
+ :top-widget menu-bar
|
|
387 |
+ :left-attachment :attach-form
|
|
388 |
+ :label-string label)))
|
|
387 | 389 |
(errmsg (create-label form "errorMessage"
|
388 | 390 |
:top-attachment :attach-widget
|
389 | 391 |
:top-widget errlabel
|
... | ... | @@ -392,8 +394,7 @@ |
392 | 394 |
(rlabel (create-label form "restartLabel"
|
393 | 395 |
:top-attachment :attach-widget
|
394 | 396 |
:top-widget errmsg
|
395 |
- :left-attachment :attach-form
|
|
396 |
- :font-list *header-font*))
|
|
397 |
+ :left-attachment :attach-form))
|
|
397 | 398 |
(restarts (create-row-column form "debugRestarts"
|
398 | 399 |
:adjust-last nil
|
399 | 400 |
:top-attachment :widget
|
... | ... | @@ -401,12 +402,12 @@ |
401 | 402 |
:left-attachment :attach-form
|
402 | 403 |
:right-attachment :attach-form
|
403 | 404 |
:left-offset 10))
|
404 |
- (btlabel (create-label form "backtraceLabel"
|
|
405 |
- :label-string "Stack Backtrace:"
|
|
406 |
- :font-list *header-font*
|
|
407 |
- :top-attachment :attach-widget
|
|
408 |
- :top-widget restarts
|
|
409 |
- :left-attachment :attach-form))
|
|
405 |
+ (btlabel (with-compound-strings ((label "Stack Backtrace:" +header-tag+))
|
|
406 |
+ (create-label form "backtraceLabel"
|
|
407 |
+ :label-string label
|
|
408 |
+ :top-attachment :attach-widget
|
|
409 |
+ :top-widget restarts
|
|
410 |
+ :left-attachment :attach-form)))
|
|
410 | 411 |
(btwindow (create-scrolled-window form "backtraceWindow"
|
411 | 412 |
:scrolling-policy :automatic
|
412 | 413 |
:scroll-bar-placement :bottom-right
|
... | ... | @@ -431,9 +432,11 @@ |
431 | 432 |
|
432 | 433 |
(if *debug-restarts*
|
433 | 434 |
(progn
|
434 |
- (set-values rlabel :label-string "Restarts:")
|
|
435 |
+ (with-compound-strings ((label "Restarts:" +header-tag+))
|
|
436 |
+ (set-values rlabel :label-string label))
|
|
435 | 437 |
(debug-display-restarts restarts))
|
436 |
- (set-values rlabel :label-string "No restarts available"))
|
|
438 |
+ (with-compound-strings ((label "No restarts available" +header-tag+))
|
|
439 |
+ (set-values rlabel :label-string label)))
|
|
437 | 440 |
|
438 | 441 |
(let ((quick-stack (create-highlight-button backtrace "quickStack"
|
439 | 442 |
"Display Stack")))
|
... | ... | @@ -21,7 +21,7 @@ |
21 | 21 |
(defpackage "INTERFACE"
|
22 | 22 |
(:use "TOOLKIT" "LISP" "EXTENSIONS" "KERNEL")
|
23 | 23 |
(:shadow "CLASS-DIRECT-SUPERCLASSES")
|
24 |
- (:export "*HEADER-FONT*" "*ITALIC-FONT*" "*ENTRY-FONT*" "*INTERFACE-STYLE*"
|
|
24 |
+ (:export "*INTERFACE-STYLE*" "+HEADER-TAG+" "+ITALIC-TAG+"
|
|
25 | 25 |
"USE-GRAPHICS-INTERFACE" "VERIFY-SYSTEM-SERVER-EXISTS"
|
26 | 26 |
"CREATE-INTERFACE-SHELL" "POPUP-INTERFACE-PANE"
|
27 | 27 |
"CREATE-INTERFACE-PANE-SHELL" "FIND-INTERFACE-PANE"
|
... | ... | @@ -29,4 +29,4 @@ |
29 | 29 |
"SET-VALUE-BOX" "WITH-WIDGET-CHILDREN" "INTERFACE-ERROR"
|
30 | 30 |
"PRINT-FOR-WIDGET-DISPLAY" "WITH-BUSY-CURSOR"
|
31 | 31 |
"CREATE-INTERFACE-MENU" "CREATE-CACHED-MENU"
|
32 |
- "GRAB-OUTPUT-AS-STRING" "*ALL-FONTS*" "LISP-CONTROL-PANEL"))
|
|
32 |
+ "GRAB-OUTPUT-AS-STRING" "LISP-CONTROL-PANEL"))
|
... | ... | @@ -77,10 +77,10 @@ |
77 | 77 |
(declare (ignore widget call-data))
|
78 | 78 |
(multiple-value-bind (form shell)
|
79 | 79 |
(create-form-dialog pane "evalDialog")
|
80 |
- (let* ((s1 (compound-string-create "Eval: " "HeaderFont"))
|
|
80 |
+ (let* ((s1 (compound-string-create "Eval: " +header-tag+))
|
|
81 | 81 |
(s2 (compound-string-create
|
82 | 82 |
(format nil "[~a]" (print-for-widget-display "~S" object))
|
83 |
- "EntryFont"))
|
|
83 |
+ ""))
|
|
84 | 84 |
(s3 (compound-string-concat s1 s2))
|
85 | 85 |
(done (create-push-button-gadget form "evalDone"
|
86 | 86 |
:label-string "Done"
|
... | ... | @@ -98,7 +98,6 @@ |
98 | 98 |
(prompt (create-label-gadget form "evalPrompt"
|
99 | 99 |
:bottom-attachment :attach-widget
|
100 | 100 |
:bottom-widget entry
|
101 |
- :font-list *all-fonts*
|
|
102 | 101 |
:label-string s3))
|
103 | 102 |
(output (create-text form "evalOutput"
|
104 | 103 |
:edit-mode :multi-line-edit
|
... | ... | @@ -208,14 +207,16 @@ |
208 | 207 |
,``(("Eval Expression" popup-eval-callback ,pane ,,object)
|
209 | 208 |
("Close Pane" destroy-pane-callback ,,object)
|
210 | 209 |
("Close All Panes" close-all-callback))))
|
211 |
- (title (create-label-gadget
|
|
212 |
- over-form "inspectTitle"
|
|
213 |
- :label-string (inspector-pane-title ,object)
|
|
214 |
- :font-list *header-font*
|
|
215 |
- :top-attachment :attach-widget
|
|
216 |
- :top-widget menu-bar
|
|
217 |
- :left-attachment :attach-form
|
|
218 |
- :right-attachment :attach-form))
|
|
210 |
+ (title (with-compound-strings ((label-string
|
|
211 |
+ (inspector-pane-title ,object)
|
|
212 |
+ +header-tag+))
|
|
213 |
+ (create-label-gadget
|
|
214 |
+ over-form "inspectTitle"
|
|
215 |
+ :label-string label-string
|
|
216 |
+ :top-attachment :attach-widget
|
|
217 |
+ :top-widget menu-bar
|
|
218 |
+ :left-attachment :attach-form
|
|
219 |
+ :right-attachment :attach-form)))
|
|
219 | 220 |
(form (create-form over-form "inspectForm"
|
220 | 221 |
:left-attachment :attach-form
|
221 | 222 |
:right-attachment :attach-form
|
... | ... | @@ -424,15 +425,17 @@ |
424 | 425 |
:left-attachment :attach-form
|
425 | 426 |
:right-attachment :attach-form
|
426 | 427 |
:orientation :horizontal))
|
427 |
- (slabel (create-label-gadget controls "sequenceStartLabel"
|
|
428 |
- :font-list *header-font*
|
|
429 |
- :label-string "Start:"))
|
|
428 |
+ (slabel (with-compound-strings ((label-string
|
|
429 |
+ "Start:" +header-tag+))
|
|
430 |
+ (create-label-gadget controls "sequenceStartLabel"
|
|
431 |
+ :label-string label-string)))
|
|
430 | 432 |
(start (create-text controls "sequenceStart"
|
431 | 433 |
:value "0"
|
432 | 434 |
:columns 4))
|
433 |
- (clabel (create-label-gadget controls "sequenceCountLabel"
|
|
434 |
- :font-list *header-font*
|
|
435 |
- :label-string "Count:"))
|
|
435 |
+ (clabel (with-compound-strings ((label-string
|
|
436 |
+ "Count:" +header-tag+))
|
|
437 |
+ (create-label-gadget controls "sequenceCountLabel"
|
|
438 |
+ :label-string label-string)))
|
|
436 | 439 |
(count (create-text controls "sequenceCount"
|
437 | 440 |
:value "5"
|
438 | 441 |
:columns 4))
|
... | ... | @@ -442,9 +445,10 @@ |
442 | 445 |
:left-attachment :attach-form
|
443 | 446 |
:right-attachment :attach-form
|
444 | 447 |
:orientation :horizontal))
|
445 |
- (flabel (create-label-gadget filter "sequenceFilterLabel"
|
|
446 |
- :font-list *header-font*
|
|
447 |
- :label-string "Filter:"))
|
|
448 |
+ (flabel (with-compound-strings ((label-string
|
|
449 |
+ "Filter:" +header-tag+))
|
|
450 |
+ (create-label-gadget filter "sequenceFilterLabel"
|
|
451 |
+ :label-string label-string)))
|
|
448 | 452 |
(fexp (create-text filter "sequenceFilterExp" :value "T"))
|
449 | 453 |
(apply (create-push-button-gadget filter "sequenceFilterApply"
|
450 | 454 |
:label-string "Apply"))
|
... | ... | @@ -491,9 +495,9 @@ |
491 | 495 |
(manage-child rc)))))
|
492 | 496 |
|
493 | 497 |
(defun show-slot-list (object slot-list view allocp label)
|
494 |
- (let ((label (create-label-gadget view "slotLabel"
|
|
495 |
- :label-string label
|
|
496 |
- :font-list *header-font*))
|
|
498 |
+ (let ((label (with-compound-strings ((label-string label +header-tag+))
|
|
499 |
+ (create-label-gadget view "slotLabel"
|
|
500 |
+ :label-string label-string)))
|
|
497 | 501 |
(widgets))
|
498 | 502 |
(dolist (slotd slot-list)
|
499 | 503 |
(with-slots ((slot pcl::name) (allocation pcl::allocation))
|
... | ... | @@ -22,15 +22,6 @@ |
22 | 22 |
|
23 | 23 |
;;;; Globally defined variables
|
24 | 24 |
|
25 |
-(defparameter entry-font-name "-adobe-helvetica-medium-r-normal--*-120-75-*")
|
|
26 |
-(defparameter header-font-name "-adobe-helvetica-bold-r-normal--*-120-75-*")
|
|
27 |
-(defparameter italic-font-name "-adobe-helvetica-medium-o-normal--*-120-75-*")
|
|
28 |
- |
|
29 |
- |
|
30 |
-(defvar *header-font*)
|
|
31 |
-(defvar *italic-font*)
|
|
32 |
-(defvar *entry-font*)
|
|
33 |
-(defvar *all-fonts*)
|
|
34 | 25 |
|
35 | 26 |
(defvar *system-motif-server* nil)
|
36 | 27 |
|
... | ... | @@ -62,6 +53,17 @@ |
62 | 53 |
"This specifies the default interface mode for the debugger and inspector.
|
63 | 54 |
The allowable values are :GRAPHICS and :TTY.")
|
64 | 55 |
|
56 |
+;; Tags for compound strings' rendering of non-default text. Compound
|
|
57 |
+;; strings' tags are the keys Motif uses to look up style info in
|
|
58 |
+;; RenderTables. Tags are part of the "public" interface to
|
|
59 |
+;; customizing the GUI, so they're constants. We define them as
|
|
60 |
+;; (constant) variables here to avoid the possibility of typographical
|
|
61 |
+;; errors at call sites (typos would not be detectable errors; they'd
|
|
62 |
+;; simply be tags that aren't keys in any RenderTables). They're
|
|
63 |
+;; exported from INTERFACE only because the CLM debugger needs them.
|
|
64 |
+(defconstant +header-tag+ "header")
|
|
65 |
+(defconstant +italic-tag+ "italic")
|
|
66 |
+ |
|
65 | 67 |
|
66 | 68 |
|
67 | 69 |
;;;; Functions for dealing with interface widgets
|
... | ... | @@ -78,19 +80,7 @@ |
78 | 80 |
(with-motif-connection (con)
|
79 | 81 |
(setf (xti:motif-connection-close-hook *motif-connection*)
|
80 | 82 |
#'close-connection-hook)
|
81 |
- (setf *header-font*
|
|
82 |
- (build-simple-font-list "HeaderFont" header-font-name))
|
|
83 |
- (setf *italic-font*
|
|
84 |
- (build-simple-font-list "ItalicFont" italic-font-name))
|
|
85 |
- (setf *entry-font*
|
|
86 |
- (build-simple-font-list "EntryFont" entry-font-name))
|
|
87 |
- (setf *all-fonts*
|
|
88 |
- (build-font-list `(("EntryFont" ,entry-font-name)
|
|
89 |
- ("HeaderFont" ,header-font-name)
|
|
90 |
- ("ItalicFont" ,italic-font-name))))
|
|
91 |
- |
|
92 |
- (let ((shell (create-application-shell
|
|
93 |
- :default-font-list *entry-font*)))
|
|
83 |
+ (let ((shell (create-application-shell)))
|
|
94 | 84 |
(setf *lisp-interface-panes* (make-hash-table))
|
95 | 85 |
(setf *lisp-interface-menus* (make-hash-table :test #'equal))
|
96 | 86 |
(setf *lisp-interface-connection* con)
|
... | ... | @@ -110,7 +100,6 @@ |
110 | 100 |
(pane (or existing
|
111 | 101 |
(create-popup-shell "interfacePaneShell"
|
112 | 102 |
:top-level-shell shell
|
113 |
- :default-font-list *entry-font*
|
|
114 | 103 |
:keyboard-focus-policy :pointer
|
115 | 104 |
:title title
|
116 | 105 |
:icon-name title))))
|
... | ... | @@ -193,17 +182,17 @@ |
193 | 182 |
:margin-height 0
|
194 | 183 |
:margin-width 0
|
195 | 184 |
:orientation :horizontal))
|
196 |
- (label (create-label rc "valueLabel"
|
|
197 |
- :font-list *header-font*
|
|
198 |
- :label-string name))
|
|
185 |
+ (label (with-compound-strings ((name name +header-tag+))
|
|
186 |
+ (create-label rc "valueLabel"
|
|
187 |
+ :label-string name)))
|
|
199 | 188 |
(button (if activep
|
200 | 189 |
(create-highlight-button rc "valueObject"
|
201 | 190 |
(print-for-widget-display
|
202 | 191 |
"~S" value))
|
203 |
- (create-label rc "valueObject"
|
|
204 |
- :font-list *italic-font*
|
|
205 |
- :label-string
|
|
206 |
- (format nil "~A" value)))))
|
|
192 |
+ (with-compound-strings
|
|
193 |
+ ((value (format nil "~A" value) +italic-tag+))
|
|
194 |
+ (create-label rc "valueObject"
|
|
195 |
+ :label-string value)))))
|
|
207 | 196 |
(manage-children label button)
|
208 | 197 |
(when (and callback activep)
|
209 | 198 |
(add-callback button :activate-callback
|
... | ... | @@ -633,11 +622,12 @@ |
633 | 622 |
:bottom-attachment :attach-form
|
634 | 623 |
:right-attachment :attach-position
|
635 | 624 |
:right-position 50))
|
636 |
- (prompt (create-label form "inspectPrompt"
|
|
637 |
- :top-attachment :attach-widget
|
|
638 |
- :top-widget menu-bar
|
|
639 |
- :font-list *header-font*
|
|
640 |
- :label-string "Inspect new object:"))
|
|
625 |
+ (prompt (with-compound-strings ((prompt
|
|
626 |
+ "Inspect new object:" +header-tag+))
|
|
627 |
+ (create-label form "inspectPrompt"
|
|
628 |
+ :top-attachment :attach-widget
|
|
629 |
+ :top-widget menu-bar
|
|
630 |
+ :label-string prompt)))
|
|
641 | 631 |
(entry (create-text form "inspectEval"
|
642 | 632 |
:top-attachment :attach-widget
|
643 | 633 |
:top-widget prompt
|
... | ... | @@ -646,11 +636,12 @@ |
646 | 636 |
:left-attachment :attach-form
|
647 | 637 |
:right-attachment :attach-widget
|
648 | 638 |
:right-widget vsep))
|
649 |
- (hlabel (create-label form "inspectHistoryLabel"
|
|
650 |
- :top-attachment :attach-widget
|
|
651 |
- :top-widget entry
|
|
652 |
- :font-list *header-font*
|
|
653 |
- :label-string "Inspector History:"))
|
|
639 |
+ (hlabel (with-compound-strings ((prompt
|
|
640 |
+ "Inspector History:" +header-tag+))
|
|
641 |
+ (create-label form "inspectHistoryLabel"
|
|
642 |
+ :top-attachment :attach-widget
|
|
643 |
+ :top-widget entry
|
|
644 |
+ :label-string prompt)))
|
|
654 | 645 |
(hview (create-scrolled-list form "inspectHistory"
|
655 | 646 |
:visible-item-count 5
|
656 | 647 |
:left-offset 4
|
... | ... | @@ -662,13 +653,13 @@ |
662 | 653 |
:right-attachment :attach-widget
|
663 | 654 |
:right-widget vsep
|
664 | 655 |
:bottom-attachment :attach-form))
|
665 |
- (flabel (create-label form "filesLabel"
|
|
666 |
- :left-attachment :attach-widget
|
|
667 |
- :left-widget vsep
|
|
668 |
- :top-attachment :attach-widget
|
|
669 |
- :top-widget menu-bar
|
|
670 |
- :label-string "Files:"
|
|
671 |
- :font-list *header-font*))
|
|
656 |
+ (flabel (with-compound-strings ((prompt "Files:" +header-tag+))
|
|
657 |
+ (create-label form "filesLabel"
|
|
658 |
+ :left-attachment :attach-widget
|
|
659 |
+ :left-widget vsep
|
|
660 |
+ :top-attachment :attach-widget
|
|
661 |
+ :top-widget menu-bar
|
|
662 |
+ :label-string prompt)))
|
|
672 | 663 |
(frc (create-row-column form "filesButtons"
|
673 | 664 |
:packing :pack-column
|
674 | 665 |
:num-columns 2
|
... | ... | @@ -694,13 +685,13 @@ |
694 | 685 |
:left-offset 4
|
695 | 686 |
:right-offset 4
|
696 | 687 |
:bottom-offset 4))
|
697 |
- (alabel (create-label form "aproposLabel"
|
|
698 |
- :label-string "Apropos:"
|
|
699 |
- :font-list *header-font*
|
|
700 |
- :left-attachment :attach-widget
|
|
701 |
- :left-widget vsep
|
|
702 |
- :bottom-attachment :attach-widget
|
|
703 |
- :bottom-widget apropos))
|
|
688 |
+ (alabel (with-compound-strings ((prompt "Apropos:" +header-tag+))
|
|
689 |
+ (create-label form "aproposLabel"
|
|
690 |
+ :label-string prompt
|
|
691 |
+ :left-attachment :attach-widget
|
|
692 |
+ :left-widget vsep
|
|
693 |
+ :bottom-attachment :attach-widget
|
|
694 |
+ :bottom-widget apropos)))
|
|
704 | 695 |
(hsep (create-separator form "separator"
|
705 | 696 |
:left-attachment :attach-widget
|
706 | 697 |
:left-widget vsep
|
... | ... | @@ -139,7 +139,7 @@ |
139 | 139 |
"TEXT-CALLBACK-FORMAT" "*DEBUG-MODE*" "*DEFAULT-SERVER-HOST*"
|
140 | 140 |
"*CLM-BINARY-DIRECTORY*" "*CLM-BINARY-NAME*"
|
141 | 141 |
"*DEFAULT-DISPLAY*" "QUIT-APPLICATION" "WITH-MOTIF-CONNECTION"
|
142 |
- "RUN-MOTIF-APPLICATION" "WITH-CLX-REQUESTS"
|
|
142 |
+ "RUN-MOTIF-APPLICATION" "WITH-CLX-REQUESTS" "WITH-COMPOUND-STRINGS"
|
|
143 | 143 |
"BUILD-SIMPLE-FONT-LIST" "BUILD-FONT-LIST" "*MOTIF-CONNECTION*"
|
144 | 144 |
"*X-DISPLAY*" "WIDGET" "XMSTRING" "FONT-LIST" "SET-VALUES"
|
145 | 145 |
"GET-VALUES" "CREATE-MANAGED-WIDGET" "CREATE-WIDGET"
|
... | ... | @@ -89,6 +89,16 @@ |
89 | 89 |
(popdown target))
|
90 | 90 |
(popdown widget)))
|
91 | 91 |
|
92 |
+;; Another randomly placed useful thing.
|
|
93 |
+(defmacro with-compound-strings ((&rest specs) &body body)
|
|
94 |
+ `(let ,(mapcar
|
|
95 |
+ (lambda (spec)
|
|
96 |
+ `(,(car spec)
|
|
97 |
+ (compound-string-create ,(cadr spec) (or ,(caddr spec) ""))))
|
|
98 |
+ specs)
|
|
99 |
+ (unwind-protect (progn ,@body)
|
|
100 |
+ ,@(mapcar (lambda (spec) `(compound-string-free ,(car spec))) specs))))
|
|
101 |
+ |
|
92 | 102 |
|
93 | 103 |
|
94 | 104 |
;;;; A convenient (and CLM compatible) way to start Motif applications
|