From bdf9a71ab7baa2b1de9abcfd5df1a9107a55d141 Mon Sep 17 00:00:00 2001 From: Jack Jamison Date: Sun, 5 Jul 2026 01:19:30 -0400 Subject: add a bunch of emacs packages HELP --- .../lisp/evil-collection/modes/edebug/README.org | 53 +++++++++ .../modes/edebug/evil-collection-edebug.el | 126 +++++++++++++++++++++ 2 files changed, 179 insertions(+) create mode 100644 .config/emacs/lisp/evil-collection/modes/edebug/README.org create mode 100644 .config/emacs/lisp/evil-collection/modes/edebug/evil-collection-edebug.el (limited to '.config/emacs/lisp/evil-collection/modes/edebug') diff --git a/.config/emacs/lisp/evil-collection/modes/edebug/README.org b/.config/emacs/lisp/evil-collection/modes/edebug/README.org new file mode 100644 index 0000000..aba73a1 --- /dev/null +++ b/.config/emacs/lisp/evil-collection/modes/edebug/README.org @@ -0,0 +1,53 @@ +* edebug + + Evil bindings for [[https://www.gnu.org/software/emacs/manual/html_node/elisp/Edebug.html][Edebug]]. + +** Key bindings + + Bindings live in =edebug-mode-map=. Edebug overlays the source while a form + is instrumented; evil-collection sets the initial state to normal and frees + =g=, =G=, and =h= as prefixes. + + | Command | Original | Evil | + |-------------------------------------+-----------+-----------------| + | =edebug-step-mode= | =SPC= | =s=, =C-c C-s= | + | =edebug-next-mode= | =n= | =n=, =C-c C-n= | + | =edebug-go-mode= | =g= | =go=, =C-c C-c= | + | =edebug-Go-nonstop-mode= | =G= | =gO= | + | =edebug-trace-mode= | =t= | =t= | + | =edebug-Trace-fast-mode= | =T= | =T= | + | =edebug-continue-mode= | =c= | =c= | + | =edebug-Continue-fast-mode= | =C= | =C= | + | =edebug-forward-sexp= | =f= | =f= | + | =edebug-step-in= | =i= | =i= | + | =edebug-step-out= | =o= | =o= | + | =edebug-goto-here= | =h= | =H= | + | =edebug-instrument-callee= | =I= | =I= | + | =edebug-stop= | =S= | =S= | + | =top-level= | =q= | =q= | + | =edebug-top-level-nonstop= | =Q= | =Q= | + | =abort-recursive-edit= | =a= | =a= | + | =edebug-set-breakpoint= | =b= | =b=, =C-x SPC= | + | =edebug-unset-breakpoint= | =u= | =u=, =C-c C-d= | + | =edebug-next-breakpoint= | =B= | =B= | + | =edebug-set-conditional-breakpoint= | =x= | =x= | + | =edebug-set-global-break-condition= | =X= | =X= | + | =edebug-previous-result= | =r= | =r= | + | =edebug-eval-expression= | =e= | =e= | + | =edebug-eval-last-sexp= | =C-x C-e= | =C-x C-e= | + | =edebug-visit-eval-list= | =E= | =EL= | + | =edebug-where= | =w= | =WW=, =C-c C-l= | + | =edebug-bounce-point= | =p= | =p= | + | =edebug-view-outside= | =v=, =P= | =P= | + | =edebug-toggle-save-windows= | =W= | =WS= | + | =edebug-help= | =?= | =g?= | + | =edebug-backtrace= | =d= | =d= | + | =edebug-temp-display-freq-count= | === | === | + | =negative-argument= | =-= | =-= | + +** Integrations + + - edebug-x: in =edebug-x-instrumented-function-list-mode-map=, =RET= jumps to + the function, =E= evaluates, =Q= clears data, =q= quits. In + =edebug-x-breakpoint-list-mode-map=, =RET= visits the breakpoint, =x= kills + it, =Q= clears data, =q= quits. diff --git a/.config/emacs/lisp/evil-collection/modes/edebug/evil-collection-edebug.el b/.config/emacs/lisp/evil-collection/modes/edebug/evil-collection-edebug.el new file mode 100644 index 0000000..2c3d1d7 --- /dev/null +++ b/.config/emacs/lisp/evil-collection/modes/edebug/evil-collection-edebug.el @@ -0,0 +1,126 @@ +;;; evil-collection-edebug.el --- Evil bindings for Edebug -*- lexical-binding: t -*- + +;; Copyright (C) 2017 James Nguyen + +;; Author: James Nguyen +;; Maintainer: James Nguyen +;; Pierre Neidhardt +;; URL: https://github.com/emacs-evil/evil-collection +;; Version: 0.0.1 +;; Package-Requires: ((emacs "26.3")) +;; Keywords: evil, edebug, tools + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: +;; Evil bindings for `edebug-mode'. + +;;; Code: +(require 'edebug) +(require 'evil-collection) + +(defconst evil-collection-edebug-maps + '(edebug-mode-map + edebug-x-instrumented-function-list-mode-map + edebug-x-breakpoint-list-mode-map)) + +;;;###autoload +(defun evil-collection-edebug-setup () + "Set up `evil' bindings for `edebug'." + (evil-set-initial-state 'edebug-mode 'normal) + + (add-hook 'edebug-mode-hook #'evil-normalize-keymaps) + + (evil-collection-define-key nil 'edebug-mode-map + "g" nil + "G" nil + "h" nil) + + ;; FIXME: Seems like other minor modes will readily clash with `edebug'. + ;; `lispyville' and `edebug' 's' key? + (evil-collection-define-key 'normal 'edebug-mode-map + ;; control + "s" 'edebug-step-mode + "n" 'edebug-next-mode + "go" 'edebug-go-mode + "gO" 'edebug-Go-nonstop-mode + "t" 'edebug-trace-mode + "T" 'edebug-Trace-fast-mode + "c" 'edebug-continue-mode + "C" 'edebug-Continue-fast-mode + + "f" 'edebug-forward-sexp + "H" 'edebug-goto-here + "I" 'edebug-instrument-callee + "i" 'edebug-step-in + "o" 'edebug-step-out + + ;; quit + "q" 'top-level + "Q" 'edebug-top-level-nonstop + "a" 'abort-recursive-edit + "S" 'edebug-stop + + ;; breakpoints + "b" 'edebug-set-breakpoint + "u" 'edebug-unset-breakpoint + "B" 'edebug-next-breakpoint + "x" 'edebug-set-conditional-breakpoint + "X" 'edebug-set-global-break-condition + + ;; evaluation + "r" 'edebug-previous-result + "e" 'edebug-eval-expression + (kbd "C-x C-e") 'edebug-eval-last-sexp + "EL" 'edebug-visit-eval-list + + ;; views + "WW" 'edebug-where + "p" 'edebug-bounce-point + "P" 'edebug-view-outside ;; same as v + "WS" 'edebug-toggle-save-windows + + ;; misc + "g?" 'edebug-help + "d" 'edebug-backtrace + + "-" 'negative-argument + + ;; statistics + "=" 'edebug-temp-display-freq-count + + ;; GUD bindings + (kbd "C-c C-s") 'edebug-step-mode + (kbd "C-c C-n") 'edebug-next-mode + (kbd "C-c C-c") 'edebug-go-mode + + (kbd "C-x SPC") 'edebug-set-breakpoint + (kbd "C-c C-d") 'edebug-unset-breakpoint + (kbd "C-c C-t") (lambda () (interactive) (edebug-set-breakpoint t)) + (kbd "C-c C-l") 'edebug-where) + + (with-eval-after-load 'edebug-x + (evil-collection-define-key 'normal 'edebug-x-instrumented-function-list-mode-map + "E" 'edebug-x-evaluate-function + "Q" 'edebug-x-clear-data + (kbd "RET") 'edebug-x-find-function + "q" 'quit-window) + (evil-collection-define-key 'normal 'edebug-x-breakpoint-list-mode-map + (kbd "RET") 'edebug-x-visit-breakpoint + "x" 'edebug-x-kill-breakpoint + "Q" 'edebug-x-clear-data + "q" 'quit-window))) + +(provide 'evil-collection-edebug) +;;; evil-collection-edebug.el ends here -- cgit v1.2.3