Common Lisp supports keyword arguments, which are used as follows:
(defun foo (&key x y)
...)
(foo :x "Hello!")
(foo :x "Hello!" :y "Bye!")
Internally, a keyword argument name is actually a self-evaluating symbol in
the KEYWORD package. In other words, the following to expressions are
conceptually equivalent:
:x
'keyword:x
Therefore, it seems best to highlight keyword argument names using
SCE_LISP_SYMBOL, and to include the leading ":" character in the
highlighted name.
For more information on keyword arguments, please see:
http://www.ai.mit.edu/projects/iiip/doc/CommonLISP/HyperSpec/Body/sec_3-4-1
-4.html
http://www.gigamonkeys.com/book/functions.html (scroll down)
Thank you for such a useful editor library!
Eric Kidd
Nobody/Anonymous ( nobody ) - 2009-05-21 16:18
5
Closed
None
Neil Hodgson
Scintilla
Completed
Public
|
Date: 2009-05-22 09:47 Thank you for merging the LexLisp patches! |
|
Date: 2009-05-21 23:17 Committed. |
| Filename | Description | Download |
|---|---|---|
| 0001-LexLisp-Colourise-keyword-arguments-as-symbols.patch | LexLisp keyword argument patch | Download |
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2009-07-03 03:59 | nyamatongwe |
| allow_comments | 1 | 2009-07-03 03:59 | nyamatongwe |
| close_date | - | 2009-07-03 03:59 | nyamatongwe |
| artifact_group_id | None | 2009-05-21 23:17 | nyamatongwe |
| assigned_to | nobody | 2009-05-21 23:17 | nyamatongwe |
| File Added | 327934: 0001-LexLisp-Colourise-keyword-arguments-as-symbols.patch | 2009-05-21 16:18 | nobody |