Skip to content

Commit

Permalink
Use EOS instead of EOL for auto mode regexp
Browse files Browse the repository at this point in the history
This prevent matching filename like "xxxx.pom\nxxxx". A corner case which satisfies POSIX filename standard but weird for daily use.
I found many regexp in auto-mode-alist are ended with \\' but typescript-mode use $. So curiosity drives me to find the answer.
You can create a file which name contains a linebreak by pressing C-j in find-file prompt.
  • Loading branch information
condy0919 authored and Parent5446 committed Jan 5, 2021
1 parent 53ade97 commit 2d34e1e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/prelude-xml.el
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
(push '("<\\?xml" . nxml-mode) magic-mode-alist)

;; pom files should be treated as xml files
(add-to-list 'auto-mode-alist '("\\.pom$" . nxml-mode))
(add-to-list 'auto-mode-alist '("\\.pom\\'" . nxml-mode))

(setq nxml-child-indent 4)
(setq nxml-attribute-indent 4)
Expand Down

0 comments on commit 2d34e1e

Please sign in to comment.