Add dos2unix & unix2dos conversion commands
This commit is contained in:
parent
6956525f79
commit
4437d80133
1 changed files with 13 additions and 0 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue