ocaml-ocp-indent/ocaml-ocp-indent-emacs.patch

32 lines
1.0 KiB
Diff

--- a/tools/ocp-indent.el 2019-10-23 07:04:10.000000000 -0600
+++ b/tools/ocp-indent.el 2021-02-23 09:00:39.282453922 -0700
@@ -28,7 +28,7 @@
;;; Code:
-(require 'cl)
+(require 'cl-lib)
(defgroup ocp-indent nil
"ocp-indent OCaml indenter binding configuration"
@@ -76,8 +76,8 @@ are blanks."
(list "--numeric"
"--lines" (format "%d-%d" start-line end-line))
(if ocp-indent-config (list "--config" ocp-indent-config) nil)
- (reduce (lambda (acc syn) (list* "--syntax" syn acc))
- ocp-indent-syntax :initial-value nil)))
+ (cl-reduce #'(lambda (acc syn) (cl-list* "--syntax" syn acc))
+ ocp-indent-syntax :initial-value nil)))
(defun ocp-indent-file-to-string (file)
(replace-regexp-in-string
@@ -126,7 +126,7 @@ buffer."
(delete-file errfile))
(save-excursion
(goto-char start)
- (mapcar
+ (mapc
#'(lambda (indent) (indent-line-to indent) (forward-line))
indents))
(when (ocp-in-indentation-p) (back-to-indentation))))