[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[O] [PATCH] ob-clojure-literate remove dependency on dash
From: |
stardiviner |
Subject: |
[O] [PATCH] ob-clojure-literate remove dependency on dash |
Date: |
Sun, 15 Apr 2018 21:29:04 +0800 |
User-agent: |
mu4e 1.0; emacs 27.0.50 |
From 0edc3d8f2b6fe4a99e11286efe7eb49dc3596cbe Mon Sep 17 00:00:00 2001
From: stardiviner <address@hidden>
Date: Sun, 15 Apr 2018 19:40:12 +0800
Subject: [PATCH] * ob-clojure-literate.el: remove dash dependence.
---
contrib/lisp/ob-clojure-literate.el | 17 ++++++++---------
1 file changed, 8 insertions(+), 9 deletions(-)
diff --git a/contrib/lisp/ob-clojure-literate.el
b/contrib/lisp/ob-clojure-literate.el
index 5dec2ad9b..15b0e3745 100644
--- a/contrib/lisp/ob-clojure-literate.el
+++ b/contrib/lisp/ob-clojure-literate.el
@@ -21,7 +21,6 @@
(require 'ob-clojure)
(require 'cider)
-(require 'dash)
(defgroup ob-clojure-literate nil
"Clojure's Org-mode Literate Programming."
@@ -63,17 +62,17 @@ If it is a directory, `ob-clojure-literate' will try to
create Clojure project a
(defun ob-clojure-literate-get-session-list ()
"Return a list of available started CIDER REPL sessions list."
- (-map 'buffer-name
- ;; for multiple connections case.
- ;; get global value instead of buffer local.
- (default-value 'cider-connections)
- ))
+ (mapcar 'buffer-name
+ ;; for multiple connections case.
+ ;; get global value instead of buffer local.
+ (default-value 'cider-connections)
+ ))
(defun ob-clojure-literate-set-session ()
"Set session name for buffer local."
;; if default session is the only one in connections list.
(if (and (= (length (ob-clojure-literate-get-session-list)) 1)
- (-contains-p (ob-clojure-literate-get-session-list)
ob-clojure-literate-default-session))
+ (member ob-clojure-literate-default-session
(ob-clojure-literate-get-session-list)))
(setq-local ob-clojure-literate-session
ob-clojure-literate-default-session)
;; if have any connections, choose one from them.
(if (ob-clojure-literate-any-connection-p)
@@ -129,7 +128,7 @@ If it is a directory, `ob-clojure-literate' will try to
create Clojure project a
(not (null ob-clojure-literate-session)))
;; return back to original file.
(if (not (and (= (length (ob-clojure-literate-get-session-list)) 1)
- (-contains-p (ob-clojure-literate-get-session-list)
ob-clojure-literate-default-session)))
+ (member ob-clojure-literate-default-session
(ob-clojure-literate-get-session-list))))
(save-window-excursion
(find-file (expand-file-name (concat
ob-clojure-literate-project-location "ob-clojure/src/ob_clojure/core.clj")))
(with-current-buffer "core.clj"
@@ -149,7 +148,7 @@ If it is a directory, `ob-clojure-literate' will try to
create Clojure project a
;; Empty all CIDER connections to avoid `cider-current-connection' return
any connection.
;; FIXME: when try to enable, `cider-connections' is local and nil.
;; (if (and (= (length (ob-clojure-literate-get-session-list)) 1)
- ;; (-contains-p (ob-clojure-literate-get-session-list)
ob-clojure-literate-default-session)))
+ ;; (member ob-clojure-literate-default-session
(ob-clojure-literate-get-session-list))))
;; (unless (local-variable-if-set-p 'cider-connections)
;; (make-local-variable 'cider-connections))
;; (setq-local cider-connections '())
--
2.17.0
--
[ stardiviner ] don't need to convince with trends.
Blog: https://stardiviner.github.io/
IRC(freenode): stardiviner
GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
signature.asc
Description: PGP signature
- [O] [PATCH] ob-clojure-literate remove dependency on dash,
stardiviner <=