[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/zig-mode b0eb489 051/104: [+] Guarantee Unix line endings
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/zig-mode b0eb489 051/104: [+] Guarantee Unix line endings to avoid compiler complaining with DOS carriage return |
Date: |
Sun, 29 Aug 2021 11:37:01 -0400 (EDT) |
branch: elpa/zig-mode
commit b0eb489668d24d39841b25dede9a6359527b63eb
Author: serialdev <carlos.mariscal.melgar@gmail.com>
Commit: serialdev <carlos.mariscal.melgar@gmail.com>
[+] Guarantee Unix line endings to avoid compiler complaining with DOS
carriage return
---
zig-mode.el | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/zig-mode.el b/zig-mode.el
index e2932cd..3b89788 100644
--- a/zig-mode.el
+++ b/zig-mode.el
@@ -298,6 +298,16 @@
'("enum" "struct" "union"))
`(("Fn" ,(zig-re-definition "fn") 1))))
+;;; Guarantee filesystem unix line endings
+(defun zig-file-coding-system ()
+ (with-current-buffer (current-buffer)
+ (if (string-match "\\.d?zig\\'" buffer-file-name)
+ (setq buffer-file-coding-system 'utf-8-unix)
+ nil)
+))
+
+(add-hook 'zig-mode-hook 'zig-file-coding-system)
+
;;;###autoload
(define-derived-mode zig-mode prog-mode "Zig"
"A major mode for the Zig programming language."
- [nongnu] branch elpa/zig-mode created (now acf3ee8), ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 9bdc960 025/104: Support multiline string literals (#8), ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode b410d5a 031/104: Add AppVeyor config, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode f26f5d0 033/104: Add "Testing" and "License" sections to README.md, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode b0eb489 051/104: [+] Guarantee Unix line endings to avoid compiler complaining with DOS carriage return,
ELPA Syncer <=
- [nongnu] elpa/zig-mode 32aec72 064/104: Add previous-line doc comments, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 8df4efd 078/104: Merge pull request #33 from joachimschmidt557/use-rx, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 6a3522f 084/104: Merge pull request #45 from joachimschmidt557/revert-rx, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 88b429d 083/104: Merge pull request #46 from travv0/master, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 8f59f86 089/104: Implement beginning/end-of-defun, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 9ad0ccf 008/104: Indentation is 4 spaces by default., ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode ff0bc79 006/104: Full symbols., ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 814657c 018/104: Update syntax, ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode a4f1e11 022/104: Just disable syntactic indentation (it's broken), ELPA Syncer, 2021/08/29
- [nongnu] elpa/zig-mode 51a99d1 023/104: Add alternate install instructions to the README (#9), ELPA Syncer, 2021/08/29