initget
How can I use keywords with a space for displaying in the prompt menu? Developer reference: "When defining your list of keywords, separate each keyword with a space."
How can I display the name of the lisp function in the prompt menu?
Comments
-
> How can I use keywords with a space?
Use ALT+0160 (=hard space) instead of normal space
> How can I display the name of the lisp function in the prompt menu?
No doubt this is not what you mean, and I am thinking too simplistically, but isn't the name of a lisp function just another word that can be used as a keyword?
(defun c:TestInit ()
(initget "X space Y space Testinit")
; Note 1: the white space after X and Y is a hard space
; Note 2: Testinit can not be spelled as TestInit here
(setq opt (getkword "\nOptions [X space/Y space/TestInit]: "))
(princ opt)
(princ)
)0 -
Please note that if you copy the code (defun c:TestInit... the hard spaces are lost. So before trying this lisp first replace the normal spaces after X and Y with hard space!
0 -
Perfectly, the hard space trick works! Thank's a lot!
The prompt menu has a headline, that I want to fill with the respective prompt for input but at least with the name of the lisp function.
0 -
Since Version 10.2.5 the prompt menu of my own lisp files is absent. Is there a new way to display it?
0 -
This is fixed in version 10.2.6
0