Add dash lib for compatiblility issues with Emacs <=25.

This commit is contained in:
Vincent Zhang 2018-06-12 22:09:35 +08:00
parent dce8d0e5b1
commit 1a2ff8f2b6

View file

@ -6,7 +6,7 @@
;; Package-Version: 20180611.111 ;; Package-Version: 20180611.111
;; Version: 0.1.0 ;; Version: 0.1.0
;; URL: https://github.com/seagle0128/doom-modeline ;; URL: https://github.com/seagle0128/doom-modeline
;; Package-Requires: ((emacs "24.4") (all-the-icons "1.0.0") (projectile "0.10.0") (shrink-path "0.2.0") (eldoc-eval "0.1")) ;; Package-Requires: ((emacs "24.4") (dash "2.11.0") (all-the-icons "1.0.0") (projectile "0.10.0") (shrink-path "0.2.0") (eldoc-eval "0.1"))
;; Keywords: modeline, mode-line ;; Keywords: modeline, mode-line
;; This file is not part of GNU Emacs. ;; This file is not part of GNU Emacs.
@ -195,7 +195,7 @@ error if it doesn't exist."
(defun doom-set-modeline (key &optional default) (defun doom-set-modeline (key &optional default)
"Set the modeline format. Does nothing if the modeline KEY doesn't exist. If "Set the modeline format. Does nothing if the modeline KEY doesn't exist. If
DEFAULT is non-nil, set the default mode-line for all buffers." DEFAULT is non-nil, set the default mode-line for all buffers."
(when-let ((modeline (doom-modeline key))) (-when-let ((modeline (doom-modeline key)))
(setf (if default (setf (if default
(default-value 'mode-line-format) (default-value 'mode-line-format)
(buffer-local-value 'mode-line-format (current-buffer))) (buffer-local-value 'mode-line-format (current-buffer)))
@ -260,7 +260,7 @@ If STRICT-P, return nil if no project was found, otherwise return
(defvar +doom-modeline-current-window (frame-selected-window)) (defvar +doom-modeline-current-window (frame-selected-window))
(defun +doom-modeline|set-selected-window (&rest _) (defun +doom-modeline|set-selected-window (&rest _)
"Sets `+doom-modeline-current-window' appropriately" "Sets `+doom-modeline-current-window' appropriately"
(when-let ((win (frame-selected-window))) (-when-let* ((win (frame-selected-window)))
(unless (minibuffer-window-active-p win) (unless (minibuffer-window-active-p win)
(setq +doom-modeline-current-window win)))) (setq +doom-modeline-current-window win))))
@ -860,7 +860,7 @@ Returns \"\" to not break --no-window-system."
"The persp number." "The persp number."
(when (featurep 'persp-mode) (when (featurep 'persp-mode)
(when (+doom-window-bottom-left-p) (when (+doom-window-bottom-left-p)
(when-let ((persp (get-current-persp))) (-when-let ((persp (get-current-persp)))
(propertize (propertize
(concat (concat
(number-to-string (number-to-string