Replace dash with the built-in cl-lib

This commit is contained in:
Bozhidar Batsov 2018-05-08 22:54:42 +03:00
parent d6842eccad
commit 007ae88ed2
4 changed files with 6 additions and 10 deletions

View file

@ -33,8 +33,7 @@
;;; Code:
(require 'thingatpt)
(require 'dash)
(require 'ov)
(require 'cl-lib)
(defun prelude-buffer-mode (buffer-or-name)
"Retrieve the `major-mode' of BUFFER-OR-NAME."
@ -139,8 +138,8 @@ With a prefix ARG updates all installed packages."
(when (y-or-n-p "Do you want to update Prelude's packages? ")
(if arg
(epl-upgrade)
(epl-upgrade (-filter (lambda (p) (memq (epl-package-name p) prelude-packages))
(epl-installed-packages))))
(epl-upgrade (cl-remove-if-not (lambda (p) (memq (epl-package-name p) prelude-packages))
(epl-installed-packages))))
(message "Update finished. Restart Emacs to complete the process.")))
;;; Emacs in macOS already has fullscreen support

View file

@ -138,9 +138,9 @@
(defun prelude-recentf-exclude-p (file)
"A predicate to decide whether to exclude FILE from recentf."
(let ((file-dir (file-truename (file-name-directory file))))
(-any-p (lambda (dir)
(string-prefix-p dir file-dir))
(mapcar 'file-truename (list prelude-savefile-dir package-user-dir)))))
(cl-some (lambda (dir)
(string-prefix-p dir file-dir))
(mapcar 'file-truename (list prelude-savefile-dir package-user-dir)))))
(add-to-list 'recentf-exclude 'prelude-recentf-exclude-p)

View file

@ -59,7 +59,6 @@
beacon
browse-kill-ring
crux
dash
discover-my-major
diff-hl
diminish

View file

@ -25,7 +25,6 @@
(cython-mode . "melpa-stable")
(d-mode . "melpa-stable")
(dart-mode . "melpa-stable")
(dash . "melpa-stable")
(diff-hl . "melpa-stable")
(diminish . "melpa-stable")
(discover-my-major . "melpa-stable")
@ -92,7 +91,6 @@
(mediawiki . "melpa-stable")
(merlin . "melpa-stable")
(operate-on-number . "melpa-stable")
(ov . "melpa-stable")
(pcache . "melpa-stable")
(php-mode . "melpa-stable")
(pkg-info . "melpa-stable")