Skip to content

Commit e156482

Browse files
authored
Detect auto-mode for dune-project files in emacs (#4222)
This lets emacs automatically switch to dune-mode when visiting a dune-project file. Signed-off-by: Shon Feder <shon.feder@gmail.com>
1 parent 5506bc5 commit e156482

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGES.md

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ Unreleased
2828
- Improve location of variables and macros in error messages (#4205,
2929
@jeremiedimino)
3030

31+
- Auto-detect `dune-project` files as `dune` files in Emacs (#4222, @shonfeder)
32+
3133
2.8.2 (21/01/2021)
3234
------------------
3335

editor-integration/emacs/dune.el

+1-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ For customization purposes, use `dune-mode-hook'."
395395

396396
;;;###autoload
397397
(add-to-list 'auto-mode-alist
398-
'("\\(?:\\`\\|/\\)dune\\(?:\\.inc\\)?\\'" . dune-mode))
398+
'("\\(?:\\`\\|/\\)dune\\(?:\\.inc\|-project\\)?\\'" . dune-mode))
399399

400400

401401
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

0 commit comments

Comments
 (0)