summary refs log tree commit diff
path: root/emacs
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2022-04-19 20:06:53 -0700
committerFranck Cuny <franck@fcuny.net>2022-04-19 20:06:53 -0700
commit4e36065b36c4fa7d5600e11a9672867d62385153 (patch)
tree6991d34d71d8b480f18683ad32b60b65afc0d322 /emacs
parentno need for `use-package' for a few more modes (diff)
downloademacs.d-4e36065b36c4fa7d5600e11a9672867d62385153.tar.gz
remove the need for `use-package' in my-settings.el
Diffstat (limited to 'emacs')
-rw-r--r--emacs/custom/my-settings.el28
1 files changed, 15 insertions, 13 deletions
diff --git a/emacs/custom/my-settings.el b/emacs/custom/my-settings.el
index 4f6621b..a49239a 100644
--- a/emacs/custom/my-settings.el
+++ b/emacs/custom/my-settings.el
@@ -1,8 +1,8 @@
-;;; my-settings.el --- Sets a number of defaults
+;;; my-settings.el --- Sets a number of defaults -*- lexical-binding: t -*-
+
 ;;; Commentary:
 
 ;;; Code:
-(require 'use-package)
 
 (defvar my/custom-settings (expand-file-name "var/emacs-custom.el" user-emacs-directory)
   "Path to Emacs custom variables.")
@@ -20,6 +20,7 @@
 (setq auto-save-default nil)                     ;; don't auto save files
 (setq auto-save-list-file-prefix nil)            ;; no backups
 (setq create-lockfiles nil)                      ;; don't use a lock file
+(setq confirm-kill-emacs #'yes-or-no-p)          ;; ask before killing emacs
 (setq custom-file my/custom-settings)            ;; where to save custom settings
 (setq make-backup-files nil)                     ;; really no backups
 (setq minibuffer-message-timeout 0.5)            ;; How long to display an echo-area message
@@ -46,27 +47,28 @@
       user-mail-address "franck@fcuny.net"
       add-log-mailing-address "franck@fcuny.net")
 
+(require 'savehist)
 (setq savehist-file (expand-file-name "var/history" user-emacs-directory))
-(setq url-history-file (expand-file-name "var/url-history" user-emacs-directory))
-(setq bookmark-file (expand-file-name "var/bookmarks" user-emacs-directory))
-(setq url-cookie-file (expand-file-name "var/cookies" user-emacs-directory))
+(setq history-length 1000)
+(setq history-delete-duplicates t)
+(setq savehist-save-minibuffer-history t)
+(add-hook 'after-init-hook #'savehist-mode)
+
+(require 'midnight)
+(add-hook 'after-init-hook #'midnight-mode)
 
-;; delete buffers that have not been displayed in the last 3 days
-(use-package midnight
-  :config
-  (midnight-mode t))
+(require 'saveplace)
+(setq save-place-forget-unreadable-files t)
+(add-hook 'after-init-hook #'save-place-mode)
 
 (unless (and (fboundp 'server-running-p)
              (server-running-p))
   (server-start))
 
-(use-package savehist
-  :init
-  (savehist-mode))
-
 (when (memq window-system '(mas ns))
   (require 'exec-path-from-shell)
   (add-hook 'emacs-startup-hook (lambda () (exec-path-from-shell-initialize))))
 
 (provide 'my-settings)
+
 ;;; my-settings.el ends here