summaryrefslogtreecommitdiff
path: root/.emacs.d/init.el
diff options
context:
space:
mode:
Diffstat (limited to '.emacs.d/init.el')
-rw-r--r--.emacs.d/init.el17
1 files changed, 14 insertions, 3 deletions
diff --git a/.emacs.d/init.el b/.emacs.d/init.el
index 6ce29bf..82d9bcb 100644
--- a/.emacs.d/init.el
+++ b/.emacs.d/init.el
@@ -15,6 +15,18 @@
into exps
finally return `(progn ,@exps)))
+(defmacro set-keys-and-load (file &rest keys)
+ "Call `autoload' and `global-set-key' at once."
+ (declare (indent defun))
+ (cl-loop for (key fun) on keys by #'cddr
+ collect `(progn
+ (autoload #',fun ,(if (stringp file) file (symbol-name file)) nil t)
+ (global-set-key
+ ,(if (stringp key) `(kbd ,key) key)
+ ,(if (listp fun) fun `#',fun)))
+ into exps
+ finally return `(progn ,@exps)))
+
(defmacro set-keys-in (maps &rest keys)
"Set multiple keys in multiple keymaps."
(declare (indent defun))
@@ -72,14 +84,13 @@
"Run `async-shell-command', then delete the current window."
(interactive)
(call-interactively #'async-shell-command)
- (delete-window)) ; TODO: Function for opening X program with
- ; associated command output buffer.
+ (delete-window))
(defun customize-setq ()
"Customize variable according to `setq' expression at point."
(interactive)
(let ((sexp (list-at-point)))
- (unless (symbol-value))))
+ (unless (symbol-value)))) ; TODO
(defun kill-buffer-now ()
"Kill the current buffer immediately."