fix electric indent, tab indent and smartparens

This commit is contained in:
2023-04-12 16:40:39 +02:00
parent ed4b350109
commit f9aa8e01a1
4 changed files with 124 additions and 120 deletions

View File

@@ -1 +0,0 @@
# Pasting from unix into emacs doesn't work anymore

View File

@@ -122,7 +122,7 @@ Returns t if version changed, nil otherwise."
;; enable outshine mode ;; enable outshine mode
(outshine-hook-function) (outshine-hook-function)
(electric-indent-mode t))) (electric-indent-local-mode t)))
;; use UP arrow for history in *ielm* as well, just as C-up ;; use UP arrow for history in *ielm* as well, just as C-up
(add-hook 'comint-mode-hook (add-hook 'comint-mode-hook

View File

@@ -42,11 +42,13 @@ Used when enabling smartparens-mode."
;; automatically enable where needed ;; automatically enable where needed
(add-something-to-mode-hooks (add-something-to-mode-hooks
'(rust emacs-lisp ielm lisp lisp-interaction scheme slime-repl ) 'smartparens-mode) '(rust emacs-lisp ielm lisp elisp lisp-interaction scheme slime-repl ) 'smartparens-mode)
;; also in some select prog modes ;; also in some select prog modes
(add-something-to-mode-hooks ;; (add-something-to-mode-hooks
'(perl ruby c c++ sh makefile config-general yaml go) 'smartparens-mode) ;; '(perl ruby c c++ sh makefile config-general yaml go) (smartparens-mode t))
;; the above doesn't work anymore, for whatever reasons, so I enable it for all
(smartparens-global-mode t)
;; via https://ebzzry.io/en/emacs-pairs/: ;; via https://ebzzry.io/en/emacs-pairs/:
(defmacro def-pairs (pairs) (defmacro def-pairs (pairs)

View File

@@ -277,3 +277,6 @@ in between will be killed. If INS is non-nil, it will be inserted then."
(advice-add 'iedit-mode :after '(lambda (&rest args) ;; restore previously saved (advice-add 'iedit-mode :after '(lambda (&rest args) ;; restore previously saved
(setq buffer-undo-list tvd-buffer-undo-list)))) (setq buffer-undo-list tvd-buffer-undo-list))))
(add-hook 'text-mode-hook
(lambda () (electric-indent-local-mode -1)))