summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmin Bandali <bandali@kelar.org>2024-03-31 22:28:23 -0400
committerAmin Bandali <bandali@kelar.org>2024-03-31 22:28:23 -0400
commit8a09608febbe5106236193834e354b012c1a4e03 (patch)
treea9bc1d813784cbdb447dd8401cb122e57efe1715
parent90f051d46a1d9cfbae5d9c2984a96a621ae4a82a (diff)
downloadconfigs-8a09608febbe5106236193834e354b012c1a4e03.tar.gz
configs-8a09608febbe5106236193834e354b012c1a4e03.tar.xz
configs-8a09608febbe5106236193834e354b012c1a4e03.zip
Make a general keybindings list of dotted pairs and dolist over it
Diffstat (limited to '')
-rw-r--r--.emacs.d/init.el66
1 files changed, 33 insertions, 33 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index c9e5c8e..9286e0c 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -450,39 +450,39 @@ for all frames."
;;; General key bindings
-(b/keymap-global-set "C-c i" #'ielm)
-(b/keymap-global-set "C-c d" #'b/duplicate-line-or-region)
-(b/keymap-global-set "C-c j" #'b/join-line-top)
-(b/keymap-global-set "C-S-j" #'b/join-line-top)
-(b/keymap-global-set "C-c s c" #'b/*scratch*)
-(b/keymap-global-set "C-c v" #'b/invert-default-face)
-
-;; evaling and macro-expanding
-(b/keymap-global-set "C-c e b" #'eval-buffer)
-(b/keymap-global-set "C-c e e" #'eval-last-sexp)
-(b/keymap-global-set "C-c e m" #'pp-macroexpand-last-sexp)
-(b/keymap-global-set "C-c e r" #'eval-region)
-
-;; emacs things
-(b/keymap-global-set "C-c e i" #'emacs-init-time)
-(b/keymap-global-set "C-c e u" #'emacs-uptime)
-(b/keymap-global-set "C-c e v" #'emacs-version)
-
-;; finding
-(b/keymap-global-set "C-c f ." #'find-file)
-(b/keymap-global-set "C-c f l" #'find-library)
-(b/keymap-global-set "C-c f p" #'find-file-at-point)
-
-;; frames
-(b/keymap-global-set "C-c F m" #'make-frame-command)
-(b/keymap-global-set "C-c F d" #'delete-frame)
-
-;; help/describe
-(b/keymap-global-set "C-c h F" #'describe-face)
-
-;; (when (display-graphic-p)
-;; ;; Too easy to accidentally suspend (freeze) Emacs GUI.
-;; (b/keymap-global-unset "C-z"))
+(let ((kfs
+ '(("C-c i" . ielm)
+ ("C-c d" . b/duplicate-line-or-region)
+ ("C-c j" . b/join-line-top)
+ ("C-S-j" . b/join-line-top)
+ ("C-c s c" . b/*scratch*)
+ ("C-c v" . b/invert-default-face)
+ ;; evaling and macro-expanding
+ ("C-c e b" . eval-buffer)
+ ("C-c e e" . eval-last-sexp)
+ ("C-c e m" . pp-macroexpand-last-sexp)
+ ("C-c e r" . eval-region)
+ ;; emacs things
+ ("C-c e i" . emacs-init-time)
+ ("C-c e u" . emacs-uptime)
+ ("C-c e v" . emacs-version)
+ ;; finding
+ ("C-c f ." . find-file)
+ ("C-c f l" . find-library)
+ ("C-c f p" . find-file-at-point)
+ ;; frames
+ ("C-c F m" . make-frame-command)
+ ("C-c F d" . delete-frame)
+ ;; help/describe
+ ("C-c h F" . describe-face))))
+ (dolist (kf kfs)
+ (let ((key (car kf))
+ (fun (cdr kf)))
+ (b/keymap-global-set key fun))))
+
+(when (display-graphic-p)
+ ;; Too easy to accidentally suspend (freeze) Emacs GUI.
+ (b/keymap-global-unset "C-z"))
;;; Essential packages