diff options
| author | Thomas Ulmer <thomasmulmer02@gmail.com> | 2026-06-14 09:11:02 -0700 |
|---|---|---|
| committer | Thomas Ulmer <thomasmulmer02@gmail.com> | 2026-06-14 09:11:02 -0700 |
| commit | 78dad03fff5722f59e9ce9ac474205435576772c (patch) | |
| tree | 6eb62b40c329df08ee5937e108b3cada3b2dff72 /config/emacs/site-lisp | |
| parent | 8e968102951ca564d310c1804e0a3ad04f803c20 (diff) | |
emacs misc small changes, confirm less
Diffstat (limited to 'config/emacs/site-lisp')
| -rw-r--r-- | config/emacs/site-lisp/my-builtins.el | 2 | ||||
| -rw-r--r-- | config/emacs/site-lisp/my-defines.el | 24 | ||||
| -rw-r--r-- | config/emacs/site-lisp/my-packages.el | 29 |
3 files changed, 54 insertions, 1 deletions
diff --git a/config/emacs/site-lisp/my-builtins.el b/config/emacs/site-lisp/my-builtins.el index 94e82c1..bc29beb 100644 --- a/config/emacs/site-lisp/my-builtins.el +++ b/config/emacs/site-lisp/my-builtins.el @@ -30,6 +30,7 @@ (use-package ibuffer ; give a nice list of buffers with extra info :commands (ibuffer) :custom + (ibuffer-expert t) (ibuffer-formats '((mark modified read-only " " (name 50 50 :left :elide) ; was originally 18 @@ -182,6 +183,7 @@ (progn ; vc and related binds (setq vc-follow-symlinks t) + (setq vc-dir-allow-mass-mark-changes t) (vc-auto-revert-mode 1) (add-hook 'prog-mode-hook 'smerge-mode)) 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)) diff --git a/config/emacs/site-lisp/my-packages.el b/config/emacs/site-lisp/my-packages.el index c625252..65572b2 100644 --- a/config/emacs/site-lisp/my-packages.el +++ b/config/emacs/site-lisp/my-packages.el @@ -302,6 +302,35 @@ (use-package rust-mode ; rust lang syntax ) +(use-package mmm-mode + :after haskell-mode + :custom + (mmm-submode-decoration-level 0) + :hook + ('haskell-literate-mode . 'my/mmm-mode) + (haskell-literate-mode . 'mmm-ify-by-class) + :init + (defun my/mmm-mode () + ;; go into mmm minor mode when class is given + (make-local-variable 'mmm-global-mode) + (setq mmm-global-mode 'true)) + (mmm-add-classes + '((literate-haskell-bird + :submode text-mode + :front "^[^>]" + :include-front true + :back "^>\\|$" + ) + (literate-haskell-latex + :submode literate-haskell-mode + :front "^\\\\begin{code}" + :front-offset (end-of-line 1) + :back "^\\\\end{code}" + :include-back nil + :back-offset (beginning-of-line -1) + )))) + + (use-package haskell-mode ; haskell + cabal integrations :custom (haskell-tags-on-save t) |
