Corrected erroneous losses to .emacs

This commit is contained in:
Nathan Schneider
2024-12-26 22:37:28 -07:00
parent 856d9dfc96
commit 01907ed38e
+40 -11
View File
@@ -1,4 +1,4 @@
;; GETTING STARTED
;; Emacs init file, by and for ntnsndr
;; INITIALIZE MELPA
;; Keep this on top
@@ -35,14 +35,14 @@
(global-visual-line-mode t)
;; load word-count tools, use "wc" command to get instant count
(load "wc-mode")
;; source: http://is.gd/ag5KOC
(setq backup-directory-alist '(("." . "~/.emacs.d/backup"))
backup-by-copying t ; Don't delink hardlinks
version-control t ; Use version numbers on backups
delete-old-versions t ; Automatically delete excess backups
kept-new-versions 20 ; how many of the newest versions to keep
kept-old-versions 5 ; and how many of the old
)
;; 4-space tabs as default
(setq-default indent-tabs-mode nil)
(setq-default tab-width 4)
;; MARKDOWN MODE
(autoload 'markdown-mode "markdown-mode" "Major mode for editing Markdown files" t)
(add-to-list 'auto-mode-alist '("\\.markdown\\'" . markdown-mode))
(add-to-list 'auto-mode-alist '("\\.md\\'" . markdown-mode))
;; HORIZONTAL WINDOWS
;; open horizontal windows as default for multiple files
@@ -54,8 +54,37 @@
(add-hook 'emacs-startup-hook '2-windows-vertical-to-horizontal)
;; MARGINS
(setq-default left-margin-width 1)
(setq-default right-margin-width 1)
(setq-default left-margin-width 2)
(setq-default right-margin-width 2)
;; set window margins
;; (a bit buggy on multiple-window startup, but resolves)
;;(add-hook 'window-configuration-change-hook
;; (lambda ()
;; (set-window-margins (car
;; (get-buffer-window-list
;; (current-buffer) nil t)) 2 2)))
;; SPELLING
(add-hook 'text-mode-hook 'flyspell-mode)
(add-hook 'prog-mode-hook 'flyspell-prog-mode)
;; Turn on Flyspell
(dolist (hook '(text-mode-hook))
(add-hook hook (lambda ()
(flyspell-mode 1)
(set-variable 'flyspell-issue-message-flag nil)
(flyspell-buffer))))
;; BACKUP CONTROL
;; source: http://is.gd/ag5KOC
(setq backup-directory-alist '(("." . "~/.emacs.d/backup"))
backup-by-copying t ; Don't delink hardlinks
version-control t ; Use version numbers on backups
delete-old-versions t ; Automatically delete excess backups
kept-new-versions 20 ; how many of the newest versions to keep
kept-old-versions 5 ; and how many of the old
)
;; FUNCTIONS