-
Notifications
You must be signed in to change notification settings - Fork 129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Decipher auto-mode-alist
regexp and unbreak .yml
support
#114
Conversation
Oh, turns out it's being tested, I'm wondering why |
5f94cb3
to
c35a9ff
Compare
I noticed that `.yml` files are not being opened in YAML mode. Further research showed almost unreadable regular expression, which apparently supposed to support `.yml` files, but failed to do so. Digging into the history to see what exactly extensions were supposed to be supported by this regexp showed: * raml — commit c4fd940 * eyaml, eyml — commit 11df403 * yml, yaml — prior to above commits So use `rx` macro to enlist aforementioned extensions explicitly, and unbreak support for `yml` at the same time.
c35a9ff
to
c5f3b4a
Compare
lol, I was wondering why my addition of |
I'm afraid this is not correct. The regexp matches against Please check if you use the latest version. If it doesn't fix your problem, please check your configuration files. BTW I think emacs developers are familiar with elisp regexp so we don't need to use (set-face-foreground 'font-lock-regexp-grouping-backslash "brightmagenta")
(set-face-foreground 'font-lock-regexp-grouping-construct "brightgreen") |
I feel like this is already a lost battle… but don't you think regexp optimization is better left to |
Don't get me wrong: I can do that given enough time. Like, spending ½ an hour… But why bother if you can have the list right away 🤷♂️ |
Btw, if you consider this regexp so readable, why did you add a test that makes sure that the mode gets enabled for all extensions. I mean, it's hard to introduce a bug to this string, right? |
I noticed that
.yml
files are not being opened in YAML mode. Further research showed almost unreadable regular expression, which apparently supposed to support.yml
files, but failed to do so. Digging into the history to see what exactly extensions were supposed to be supported by this regexp showed:So use
rx
macro to enlist aforementioned extensions explicitly, and unbreak support foryml
at the same time.CC: @rhoml @scop