about summary refs log tree commit diff
path: root/users/wpcarro/emacs/.emacs.d/wpc/keyboard.el
diff options
context:
space:
mode:
authorWilliam Carroll <wpcarro@gmail.com>2022-11-25T06·41-0800
committerwpcarro <wpcarro@gmail.com>2022-11-25T16·49+0000
commit8fd9b91d2938bc68b4ed7d1a2dac3f753d3fa31e (patch)
tree946761316e90a6dd61339ed9a3c7f3f4e3d51187 /users/wpcarro/emacs/.emacs.d/wpc/keyboard.el
parent094f07ad9ab1d8afb44f1e98bca639c5a1fdd0e9 (diff)
chore(wpcarro/emacs): Delete unused packages r/5318
Elisp liposuction

Change-Id: Id1940977afb33ae893264cfa388fd05c60b0ec9c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/7399
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: wpcarro <wpcarro@gmail.com>
Diffstat (limited to 'users/wpcarro/emacs/.emacs.d/wpc/keyboard.el')
-rw-r--r--users/wpcarro/emacs/.emacs.d/wpc/keyboard.el28
1 files changed, 13 insertions, 15 deletions
diff --git a/users/wpcarro/emacs/.emacs.d/wpc/keyboard.el b/users/wpcarro/emacs/.emacs.d/wpc/keyboard.el
index 03fb9e3f3569..9049d8bd374f 100644
--- a/users/wpcarro/emacs/.emacs.d/wpc/keyboard.el
+++ b/users/wpcarro/emacs/.emacs.d/wpc/keyboard.el
@@ -15,8 +15,6 @@
 ;; Dependencies
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
 
-(require 'string)
-(require 'number)
 (require 'cl-lib)
 
 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@@ -46,7 +44,7 @@
 
 (defun keyboard-message (x)
   "Message X in a structured way."
-  (message (string-format "[keyboard.el] %s" x)))
+  (message (format "[keyboard.el] %s" x)))
 
 (cl-defun keyboard-set-key-repeat (&key
                                    (rate keyboard-repeat-rate)
@@ -54,7 +52,7 @@
   "Use xset to set the key-repeat RATE and DELAY."
   (prelude-start-process
    :name "keyboard-set-key-repeat"
-   :command (string-format "xset r rate %s %s" delay rate)))
+   :command (format "xset r rate %s %s" delay rate)))
 
 ;; NOTE: Settings like this are machine-dependent. For instance I only need to
 ;; do this on my laptop and other devices where I don't have access to my split
@@ -76,42 +74,42 @@
 (defun keyboard-inc-repeat-rate ()
   "Increment `keyboard-repeat-rate'."
   (interactive)
-  (setq keyboard-repeat-rate (number-inc keyboard-repeat-rate))
+  (setq keyboard-repeat-rate (1+ keyboard-repeat-rate))
   (keyboard-set-key-repeat :rate keyboard-repeat-rate)
   (keyboard-message
-   (string-format "Rate: %s" keyboard-repeat-rate)))
+   (format "Rate: %s" keyboard-repeat-rate)))
 
 (defun keyboard-dec-repeat-rate ()
   "Decrement `keyboard-repeat-rate'."
   (interactive)
-  (setq keyboard-repeat-rate (number-dec keyboard-repeat-rate))
+  (setq keyboard-repeat-rate (1- keyboard-repeat-rate))
   (keyboard-set-key-repeat :rate keyboard-repeat-rate)
   (keyboard-message
-   (string-format "Rate: %s" keyboard-repeat-rate)))
+   (format "Rate: %s" keyboard-repeat-rate)))
 
 (defun keyboard-inc-repeat-delay ()
   "Increment `keyboard-repeat-delay'."
   (interactive)
-  (setq keyboard-repeat-delay (number-inc keyboard-repeat-delay))
+  (setq keyboard-repeat-delay (1+ keyboard-repeat-delay))
   (keyboard-set-key-repeat :delay keyboard-repeat-delay)
   (keyboard-message
-   (string-format "Delay: %s" keyboard-repeat-delay)))
+   (format "Delay: %s" keyboard-repeat-delay)))
 
 (defun keyboard-dec-repeat-delay ()
   "Decrement `keyboard-repeat-delay'."
   (interactive)
-  (setq keyboard-repeat-delay (number-dec keyboard-repeat-delay))
+  (setq keyboard-repeat-delay (1- keyboard-repeat-delay))
   (keyboard-set-key-repeat :delay keyboard-repeat-delay)
   (keyboard-message
-   (string-format "Delay: %s" keyboard-repeat-delay)))
+   (format "Delay: %s" keyboard-repeat-delay)))
 
 (defun keyboard-print-key-repeat ()
   "Print the currently set values for key repeat."
   (interactive)
   (keyboard-message
-   (string-format "Rate: %s. Delay: %s"
-                  keyboard-repeat-rate
-                  keyboard-repeat-delay)))
+   (format "Rate: %s. Delay: %s"
+           keyboard-repeat-rate
+           keyboard-repeat-delay)))
 
 (defun keyboard-set-preferences ()
   "Reset the keyboard preferences to their default values.