bug-gnu-emacs
[Top][All Lists]
Advanced

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

bug#14442: On syntax decoration of identifiers containing underscore and


From: Glenn Morris
Subject: bug#14442: On syntax decoration of identifiers containing underscore and statements word [f90]
Date: Thu, 23 May 2013 21:03:42 -0400
User-agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/)

Stefan Monnier wrote:

> At least this problem was not introduced by my recent change.  It was
> already present in Emacs-24.2 (among other versions).

No, it is extremely long-standing behaviour that I am in no hurry to
change. ( Like the syntax thing. :) )

> The patch below seems to fix it, but I don't know enough the rules of
> Fortran syntax to be sure it's the right thing to do.

Indeed there are some cases where spaces are optional (eg "else if" ==
"elseif"), and some where they are not. This is probably why there are
lots of "[ \t]*" in f90.el.

> -    '("\\_<\\(implicit\\)[ \t]*\\(real\\|integer\\|c\\(haracter\\|omplex\\)\
> +    '("\\_<\\(implicit\\)[ \t]+\\(real\\|integer\\|c\\(haracter\\|omplex\\)\

Probably correct, since I think the space is required in this case.

> -    '("\\_<\\(namelist\\|common\\)[ \t]*\/\\(\\(?:\\sw\\|\\s_\\)+\\)?\/"
> +    '("\\_<\\(namelist\\|common\\)[ \t]*/\\(\\(?:\\sw\\|\\s_\\)+\\)?\/"

Unrelated cosmetic change? You missed the final "\/" BTW.

> -    '("\\_<\\(exit\\|cycle\\)[ \t]*\\(\\(?:\\sw\\|\\s_\\)+\\)?\\_>"
> +    '("\\_<\\(exit\\|cycle\\)[ \t]+\\(\\(?:\\sw\\|\\s_\\)+\\)?\\_>"

Breaks highlighting of plain "exit" (the following label is optional).





reply via email to

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