This repository was archived by the owner on Nov 26, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +1
-10
lines changed
Expand file tree Collapse file tree 1 file changed +1
-10
lines changed Original file line number Diff line number Diff line change @@ -458,16 +458,6 @@ This is written mainly to be used as `end-of-defun-function' for Zig."
458458 '(" enum" " struct" " union" ))
459459 `((" Fn" ,(zig-re-definition " fn" ) 1 ))))
460460
461- (defun zig-file-coding-system ()
462- " Guarantee filesystem unix line endings."
463- (with-current-buffer (current-buffer )
464- (if (buffer-file-name )
465- (if (string-match " \\ .d?zig\\ '" buffer-file-name)
466- (setq buffer-file-coding-system 'utf-8-unix )
467- nil ))))
468-
469- (add-hook 'zig-mode-hook 'zig-file-coding-system )
470-
471461(defvar zig-mode-map
472462 (let ((map (make-sparse-keymap )))
473463 (define-key map (kbd " C-c C-b" ) #'zig-compile )
@@ -493,6 +483,7 @@ This is written mainly to be used as `end-of-defun-function' for Zig."
493483 (setq-local indent-tabs-mode nil ) ; Zig forbids tab characters.
494484 (setq-local syntax-propertize-function 'zig-syntax-propertize )
495485 (setq-local imenu-generic-expression zig-imenu-generic-expression)
486+ (setq buffer-file-coding-system 'utf-8-unix ) ; zig source is always utf-8
496487 (setq font-lock-defaults '(zig-font-lock-keywords
497488 nil nil nil nil
498489 (font-lock-syntactic-face-function . zig-mode-syntactic-face-function)))
You can’t perform that action at this time.
0 commit comments