diff options
Diffstat (limited to 'emacs/.emacs.d/wpc')
-rw-r--r-- | emacs/.emacs.d/wpc/bookmark.el | 7 | ||||
-rw-r--r-- | emacs/.emacs.d/wpc/clipboard.el | 7 | ||||
-rw-r--r-- | emacs/.emacs.d/wpc/keybindings.el | 9 | ||||
-rw-r--r-- | emacs/.emacs.d/wpc/list.el | 22 | ||||
-rw-r--r-- | emacs/.emacs.d/wpc/wpc-javascript.el | 1 |
5 files changed, 8 insertions, 38 deletions
diff --git a/emacs/.emacs.d/wpc/bookmark.el b/emacs/.emacs.d/wpc/bookmark.el index 4d1a74e2e145..6384ba88b2b7 100644 --- a/emacs/.emacs.d/wpc/bookmark.el +++ b/emacs/.emacs.d/wpc/bookmark.el @@ -33,9 +33,6 @@ (cl-defstruct bookmark label path kbd) -(defconst bookmark-install-kbds? t - "When t, install keybindings.") - ;; TODO: Consider hosting this function somewhere other than here, since it ;; feels useful above of the context of bookmarks. ;; TODO: Assess whether it'd be better to use the existing function: @@ -82,7 +79,9 @@ Otherwise, open with `counsel-find-file'." ((f-file? path) (funcall bookmark-handle-file path))))) -(when bookmark-install-kbds? + +(defun bookmark-install-kbds () + "Install the keybindings defined herein." (->> bookmark-whitelist (list-map (lambda (b) diff --git a/emacs/.emacs.d/wpc/clipboard.el b/emacs/.emacs.d/wpc/clipboard.el index c5375b18c5e7..0570d82873bf 100644 --- a/emacs/.emacs.d/wpc/clipboard.el +++ b/emacs/.emacs.d/wpc/clipboard.el @@ -17,13 +17,6 @@ ;;; Code: ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; Dependencies -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - -(require 'prelude) -(require 'ivy-clipmenu) - -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; Library ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; diff --git a/emacs/.emacs.d/wpc/keybindings.el b/emacs/.emacs.d/wpc/keybindings.el index 07067a9cdf12..c4fffe0d4f33 100644 --- a/emacs/.emacs.d/wpc/keybindings.el +++ b/emacs/.emacs.d/wpc/keybindings.el @@ -22,6 +22,7 @@ ;; Dependencies ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +(require 'functions) (require 'clipboard) (require 'screen-brightness) (require 'scrot) @@ -44,6 +45,10 @@ (require 'evil-surround) (require 'key-chord) +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; +;; General Keybindings +;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; + ;; Ensure that evil's command mode behaves with readline bindings. (general-define-key :keymaps 'evil-ex-completion-map @@ -110,10 +115,6 @@ (key-chord-mode 1) (key-chord-define evil-insert-state-map "jk" 'evil-normal-state) -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; -;; General KBDs -;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; - ;; This may be contraversial, but I never use the prefix key, and I'd prefer to ;; have to bound to the readline function that deletes the entire line. (general-unbind "C-u") diff --git a/emacs/.emacs.d/wpc/list.el b/emacs/.emacs.d/wpc/list.el index 00ff2affcc8a..cc91ac1eaf60 100644 --- a/emacs/.emacs.d/wpc/list.el +++ b/emacs/.emacs.d/wpc/list.el @@ -128,28 +128,6 @@ "Return over `XS' calling `F' on an element in `XS'and `ACC'." (-reduce-from (lambda (acc x) (funcall f x acc)) acc xs)) -;; TODO: Support this. It seems like `alist-set' is not working as I expected it -;; to. Perhaps we should add some tests to confirm the expected behavior. -;; (cl-defun list-index (f xs &key (transform (lambda (x) x))) -;; "Return a mapping of F applied to each x in XS to TRANSFORM applied to x. -;; The TRANSFORM function defaults to the identity function." -;; (->> xs -;; (list-reduce (alist-new) -;; (lambda (x acc) -;; (let ((k (funcall f x)) -;; (v (funcall transform x))) -;; (if (alist-has-key? k acc) -;; (setf (alist-get k acc) (list v)) -;; (setf (alist-get k acc) (list v)))))))) -;; (prelude-assert -;; (equal '(("John" . ("Cleese" "Malkovich")) -;; ("Thomas" . ("Aquinas"))) -;; (list-index (lambda (x) (plist-get x :first-name)) -;; '((:first-name "John" :last-name "Cleese") -;; (:first-name "John" :last-name "Malkovich") -;; (:first-name "Thomas" :last-name "Aquinas")) -;; :transform (lambda (x) (plist-get x :last-name))))) - (defun list-map (f xs) "Call `F' on each element of `XS'." (-map f xs)) diff --git a/emacs/.emacs.d/wpc/wpc-javascript.el b/emacs/.emacs.d/wpc/wpc-javascript.el index 0b05dd325add..5ace2d876f86 100644 --- a/emacs/.emacs.d/wpc/wpc-javascript.el +++ b/emacs/.emacs.d/wpc/wpc-javascript.el @@ -32,7 +32,6 @@ (-insert-at 0 'css-mode-hook wpc-javascript--js-hooks) "All of the commonly user hooks for frontend development.") - ;; frontend indentation settings (setq typescript-indent-level 2 js-indent-level 2 |