mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Add dos2unix & unix2dos conversion commands
This commit is contained in:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user