Enable nxml-mode for .csproj files
This commit is contained in:
parent
76f9a50c45
commit
34b78655c2
2 changed files with 14 additions and 1 deletions
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
;; Author: Tom Willemse <tom@ryuslash.org>
|
;; Author: Tom Willemse <tom@ryuslash.org>
|
||||||
;; Keywords: local
|
;; Keywords: local
|
||||||
;; Version: 2020.0128.214417
|
;; Version: 2020.0128.221359
|
||||||
;; Package-Requires: (csharp-mode omnisharp oni-company oni-flycheck)
|
;; Package-Requires: (csharp-mode omnisharp oni-company oni-flycheck)
|
||||||
|
|
||||||
;; This program is free software; you can redistribute it and/or modify
|
;; This program is free software; you can redistribute it and/or modify
|
||||||
|
@ -94,6 +94,9 @@
|
||||||
;;;###autoload
|
;;;###autoload
|
||||||
(add-to-list 'auto-mode-alist '("\\.xaml\\'" . nxml-mode))
|
(add-to-list 'auto-mode-alist '("\\.xaml\\'" . nxml-mode))
|
||||||
|
|
||||||
|
;;;###autoload
|
||||||
|
(add-to-list 'auto-mode-alist '("\\.csproj\\'" . nxml-mode))
|
||||||
|
|
||||||
;;;###autoload(with-eval-after-load 'csharp-mode (require 'oni-csharp))
|
;;;###autoload(with-eval-after-load 'csharp-mode (require 'oni-csharp))
|
||||||
|
|
||||||
(provide 'oni-csharp)
|
(provide 'oni-csharp)
|
||||||
|
|
|
@ -19,3 +19,13 @@
|
||||||
|
|
||||||
[[ "$output" == *"nxml-mode" ]]
|
[[ "$output" == *"nxml-mode" ]]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@test "Opening a .csproj file loads nxml-mode" {
|
||||||
|
run emacs -batch -l package -f package-initialize \
|
||||||
|
-visit test.csproj \
|
||||||
|
-eval "(prin1 major-mode)"
|
||||||
|
|
||||||
|
echo "$output"
|
||||||
|
|
||||||
|
[[ "$output" == *"nxml-mode" ]]
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue