From 4437d80133b55b18041da26dd1571df274b3e49d Mon Sep 17 00:00:00 2001 From: Henrik Lissner Date: Mon, 18 Feb 2019 01:58:50 -0500 Subject: [PATCH] Add dos2unix & unix2dos conversion commands --- core/autoload/editor.el | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/core/autoload/editor.el b/core/autoload/editor.el index 45335b37a..5fe041437 100644 --- a/core/autoload/editor.el +++ b/core/autoload/editor.el @@ -281,6 +281,19 @@ selected, then the current line." (setq beg (line-beginning-position) end (line-end-position))) (comment-or-uncomment-region beg end))) +;;;###autoload +(defun doom/dos2unix () + "Convert the current buffer to a Unix file encoding." + (interactive) + (set-buffer-file-coding-system 'undecided-unix nil)) + +;;;###autoload +(defun doom/unix2dos () + "Convert the current buffer to a DOS file encoding." + (interactive) + (set-buffer-file-coding-system 'undecided-dos nil)) + + ;; ;; Advice