started to replace cl code with dash.el
This commit is contained in:
parent
a03dfe690d
commit
07e822f95e
4 changed files with 699 additions and 18 deletions
|
@ -32,19 +32,8 @@
|
|||
|
||||
;;; Code:
|
||||
|
||||
(require 'cl)
|
||||
(require 'thingatpt)
|
||||
|
||||
(defun prelude-add-subfolders-to-load-path (parent-dir)
|
||||
"Adds all first level `parent-dir' subdirs to the
|
||||
Emacs load path."
|
||||
(dolist (f (directory-files parent-dir))
|
||||
(let ((name (expand-file-name f parent-dir)))
|
||||
(when (and (file-directory-p name)
|
||||
(not (equal f ".."))
|
||||
(not (equal f ".")))
|
||||
(add-to-list 'load-path name)))))
|
||||
|
||||
(defun prelude-open-with ()
|
||||
"Simple function that allows us to open the underlying
|
||||
file of a buffer in an external program."
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
;; Boston, MA 02110-1301, USA.
|
||||
|
||||
;;; Code:
|
||||
(require 'cl)
|
||||
(require 'package)
|
||||
(add-to-list 'package-archives
|
||||
'("melpa" . "http://melpa.milkbox.net/packages/") t)
|
||||
|
@ -49,9 +48,7 @@
|
|||
"A list of packages to ensure are installed at launch.")
|
||||
|
||||
(defun prelude-packages-installed-p ()
|
||||
(loop for p in prelude-packages
|
||||
when (not (package-installed-p p)) do (return nil)
|
||||
finally (return t)))
|
||||
(-all? #'package-installed-p prelude-packages))
|
||||
|
||||
(defun prelude-install-packages ()
|
||||
(unless (prelude-packages-installed-p)
|
||||
|
@ -60,9 +57,9 @@
|
|||
(package-refresh-contents)
|
||||
(message "%s" " done.")
|
||||
;; install the missing packages
|
||||
(dolist (p prelude-packages)
|
||||
(unless (package-installed-p p)
|
||||
(package-install p)))))
|
||||
(-each
|
||||
(-reject #'package-installed-p prelude-packages)
|
||||
#'package-install-p)))
|
||||
|
||||
(prelude-install-packages)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue