summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2022-01-31 00:54:53 -0600
committerCase Duckworth2022-01-31 00:54:53 -0600
commit195618bcf36a4ee2fe6f038d6d27936f1c1f22df (patch)
tree7235485f19743eed5e13157beafe941f42801490
parentAdd secret-source as an auth-source (diff)
downloademacs-195618bcf36a4ee2fe6f038d6d27936f1c1f22df.tar.gz
emacs-195618bcf36a4ee2fe6f038d6d27936f1c1f22df.zip
Random stuff
-rw-r--r--init.el13
-rw-r--r--lisp/+eshell.el7
-rw-r--r--lisp/+setup.el17
3 files changed, 31 insertions, 6 deletions
diff --git a/init.el b/init.el index 280f7e6..c06e44d 100644 --- a/init.el +++ b/init.el
@@ -186,7 +186,7 @@
186 (seq "." (or "mp4" "gif" "mov" "MOV" "webm") eos) 186 (seq "." (or "mp4" "gif" "mov" "MOV" "webm") eos)
187 ;; music 187 ;; music
188 "soundcloud.com" "bandcamp.com" 188 "soundcloud.com" "bandcamp.com"
189 (seq "." (or "ogg" "mp3") eos))) 189 (seq "." (or "ogg" "mp3" "opus" "m4a") eos)))
190 (lambda (&rest args) 190 (lambda (&rest args)
191 (apply (if (executable-find "mpv") 191 (apply (if (executable-find "mpv")
192 #'+browse-url-with-mpv 192 #'+browse-url-with-mpv
@@ -302,7 +302,10 @@
302 eshell-scroll-to-bottom-on-input 'all 302 eshell-scroll-to-bottom-on-input 'all
303 eshell-smart-space-goes-to-end t 303 eshell-smart-space-goes-to-end t
304 eshell-where-to-jump 'begin 304 eshell-where-to-jump 'begin
305 eshell-banner-message "") 305 eshell-banner-message ""
306 eshell-prompt-regexp (rx bol (* (not (any ?# ?$ ?\n)))
307 " " (any ?# ?$)
308 (* " ")))
306 (with-eval-after-load 'mwim 309 (with-eval-after-load 'mwim
307 (setf (alist-get 'eshell-mode mwim-beginning-of-line-function) 310 (setf (alist-get 'eshell-mode mwim-beginning-of-line-function)
308 #'eshell-bol)) 311 #'eshell-bol))
@@ -318,7 +321,7 @@
318 (concat eshell-prompt-regexp 321 (concat eshell-prompt-regexp
319 "\\(.*\\)") 322 "\\(.*\\)")
320 1)) 323 1))
321 truncate-lines t)) 324 (cons 'truncate-lines t)))
322 (set (make-local-variable (car setting)) (cdr setting))) 325 (set (make-local-variable (car setting)) (cdr setting)))
323 ;; Bind keys 326 ;; Bind keys
324 (dolist (binding '(("C-d" . +eshell-quit-or-delete-char))) 327 (dolist (binding '(("C-d" . +eshell-quit-or-delete-char)))
@@ -1442,8 +1445,8 @@ See also `crux-reopen-as-root-mode'."
1442 1445
1443(setup (:straight macrostep) 1446(setup (:straight macrostep)
1444 (:require macrostep) 1447 (:require macrostep)
1445 (:with-mode emacs-lisp-mode 1448 (:bind-into (emacs-lisp-mode lisp-interaction-mode)
1446 (:bind "C-c e" #'macrostep-expand))) 1449 "C-c e" #'macrostep-expand))
1447 1450
1448(setup (:straight (magit :host github :repo "magit/magit"))) 1451(setup (:straight (magit :host github :repo "magit/magit")))
1449 1452
diff --git a/lisp/+eshell.el b/lisp/+eshell.el index d49358d..d70bed7 100644 --- a/lisp/+eshell.el +++ b/lisp/+eshell.el
@@ -29,7 +29,12 @@ any directory proferred by `consult-dir'."
29 "Delete the character to the right, or quit eshell on an empty line." 29 "Delete the character to the right, or quit eshell on an empty line."
30 (interactive "p") 30 (interactive "p")
31 (if (and (eolp) (looking-back eshell-prompt-regexp)) 31 (if (and (eolp) (looking-back eshell-prompt-regexp))
32 (eshell-life-is-too-much) 32 (progn (eshell-life-is-too-much)
33 (when (and (<= 1 (count-windows))
34 ;; I'm guessing the extra frame is for the server?
35 (> (length (frame-list)) 2)
36 server-process)
37 (delete-frame)))
33 (delete-forward-char arg))) 38 (delete-forward-char arg)))
34 39
35;;; Insert previous arguments 40;;; Insert previous arguments
diff --git a/lisp/+setup.el b/lisp/+setup.el index 367fb01..d8e9bb8 100644 --- a/lisp/+setup.el +++ b/lisp/+setup.el
@@ -94,5 +94,22 @@ replace itself with the RECIPE's package."
94 :indent 1 94 :indent 1
95 :shorthand #'+setup-straight-shorthand) 95 :shorthand #'+setup-straight-shorthand)
96 96
97
98;;; Redefines of `setup' forms
99
100(setup-define :bind-into
101 (lambda (feature-or-map &rest rest)
102 (cl-loop for f/m in (ensure-list feature-or-map)
103 collect (if (string-match-p "-map\\'" (symbol-name f/m))
104 `(:with-map ,f/m (:bind ,@rest))
105 `(:with-feature ,f/m (:bind ,@rest)))
106 into forms
107 finally return `(progn ,@forms)))
108 :documentation "Bind into keys into the map(s) of FEATURE-OR-MAP.
109FEATURE-OR-MAP can be a feature or map name or a list of them.
110The arguments REST are handled as by `:bind'."
111 :debug '(sexp &rest form sexp)
112 :indent 1)
113
97(provide '+setup) 114(provide '+setup)
98;;; +setup.el ends here 115;;; +setup.el ends here