Use EOS instead of EOL for auto mode regexp

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.
This commit is contained in:
Youmu 2020-10-02 00:52:59 +08:00 committed by Bozhidar Batsov
parent 3a31d587cf
commit 5a253c1445

View file

@ -35,7 +35,7 @@
(push '("<\\?xml" . nxml-mode) magic-mode-alist) (push '("<\\?xml" . nxml-mode) magic-mode-alist)
;; pom files should be treated as xml files ;; 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-child-indent 4)
(setq nxml-attribute-indent 4) (setq nxml-attribute-indent 4)