Geany editor newLISP definition file

Started by joejoe, June 05, 2012, 03:30:40 PM

Previous topic - Next topic

joejoe

Hi, the Geany [0] editor comes with a LISP filetype definition file [1].



I would like to modify this to make it newLISP friendly. I would like any additional suggestion over what I am here asking if is the logical approach to modifying this LISP definition file to make a newLISP definition file.



From what I can see, I know I should change the keywords= line by removing the existing keywords and put in the newLISP expression and function words, like:


keywords=+ / div mul and or define find-all ...

to include all the words listed on the left hand side of the newLISP manual (frame) [2].



My questions are these:



+ What might be the difference between keywords= and special_keywords= ?

+ Based on these [3] config options, is there anything else I would need to change in the file?



Thanks!



[0] http://geany.org/">http://geany.org/

[1] https://bazaar.launchpad.net/~haaaad/geany/master/view/head:/data/filetypes.lisp">https://bazaar.launchpad.net/~haaaad/ge ... types.lisp">https://bazaar.launchpad.net/~haaaad/geany/master/view/head:/data/filetypes.lisp

[2] http://www.newlisp.org/downloads/manual_frame.html">http://www.newlisp.org/downloads/manual_frame.html

[3] http://www.geany.org/manual/current/index.html#filetype-configuration">http://www.geany.org/manual/current/ind ... figuration">http://www.geany.org/manual/current/index.html#filetype-configuration

PapoAnaya

#1
Hi:



It's been a while since I've played with Geany's configuration files.



[*] keywords vs. special keywords = one color vs another color. It will be probably up to your taste to decide one vs another and see how colorization helps you. I took a look at the newlisp.el and all the keywords are in "keywords".  What you can do is to take, for example predicates, and put it in special keywords to distinguish them, or define or define-macro to make it easier to identify function definitions. It's probably one of those things that you should play around and find what you like. :)
[/*]
  • [*]
    What would I change? Default extension, you might want to use .lsp than .lisp. run_cmd from clisp (common LISP) to newlisp, of course.
  • [/list]

    joejoe

    #2
    Thanks PapoAnaya!



    I will take your advice on putting comparison function predicates in the special keywords list.



    .lsp seems standard, too, so I will use that. Much appreciated!

    Ishpeck

    #3
    I've been wanting this for quite a while.  I tried a few times to make it but never had the determination.  Too bad I've sworn Geany off in favor of Emacs already.

    Darth.Severus

    #4
    Thanks for all these infos, but here is one more thing:

    I took the keywords from (symbols), but the ^ sign should not be in the keyword list, or everything will be highlighted.



    Other thing: I have run_cmd=newlisp "%f" in my file, but when I click to execute a window appears only for a moment. Removing "%f" causes nothing.