diff options
author | Vincent Ambo <mail@tazj.in> | 2020-09-17T15·26+0100 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2020-09-18T23·32+0000 |
commit | 30066b4ba0fbde562219ea1d977cdf1f08a69baa (patch) | |
tree | bb5005a66224286cef53ac946c177554add16863 /tools/emacs-pkgs/notable | |
parent | 426a31b7f2d75eb422a8305b12e3deee403a889e (diff) |
refactor(notable): Remove dependency on dash r/1803
It was only used for #'-each, for which the built-in dolist is sufficient. Change-Id: I326d8b733b36b2edfebd4e9384e70b8a570fee0f Reviewed-on: https://cl.tvl.fyi/c/depot/+/1987 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'tools/emacs-pkgs/notable')
-rw-r--r-- | tools/emacs-pkgs/notable/default.nix | 2 | ||||
-rw-r--r-- | tools/emacs-pkgs/notable/notable.el | 19 |
2 files changed, 9 insertions, 12 deletions
diff --git a/tools/emacs-pkgs/notable/default.nix b/tools/emacs-pkgs/notable/default.nix index 94af474dad0a..22c906609bd9 100644 --- a/tools/emacs-pkgs/notable/default.nix +++ b/tools/emacs-pkgs/notable/default.nix @@ -5,7 +5,7 @@ pkgs.emacsPackages.trivialBuild rec { version = "1.0"; src = ./notable.el; packageRequires = with pkgs.emacsPackages; [ - dash f ht s + f ht s depot.tools.emacs-pkgs.dottime ]; } diff --git a/tools/emacs-pkgs/notable/notable.el b/tools/emacs-pkgs/notable/notable.el index d6d2dbe34817..ba59a1ee2b22 100644 --- a/tools/emacs-pkgs/notable/notable.el +++ b/tools/emacs-pkgs/notable/notable.el @@ -20,7 +20,6 @@ ;; specified by `notable-note-dir'. (require 'cl-lib) -(require 'dash) (require 'dottime) (require 'f) (require 'ht) @@ -60,13 +59,12 @@ (defvar notable--next-note (let ((next 0)) - (-each (f-entries notable-note-dir) - (lambda (file) - (when-let* ((match (string-match notable--note-regexp file)) - (id (string-to-number - (match-string 1 file))) - (larger (> id next))) - (setq next id)))) + (dolist (file (f-entries notable-note-dir)) + (when-let* ((match (string-match notable--note-regexp file)) + (id (string-to-number + (match-string 1 file))) + (larger (> id next))) + (setq next id))) (+ 1 next)) "Next ID to use for notes. Initial value is determined based on the existing notes files.") @@ -219,9 +217,8 @@ the list buffer. For larger notes only the first line is displayed." - (-each notes - (lambda (id) - (notable--render-note id (notable--get-note id))))) + (dolist (id notes) + (notable--render-note id (notable--get-note id)))) ;; User-facing functions |