Add newer features section and page breaks
This commit is contained in:
parent
6d2391e0e9
commit
0fb567e1b3
|
@ -25,6 +25,7 @@ Do this only if the buffer is not visiting a file."
|
|||
(let ((buffer-file-name (buffer-name buf)))
|
||||
(set-auto-mode))))
|
||||
|
||||
|
||||
;;; General settings
|
||||
|
||||
(setq-default
|
||||
|
@ -139,6 +140,7 @@ Do this only if the buffer is not visiting a file."
|
|||
(when (version< emacs-version "28")
|
||||
(fset 'yes-or-no-p 'y-or-n-p))
|
||||
|
||||
|
||||
;;; Encodings
|
||||
|
||||
(setq-default locale-coding-system 'utf-8-unix
|
||||
|
@ -166,6 +168,7 @@ Do this only if the buffer is not visiting a file."
|
|||
(set-selection-coding-system 'utf-8)
|
||||
(set-clipboard-coding-system 'utf-8)))
|
||||
|
||||
|
||||
;;; Modes
|
||||
|
||||
(dolist (enable-mode '(global-auto-revert-mode
|
||||
|
@ -189,11 +192,13 @@ Do this only if the buffer is not visiting a file."
|
|||
(when (fboundp disable-mode)
|
||||
(funcall disable-mode -1)))
|
||||
|
||||
|
||||
;;; Hooks
|
||||
|
||||
(add-hook 'after-save-hook 'executable-make-buffer-file-executable-if-script-p)
|
||||
(add-hook 'minibuffer-setup-hook 'cursor-intangible-mode)
|
||||
|
||||
|
||||
;;; Better-default functions ...
|
||||
|
||||
(defun +cycle-spacing (&optional n preserve-nl-back mode)
|
||||
|
@ -238,6 +243,7 @@ backward. It defaults to `backward-kill-word'."
|
|||
(advice-add #'yank :after #'+yank@indent)
|
||||
(advice-add #'yank-pop :after #'+yank@indent)
|
||||
|
||||
|
||||
;;; Bindings
|
||||
|
||||
;; I need to place these bindings under `+key-mode-map' so that they aren't
|
||||
|
@ -255,6 +261,7 @@ backward. It defaults to `backward-kill-word'."
|
|||
("C-M-r" . isearch-backward)))
|
||||
(define-key +key-mode-map (kbd (car binding)) (cdr binding)))
|
||||
|
||||
|
||||
;;; Required libraries
|
||||
|
||||
(when (require 'uniquify nil :noerror)
|
||||
|
@ -276,13 +283,6 @@ backward. It defaults to `backward-kill-word'."
|
|||
(add-to-list 'recentf-exclude .etc)
|
||||
(recentf-mode +1))
|
||||
|
||||
(when (require 'repeat nil :noerror)
|
||||
(setq-default repeat-exit-key "g"
|
||||
repeat-exit-timeout 5)
|
||||
(when (fboundp 'repeat-mode)
|
||||
;; `repeat-mode' is defined in repeat.el, which is an older library.
|
||||
(repeat-mode +1)))
|
||||
|
||||
(when (require 'savehist nil :noerror)
|
||||
(setq-default history-length t
|
||||
history-delete-duplicates t
|
||||
|
@ -309,5 +309,17 @@ backward. It defaults to `backward-kill-word'."
|
|||
;; (add-to-list 'tramp-default-proxies-alist
|
||||
;; '((regexp-quote (system-name)) nil nil)))
|
||||
|
||||
|
||||
;;; Newer features
|
||||
;; These aren't in older version of Emacs, but they're so nice.
|
||||
|
||||
(when (fboundp 'repeat-mode)
|
||||
(setq-default repeat-exit-key "g"
|
||||
repeat-exit-timeout 5)
|
||||
(repeat-mode +1))
|
||||
|
||||
(when (fboundp 'pixel-scroll-precision-mode)
|
||||
(pixel-scroll-precision-mode +1))
|
||||
|
||||
(provide '+emacs)
|
||||
;;; +emacs.el ends here
|
||||
|
|
Loading…
Reference in New Issue