From 195618bcf36a4ee2fe6f038d6d27936f1c1f22df Mon Sep 17 00:00:00 2001 From: Case Duckworth Date: Mon, 31 Jan 2022 00:54:53 -0600 Subject: Random stuff --- lisp/+eshell.el | 7 ++++++- lisp/+setup.el | 17 +++++++++++++++++ 2 files changed, 23 insertions(+), 1 deletion(-) (limited to 'lisp') 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'." "Delete the character to the right, or quit eshell on an empty line." (interactive "p") (if (and (eolp) (looking-back eshell-prompt-regexp)) - (eshell-life-is-too-much) + (progn (eshell-life-is-too-much) + (when (and (<= 1 (count-windows)) + ;; I'm guessing the extra frame is for the server? + (> (length (frame-list)) 2) + server-process) + (delete-frame))) (delete-forward-char arg))) ;;; 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." :indent 1 :shorthand #'+setup-straight-shorthand) + +;;; Redefines of `setup' forms + +(setup-define :bind-into + (lambda (feature-or-map &rest rest) + (cl-loop for f/m in (ensure-list feature-or-map) + collect (if (string-match-p "-map\\'" (symbol-name f/m)) + `(:with-map ,f/m (:bind ,@rest)) + `(:with-feature ,f/m (:bind ,@rest))) + into forms + finally return `(progn ,@forms))) + :documentation "Bind into keys into the map(s) of FEATURE-OR-MAP. +FEATURE-OR-MAP can be a feature or map name or a list of them. +The arguments REST are handled as by `:bind'." + :debug '(sexp &rest form sexp) + :indent 1) + (provide '+setup) ;;; +setup.el ends here -- cgit 1.4.1-21-gabe81