From: "Mattias Engdegård" <mattiase@acm.org>
To: Lars Ingebrigtsen <larsi@gnus.org>
Cc: Luca Cartasegna <cartasegna.luca@gmail.com>, 17222@debbugs.gnu.org
Subject: bug#17222: 24.3; In f90-mode variables declared in continuation lines are not colored.
Date: Tue, 17 May 2022 17:20:46 +0200 [thread overview]
Message-ID: <FFF4C6D0-6B22-405C-9B81-616891CAC393@acm.org> (raw)
In-Reply-To: <CAHohJem73cK--93tePpB7WrU69DUu_XQTosfqYhf4+RkEn-0Rw@mail.gmail.com>
> I've now fixed this in Emacs 29:
Thank you for doing this. Relint complained about this part:
-\\(.*::\\|[ \t]*(.*)\\)?\\([^&!\n]*\\)"
- (1 font-lock-type-face t) (4 font-lock-variable-name-face t))
+\\(.*::\\|[ \t]*(.*)\\)?\\(\\(?:[^&!\n]*\\(?:&\n\\)?\\)+\\)"
+ (1 font-lock-type-face t) (4 font-lock-variable-name-face append))
More specifically, the
\\(?:[^&!\n]*\\(?:&\n\\)?\\)+
part at the end is a potential empty-string repetition that indicates an ambiguity which we'd like to remove.
What is the desired grammar here? Moving to rx for clarity, the above snippet means
(+ (* (not (in "\n!&")))
(? "&\n"))
What about rewriting it as
(: (* (not (in "\n!&")))
(* "&\n"
(* (not (in "\n!&")))))
which should be equivalent but unambiguous?
However there may be something more fundamentally wrong with the original change, because it only seems to work for me after loading a file, not when writing the code incrementally. More precisely, when I've typed
program main
integer :: alpha, &&
in a new buffer then everything looks correctly coloured, but if I add
beta
to the next line then it isn't fontified at all. Saving and reloading the buffer helps. Can you confirm?
next prev parent reply other threads:[~2022-05-17 15:20 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-08 14:45 bug#17222: 24.3; In f90-mode variables declared in continuation lines are not colored Luca Cartasegna
2022-05-11 14:12 ` Lars Ingebrigtsen
2022-05-17 15:20 ` Mattias Engdegård [this message]
2022-05-17 17:32 ` Lars Ingebrigtsen
2022-05-24 15:40 ` Mattias Engdegård
2022-05-24 16:03 ` Lars Ingebrigtsen
2022-05-24 18:18 ` Mattias Engdegård
2022-05-25 0:17 ` Lars Ingebrigtsen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=FFF4C6D0-6B22-405C-9B81-616891CAC393@acm.org \
--to=mattiase@acm.org \
--cc=17222@debbugs.gnu.org \
--cc=cartasegna.luca@gmail.com \
--cc=larsi@gnus.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.