feat(editor): add custom yank-indent package

When yank-indent-mode is enabled, yanked (pasted) text is indented based
on the indent rules of the current major mode. It has a
global-yank-indent-mode too which by default excludes a long list of
known indentation sensitive modes with which this approach does not work
very well.

It is based on some random hacky snippets elisp I've been using for over
a decade. Said snippets are themselves based on some random snippets I
found online, and since morphed into the weird monster they had become.
This commit is contained in:
2023-04-16 03:13:14 +01:00
parent b0b126ee55
commit 0eedc37603
6 changed files with 192 additions and 49 deletions

View File

@@ -21,10 +21,7 @@
:preface
(defun siren-makefile-mode-setup ()
(siren-display-indentation -1)
(setq-local tab-width 4))
:init
(add-to-list 'siren-indent-sensitive-modes 'makefile-mode))
(setq-local tab-width 4)))
(provide 'siren-makefile)
;;; siren-makefile.el ends here