Geany editor newLISP definition file

Q&A's, tips, howto's
Locked
joejoe
Posts: 173
Joined: Thu Jun 25, 2009 5:09 pm
Location: Denver, USA

Geany editor newLISP definition file

Post by 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

Code: Select all

keywords=
line by removing the existing keywords and put in the newLISP expression and function words, like:

Code: Select all

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/
[1] https://bazaar.launchpad.net/~haaaad/ge ... types.lisp
[2] http://www.newlisp.org/downloads/manual_frame.html
[3] http://www.geany.org/manual/current/ind ... figuration

PapoAnaya
Posts: 16
Joined: Mon Oct 24, 2005 6:55 pm

Re: Geany editor newLISP definition file

Post by PapoAnaya »

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.

joejoe
Posts: 173
Joined: Thu Jun 25, 2009 5:09 pm
Location: Denver, USA

Re: Geany editor newLISP definition file

Post by joejoe »

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
Posts: 14
Joined: Thu Jun 09, 2011 3:53 am

Re: Geany editor newLISP definition file

Post by Ishpeck »

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
Posts: 14
Joined: Mon Sep 17, 2012 3:28 am

Re: Geany editor newLISP definition file

Post by Darth.Severus »

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

Code: Select all

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

Locked