emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: stardiviner <numbchild@gmail.com>
To: org-mode <emacs-orgmode@gnu.org>
Subject: [PATCH] ob-clojure-literate remove dependency on dash
Date: Sun, 15 Apr 2018 21:29:04 +0800	[thread overview]
Message-ID: <87o9ikppi7.fsf@gmail.com> (raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.1: 0001-ob-clojure-literate.el-remove-dash-dependence.patch --]
[-- Type: text/x-patch, Size: 3300 bytes --]

From 0edc3d8f2b6fe4a99e11286efe7eb49dc3596cbe Mon Sep 17 00:00:00 2001
From: stardiviner <numbchild@gmail.com>
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 @@
 \f
 (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


[-- Attachment #1.2: Type: text/plain, Size: 202 bytes --]


-- 
[ stardiviner ] don't need to convince with trends.
       Blog: https://stardiviner.github.io/
       IRC(freenode): stardiviner
       GPG: F09F650D7D674819892591401B5DF1C95AE89AC3
      

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 487 bytes --]

             reply	other threads:[~2018-04-15 13:29 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-15 13:29 stardiviner [this message]
2018-04-16 10:09 ` [PATCH] ob-clojure-literate remove dependency on dash Nicolas Goaziou

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87o9ikppi7.fsf@gmail.com \
    --to=numbchild@gmail.com \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).