Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why are parenscript functions changed to all lowercase?

Tags:

case

lisp

When using parenscript if I execute

(parenscript:ps 
 (slot-value ($ "#mytextarea") 'selectionStart))

It produces the javascript

$('#mytextarea').selectionstart;

Note that selectionStart is now selectionstart. It lost the uppercase S on the Start! How do I keep that uppercase S around?

like image 719
Jim Avatar asked Oct 20 '09 21:10

Jim


1 Answers

Parenscript will automatically convert from the lisp naming convention (dashes separating words) to CamelCase, so:

(parenscript:ps 
 (slot-value ($ "#mytextarea") 'selection-start))

results in

"$('#mytextarea').selectionStart;"
like image 119
Ramarren Avatar answered Nov 15 '22 10:11

Ramarren