[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nano-devel] Some linters and syntax

From: Benno Schulenberg
Subject: Re: [Nano-devel] Some linters and syntax
Date: Tue, 31 Mar 2015 17:12:57 +0200

Hi Mark,

On Tue, Mar 31, 2015, at 01:40, Mark Oteiza wrote:
> With the new release, I got curious about nano and its new features, and
> decided to play with it.

Nice.  :)

>   extendsyntax c linter gcc -fshow-column

When I run that on nano's src/color.c, it says (among many other things):
  [ src/color.c:82:2: error: ‘colortype’ has no member named ‘next’ ].
But it does.  What's up with that?  (You may not; I just wonder.)

>   extendsyntax python linter pyflakes

When I run that, without pyflakes even being installed:
  [ Got 0 parsable lines from command: pyflakes ]
So we need a better message when a command does not exist.

>   extendsyntax ruby linter ruby -w -c
>   extendsyntax sh linter dash -n
>   extendsyntax tex linter chktex -v0 -q -I
> It would be pretty convenient if nano shipped with some linter
> definitions.

It would.  Chris?  Okay to add?

> I also tried my hand at syntax files, writing ones for Guile scheme and
> Emacs lisp. I'm sure they could use improvement, for instance:
> * For Emacs lisp I don't know how to highlight multiline strings
>   (docstrings)

After a quick google for elisp docstring, it seems such a string
starts with some whitespace at the start of the line followed
by a doublequote.  And it ends with a double quote at the end
of a line, with nothing after it.  So... does this work:

color yellow  start="^[[:blank:]]+\""  end="\"$"

Or if you think a doc string should always end with a period:

color yellow  start="^[[:blank:]]+\""  end="\.\"$"

> * In both lisps, if we want to highlight the `foo` function, there is
>   nothing stopping a function like `foo-bar` having just `foo`
>   highlighted, which looks weird.

I don't follow.  Where in your elisp file is there a regex that
colours function names?


-- - Or how I learned to stop worrying and
                          love email again

reply via email to

[Prev in Thread] Current Thread [Next in Thread]