about summary refs log tree commit diff
path: root/emacs/.emacs.d/wpc/kbd.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2020-09-01T09·17+0100
committerWilliam Carroll <wpcarro@gmail.com>2020-09-01T09·17+0100
commitfb5ec068ddd50f6bce41c7a0bad45673db787940 (patch)
tree19b4ff96983c08f451e7da5f58c95b8f6090ec84 /emacs/.emacs.d/wpc/kbd.el
parenta638e15c0dd14a25e6f032b08de5ee1575677497 (diff)
More Elisp linting
This should cover most of the remaining linting errors. After this, I expect
fewer than ten linting errors.
Diffstat (limited to 'emacs/.emacs.d/wpc/kbd.el')
-rw-r--r--emacs/.emacs.d/wpc/kbd.el32
1 files changed, 18 insertions, 14 deletions
diff --git a/emacs/.emacs.d/wpc/kbd.el b/emacs/.emacs.d/wpc/kbd.el
index dd47845e65b5..08e16df90150 100644
--- a/emacs/.emacs.d/wpc/kbd.el
+++ b/emacs/.emacs.d/wpc/kbd.el
@@ -1,5 +1,9 @@
 ;;; kbd.el --- Elisp keybinding -*- lexical-binding: t -*-
+
 ;; Author: William Carroll <wpcarro@gmail.com>
+;; Version: 0.0.1
+;; URL: https://git.wpcarro.dev/wpcarro/briefcase
+;; Package-Requires: ((emacs "24"))
 
 ;;; Commentary:
 ;; In order to stay organized, I'm attempting to dedicate KBD prefixes to
@@ -27,52 +31,52 @@
 ;; Constants
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defconst kbd/prefixes
+(defconst kbd-prefixes
   '((workspace . "s")
     (x11 . "C-s"))
   "Mapping of functions to designated keybinding prefixes to stay organized.")
 
 ;; Assert that no keybindings are colliding.
 (prelude-assert
- (= (alist/count kbd/prefixes)
-    (->> kbd/prefixes
-         alist/values
-         set/from-list
-         set/count)))
+ (= (alist-count kbd-prefixes)
+    (->> kbd-prefixes
+         alist-values
+         set-from-list
+         set-count)))
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 ;; Library
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(defun kbd/raw (f x)
+(defun kbd-raw (f x)
   "Return the string keybinding for function F and appendage X.
 Values for F include:
 - workspace
 - x11"
-  (prelude-assert (alist/has-key? f kbd/prefixes))
+  (prelude-assert (alist-has-key? f kbd-prefixes))
   (string-format
    "%s-%s"
-   (alist/get f kbd/prefixes)
+   (alist-get f kbd-prefixes)
    x))
 
-(defun kbd/for (f x)
+(defun kbd-for (f x)
   "Return the `kbd' for function F and appendage X.
 Values for F include:
 - workspace
 - x11"
-  (kbd (kbd/raw f x)))
+  (kbd (kbd-raw f x)))
 
 ;; TODO: Prefer copying human-readable versions to the clipboard.  Right now
 ;; this isn't too useful.
-(defun kbd/copy-keycode ()
+(defun kbd-copy-keycode ()
   "Copy the pressed key to the system clipboard."
   (interactive)
   (message "[kbd] Awaiting keypress...")
   (let ((key (read-key)))
-    (clipboard/copy (string-format "%s" key))
+    (clipboard-copy (string-format "%s" key))
     (message (string-format "[kbd] \"%s\" copied!" key))))
 
-(defun kbd/print-keycode ()
+(defun kbd-print-keycode ()
   "Prints the pressed keybinding."
   (interactive)
   (message "[kbd] Awaiting keypress...")