From 78dad03fff5722f59e9ce9ac474205435576772c Mon Sep 17 00:00:00 2001 From: Thomas Ulmer Date: Sun, 14 Jun 2026 09:11:02 -0700 Subject: emacs misc small changes, confirm less --- config/emacs/site-lisp/my-defines.el | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) (limited to 'config/emacs/site-lisp/my-defines.el') diff --git a/config/emacs/site-lisp/my-defines.el b/config/emacs/site-lisp/my-defines.el index 425a23e..5931149 100644 --- a/config/emacs/site-lisp/my-defines.el +++ b/config/emacs/site-lisp/my-defines.el @@ -148,6 +148,15 @@ If no such window exists, switch to BUFFER in the current window." (select-window win) (switch-to-buffer buffer)))) +(defun my/new-text () + "Produce a new text buffer to write a scrap of text in." + (interactive) + (let ((buf (generate-new-buffer "text"))) + (switch-to-buffer buf) + (text-mode) + (olivetti-mode 1) + buf)) + (defun my/shorten-path (path) "Shorten string PATH. Initialize all but the last path component." (let* ((components (split-string path "/")) @@ -282,6 +291,18 @@ With ARG, don't save the current layout." (setq my/layout-pair (cons right left))) (t (message "Quick layout swap only works with same frame!"))))) +(defun my/unfill-paragraph () + "Inverse of `fill-paragraph'." + (interactive) + (let ((fill-column most-positive-fixnum)) + (call-interactively 'fill-paragraph))) + +(defun my/unfill-region (start end) + "Inverse of `fill-region'." + (interactive "r") + (let ((fill-column most-positive-fixnum)) + (fill-region start end))) + (defun my/display-lines-advice (func &rest r) "Around advice that temporarily shows line numbers." (let ((want-quit inhibit-quit)) @@ -347,7 +368,8 @@ With ARG, don't save the current layout." (keymap-set my/keys-mode-map "M-N" 'man) (keymap-set my/keys-mode-map "M-*" 'my/shell-at-root) (keymap-set my/keys-mode-map "M-S" 'surround-prefix) - (keymap-set my/keys-mode-map "M-J" 'my/activate-mark) + (keymap-set my/keys-mode-map "M-H" 'my/activate-mark) + (keymap-set my/keys-mode-map "M-J" 'delete-indentation) (my/keys-mode 1)) -- cgit v1.2.3