about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--init-functions.el11
-rw-r--r--init.el1
2 files changed, 12 insertions, 0 deletions
diff --git a/init-functions.el b/init-functions.el
index 79a9bddc16c4..b461b2e6a720 100644
--- a/init-functions.el
+++ b/init-functions.el
@@ -35,6 +35,17 @@
 
     (load file)))
 
+(defun keychain-password (account &optional keychain)
+  "Returns the password for the account, by default it's looked up in the Login.keychain but a
+   different keychain can be specified."
+  (let ((k (if keychain keychain "Login.keychain")))
+    (replace-regexp-in-string
+     "\n" ""
+     (shell-command-to-string (concat  "security find-generic-password -w -a "
+                                       account
+                                       " "
+                                       k)))))
+
 ;; This clones a git repository to 'foldername in .emacs.d
 ;; if there isn't already a folder with that name
 (defun custom-clone-git (url foldername)
diff --git a/init.el b/init.el
index 9281861bb45d..80525b12ccac 100644
--- a/init.el
+++ b/init.el
@@ -17,6 +17,7 @@
   '(ac-nrepl
     ace-jump-mode
     browse-kill-ring
+    circe
     clojure-mode
     flycheck
     flx-ido