about summary refs log tree commit diff stats
path: root/lisp
diff options
context:
space:
mode:
authorCase Duckworth2021-05-02 14:15:17 -0500
committerCase Duckworth2021-05-02 14:15:17 -0500
commit666e7c53b44ea4132ed699d001aede7e73ea41fb (patch)
treeefc3cc1e0167b203964a4fa20540d9e162239612 /lisp
parentAdd ledger-mode (diff)
parentAdd `dos2unix' (diff)
downloademacs-666e7c53b44ea4132ed699d001aede7e73ea41fb.tar.gz
emacs-666e7c53b44ea4132ed699d001aede7e73ea41fb.zip
Merge branch 'main' of https://tildegit.org/acdw/emacs
Diffstat (limited to 'lisp')
-rw-r--r--lisp/acdw.el8
1 files changed, 8 insertions, 0 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el index ab02a9e..f297691 100644 --- a/lisp/acdw.el +++ b/lisp/acdw.el
@@ -30,6 +30,14 @@
30 30
31;;; Utility functions 31;;; Utility functions
32 32
33(defun dos2unix (buffer)
34 "Replace \r\n with \n in BUFFER."
35 (interactive "*b")
36 (save-excursion
37 (goto-char (point-min))
38 (while (search-forward (string ?\C-m ?\C-j) nil t)
39 (replace-match (string ?\C-j) nil t))))
40
33(defun expand-file-name-exists-p (&rest expand-file-name-args) 41(defun expand-file-name-exists-p (&rest expand-file-name-args)
34 "Call `expand-file-name' on EXPAND-FILE-NAME-ARGS, returning 42 "Call `expand-file-name' on EXPAND-FILE-NAME-ARGS, returning
35 its name if it exists, or NIL otherwise." 43 its name if it exists, or NIL otherwise."