2023-10-27 10:31:36 +01:00
|
|
|
;;; custom-defaults-config.el -*- lexical-binding: t; -*-
|
|
|
|
|
|
|
|
;;; Code:
|
|
|
|
(setq load-prefer-newer t
|
|
|
|
indent-tabs-mode nil
|
|
|
|
global-auto-revert-non-file-buffers t
|
|
|
|
dired-auto-revert-buffer t
|
|
|
|
dired-dwim-target t
|
|
|
|
tab-always-indent 'complete
|
|
|
|
completion-cycle-threshold 3
|
|
|
|
completions-detailed t
|
|
|
|
xref-show-definitions-function #'xref-show-definitions-completing-read
|
|
|
|
kill-do-not-save-duplicates t
|
|
|
|
auto-window-vscroll nil
|
|
|
|
fast-but-imprecise-scrolling t
|
|
|
|
scroll-conservatively 101
|
|
|
|
scroll-margin 0
|
|
|
|
scroll-preserve-screen-position 1)
|
|
|
|
|
|
|
|
(global-auto-revert-mode +1)
|
|
|
|
(delete-selection-mode)
|
|
|
|
|
2023-10-29 07:00:48 +00:00
|
|
|
;; Misc useful keymaps
|
2023-11-04 12:23:46 +00:00
|
|
|
(keymap-global-set "M-#" #'dictionary-lookup-definition)
|
|
|
|
(keymap-global-set "C-c r" #'recentf)
|
|
|
|
(keymap-global-set "C-c b" #'ibuffer)
|
|
|
|
(keymap-global-set "C-c p l" #'list-packages)
|
|
|
|
(keymap-global-set "C-c p r" #'package-refresh-contents)
|
|
|
|
(keymap-global-set "C-c p i" #'package-install)
|
|
|
|
(keymap-global-set "C-c p d" #'package-delete)
|
2023-10-28 10:17:37 +01:00
|
|
|
|
2023-10-27 10:31:36 +01:00
|
|
|
;; turn on spell checking, if available.
|
2023-11-02 16:56:50 +00:00
|
|
|
(when (and (require 'ispell nil :noerror) (executable-find ispell-program-name))
|
|
|
|
(add-hook 'text-mode-hook #'flyspell-mode)
|
|
|
|
(add-hook 'prog-mode-hook #'flyspell-prog-mode))
|
2023-10-27 10:31:36 +01:00
|
|
|
|
|
|
|
;; Make shebang (#!) file executable when saved
|
|
|
|
(add-hook 'after-save-hook #'executable-make-buffer-file-executable-if-script-p)
|
2023-10-27 10:34:05 +01:00
|
|
|
|
|
|
|
(provide 'custom-defaults-config)
|