From 13b093fb014dd7d250b31a21bf7f4f129684eb39 Mon Sep 17 00:00:00 2001 From: Andrea Moretti Date: Tue, 28 Jul 2015 00:15:32 +0200 Subject: [PATCH] fix mayor compilation error and flet deprecation --- jsfmt.el | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/jsfmt.el b/jsfmt.el index eccafd0..4d7641c 100644 --- a/jsfmt.el +++ b/jsfmt.el @@ -40,7 +40,7 @@ ;; not modify the kill ring. This solution does depend on the ;; implementation of kill-line, but it's the only viable solution ;; that does not require to write kill-line from scratch. - (flet ((kill-region (beg end) + (cl-flet ((kill-region (beg end) (delete-region beg end)) (kill-new (s) ())) (jsfmt--kill-whole-line arg))) @@ -88,7 +88,7 @@ buffer." (t (error "invalid rcs patch or internal error in jsfmt--apply-rcs-patch"))))))))) -(defun run-jsfmt (save &optional ast &optional) +(defun run-jsfmt (&optional save &optional ast) "Formats the current buffer according to the jsfmt tool." (interactive) (let ((tmpfile (make-temp-file "jsfmt" nil (if ast