update emacs config to 21th century

This commit is contained in:
2023-04-12 14:26:43 +02:00
parent 76ce84c43b
commit 725984485a
121 changed files with 6584 additions and 6864 deletions

15
conf-lisp/occur.el Normal file
View File

@@ -0,0 +1,15 @@
;; *** Occur
;; https://oremacs.com/2015/01/26/occur-dwim/
;; https://github.com/abo-abo/hydra/wiki/Emacs
(defun occur-dwim ()
"Call `occur' with a sane default, chosen as the thing under point or selected region"
(interactive)
(push (if (region-active-p)
(buffer-substring-no-properties
(region-beginning)
(region-end))
(let ((sym (thing-at-point 'symbol)))
(when (stringp sym)
(regexp-quote sym))))
regexp-history)
(call-interactively 'occur))