Skip to content

Commit 0bf874e

Browse files
committed
Replace cl with cl-lib
cl-lib is bundled with Emacs 24.3.
1 parent fa8dd01 commit 0bf874e

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

clojure-mode.el

+7-8
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
(defvar paredit-version)
6565
(defvar paredit-mode))
6666

67-
(require 'cl)
67+
(require 'cl-lib)
6868
(require 'imenu)
6969

7070
(declare-function lisp-fill-paragraph "lisp-mode" (&optional justify))
@@ -341,7 +341,7 @@ Called by `imenu--generic-function'."
341341
(backward-sexp))
342342
(if (char-equal ?) (char-after (point)))
343343
(backward-sexp)))
344-
(destructuring-bind (def-beg . def-end) (bounds-of-thing-at-point 'sexp)
344+
(cl-destructuring-bind (def-beg . def-end) (bounds-of-thing-at-point 'sexp)
345345
(if (char-equal ?^ (char-after def-beg))
346346
(progn (forward-sexp) (backward-sexp))
347347
(setq found? t)
@@ -563,14 +563,14 @@ locking in def* forms that are not at top level."
563563
(let ((changed nil))
564564
(let ((def (clojure-font-lock-def-at-point font-lock-beg)))
565565
(when def
566-
(destructuring-bind (def-beg . def-end) def
566+
(cl-destructuring-bind (def-beg . def-end) def
567567
(when (and (< def-beg font-lock-beg)
568568
(< font-lock-beg def-end))
569569
(setq font-lock-beg def-beg
570570
changed t)))))
571571
(let ((def (clojure-font-lock-def-at-point font-lock-end)))
572572
(when def
573-
(destructuring-bind (def-beg . def-end) def
573+
(cl-destructuring-bind (def-beg . def-end) def
574574
(when (and (< def-beg font-lock-end)
575575
(< font-lock-end def-end))
576576
(setq font-lock-end def-end
@@ -677,8 +677,8 @@ This function also returns nil meaning don't specify the indentation."
677677
(progn (forward-sexp 1) (point))))
678678
(open-paren (elt state 1))
679679
(method nil)
680-
(function-tail (first
681-
(last
680+
(function-tail (car
681+
(reverse
682682
(split-string (substring-no-properties function) "/")))))
683683
(setq method (get (intern-soft function-tail) 'clojure-indent-function))
684684
(cond ((member (char-after open-paren) '(?\[ ?\{))
@@ -771,7 +771,7 @@ move upwards in an sexp to check for contextual indenting."
771771
"Call `put-clojure-indent' on a series, KVS."
772772
`(progn
773773
,@(mapcar (lambda (x) `(put-clojure-indent
774-
(quote ,(first x)) ,(second x)))
774+
(quote ,(car x)) ,(cadr x)))
775775
kvs)))
776776

777777
(defun add-custom-clojure-indents (name value)
@@ -1079,7 +1079,6 @@ Returns a list pair, e.g. (\"defn\" \"abc\") or (\"deftest\" \"some-test\")."
10791079

10801080
;; Local Variables:
10811081
;; coding: utf-8
1082-
;; byte-compile-warnings: (not cl-functions)
10831082
;; indent-tabs-mode: nil
10841083
;; End:
10851084

0 commit comments

Comments
 (0)