diff options
Diffstat (limited to 'lisp/+util.el')
-rw-r--r-- | lisp/+util.el | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/+util.el b/lisp/+util.el index 0184a48..fb77278 100644 --- a/lisp/+util.el +++ b/lisp/+util.el | |||
@@ -79,6 +79,14 @@ ALIGNMENT can be one of these: | |||
79 | 79 | ||
80 | ;;; COMMANDS | 80 | ;;; COMMANDS |
81 | 81 | ||
82 | (defun +dos2unix (buffer) | ||
83 | "Replace \r\n with \n in BUFFER." | ||
84 | (interactive "*b") | ||
85 | (save-excursion | ||
86 | (with-current-buffer buffer | ||
87 | (goto-char (point-min)) | ||
88 | (while (search-forward (string ?\C-m ?\C-j) nil t) | ||
89 | (replace-match (string ?\C-j) nil t))))) | ||
82 | 90 | ||
83 | (provide '+util) | 91 | (provide '+util) |
84 | ;;; +util.el ends here | 92 | ;;; +util.el ends here |