summary refs log tree commit diff stats
path: root/basics.el
diff options
context:
space:
mode:
authorCase Duckworth2023-05-05 09:58:21 -0500
committerCase Duckworth2023-05-05 09:58:21 -0500
commit989171268461a0069ecd53a49e6098ce08638102 (patch)
treeb88889d371152458f674c0a608222bf1192f3980 /basics.el
parentremove bad fiels (diff)
downloademacs-989171268461a0069ecd53a49e6098ce08638102.tar.gz
emacs-989171268461a0069ecd53a49e6098ce08638102.zip
changes use-package
Diffstat (limited to 'basics.el')
-rw-r--r--basics.el48
1 files changed, 28 insertions, 20 deletions
diff --git a/basics.el b/basics.el index 15831d3..1405c84 100644 --- a/basics.el +++ b/basics.el
@@ -192,7 +192,7 @@
192 auto-save-interval 1 192 auto-save-interval 1
193 auto-save-no-message t 193 auto-save-no-message t
194 auto-save-timeout 1 194 auto-save-timeout 1
195 auto-save-visited-interval 10 195 auto-save-visited-interval 1
196 remote-file-name-inhibit-auto-save-visited t) 196 remote-file-name-inhibit-auto-save-visited t)
197(add-to-list 'auto-save-file-name-transforms 197(add-to-list 'auto-save-file-name-transforms
198 `(".*" ,(etc/ "auto-save/" t) t)) 198 `(".*" ,(etc/ "auto-save/" t) t))
@@ -202,7 +202,12 @@
202 version-control t 202 version-control t
203 kept-new-versions 8 203 kept-new-versions 8
204 kept-old-versions 8 204 kept-old-versions 8
205 delete-old-versions t) 205 delete-old-versions t
206 backup-directory-alist
207 `(("^/dev/shm" . nil)
208 ("^/tmp" . nil)
209 (,(getenv "XDG_RUNTIME_DIR") . nil)
210 ("." . ,(no-littering-expand-etc-file-name "backup"))))
206 211
207(require 'recentf) 212(require 'recentf)
208(setq-default ;; recentf-save-file (etc/ "recentf" t) 213(setq-default ;; recentf-save-file (etc/ "recentf" t)
@@ -213,6 +218,7 @@
213(add-to-list 'recentf-exclude etc/) 218(add-to-list 'recentf-exclude etc/)
214(add-to-list 'recentf-exclude "-autoloads.el\\'") 219(add-to-list 'recentf-exclude "-autoloads.el\\'")
215(add-hook 'buffer-list-update-hook #'recentf-track-opened-file) 220(add-hook 'buffer-list-update-hook #'recentf-track-opened-file)
221(add-hook 'after-save-hook #'recentf-save-list)
216(recentf-mode) 222(recentf-mode)
217 223
218(require 'saveplace) 224(require 'saveplace)
@@ -247,7 +253,8 @@
247(setq-default native-comp-async-report-warnings-errors 'silent 253(setq-default native-comp-async-report-warnings-errors 'silent
248 native-comp-deferred-compilation t 254 native-comp-deferred-compilation t
249 native-compile-target-directory (etc/ "eln" t)) 255 native-compile-target-directory (etc/ "eln" t))
250(add-to-list 'native-comp-eln-load-path native-compile-target-directory) 256(when (boundp 'native-comp-eln-load-path)
257 (add-to-list 'native-comp-eln-load-path native-compile-target-directory))
251(when (fboundp 'startup-redirect-eln-cache) 258(when (fboundp 'startup-redirect-eln-cache)
252 (startup-redirect-eln-cache native-compile-target-directory)) 259 (startup-redirect-eln-cache native-compile-target-directory))
253 260
@@ -373,19 +380,19 @@ When at the beginning of a line, delete blank lines before point."
373(when (fboundp '+lisp-comment-or-uncomment-sexp) 380(when (fboundp '+lisp-comment-or-uncomment-sexp)
374 (define-key lisp-mode-map (kbd "C-M-;") #'+lisp-comment-or-uncomment-sexp) 381 (define-key lisp-mode-map (kbd "C-M-;") #'+lisp-comment-or-uncomment-sexp)
375 (define-key emacs-lisp-mode-map (kbd "C-M-;") 382 (define-key emacs-lisp-mode-map (kbd "C-M-;")
376 #'+lisp-comment-or-uncomment-sexp) 383 #'+lisp-comment-or-uncomment-sexp)
377 (with-eval-after-load 'scheme 384 (with-eval-after-load 'scheme
378 (define-key scheme-mode-map (kbd "C-M-;") 385 (define-key scheme-mode-map (kbd "C-M-;")
379 #'+lisp-comment-or-uncomment-sexp))) 386 #'+lisp-comment-or-uncomment-sexp)))
380 387
381(define-key emacs-lisp-mode-map (kbd "C-c C-c") 388(define-key emacs-lisp-mode-map (kbd "C-c C-c")
382 #'eval-defun) 389 #'eval-defun)
383(define-key emacs-lisp-mode-map (kbd "C-c C-k") 390(define-key emacs-lisp-mode-map (kbd "C-c C-k")
384 #'elisp-eval-region-or-buffer) 391 #'elisp-eval-region-or-buffer)
385(define-key lisp-interaction-mode-map (kbd "C-c C-c") 392(define-key lisp-interaction-mode-map (kbd "C-c C-c")
386 #'eval-defun) 393 #'eval-defun)
387(define-key lisp-interaction-mode-map (kbd "C-c C-k") 394(define-key lisp-interaction-mode-map (kbd "C-c C-k")
388 #'elisp-eval-region-or-buffer) 395 #'elisp-eval-region-or-buffer)
389(define-advice eval-region (:around (orig start end &rest args) pulse) 396(define-advice eval-region (:around (orig start end &rest args) pulse)
390 (apply orig start end args) 397 (apply orig start end args)
391 (pulse-momentary-highlight-region start end)) 398 (pulse-momentary-highlight-region start end))
@@ -432,7 +439,7 @@ When at the beginning of a line, delete blank lines before point."
432 :load-path private/) 439 :load-path private/)
433 440
434(use-package custom-allowed 441(use-package custom-allowed
435 :load-path "/home/case/src/emacs/custom-allowed/" 442 :load-path "~/src/custom-allowed.el/"
436 :config 443 :config
437 (add-to-list 'custom-allowed-variables 'safe-local-variable-values) 444 (add-to-list 'custom-allowed-variables 'safe-local-variable-values)
438 (add-to-list 'custom-allowed-variables 'ispell-buffer-session-localwords) 445 (add-to-list 'custom-allowed-variables 'ispell-buffer-session-localwords)
@@ -445,7 +452,7 @@ When at the beginning of a line, delete blank lines before point."
445 (after-init-hook . custom-allowed-load-custom-file)) 452 (after-init-hook . custom-allowed-load-custom-file))
446 453
447(use-package sophomore 454(use-package sophomore
448 :load-path "/home/case/src/emacs/sophomore/" 455 :load-path "~/src/sophomore.el/"
449 :config 456 :config
450 (sophomore-enable-all) 457 (sophomore-enable-all)
451 (sophomore-disable 'view-hello-file 458 (sophomore-disable 'view-hello-file
@@ -463,7 +470,7 @@ When at the beginning of a line, delete blank lines before point."
463 (setq vertico-cycle t) 470 (setq vertico-cycle t)
464 (add-hook 'vertico-mode-hook 471 (add-hook 'vertico-mode-hook
465 (defun vertico-mode@fix-completions () 472 (defun vertico-mode@fix-completions ()
466 (setopt completion-in-region-function 473 (setq completion-in-region-function
467 (if vertico-mode 474 (if vertico-mode
468 #'consult-completion-in-region 475 #'consult-completion-in-region
469 #'completion--in-region)))) 476 #'completion--in-region))))
@@ -596,15 +603,15 @@ When at the beginning of a line, delete blank lines before point."
596 ;; Optionally make narrowing help available in the minibuffer. 603 ;; Optionally make narrowing help available in the minibuffer.
597 ;; You may want to use `embark-prefix-help-command' or which-key instead. 604 ;; You may want to use `embark-prefix-help-command' or which-key instead.
598 (define-key consult-narrow-map (vconcat consult-narrow-key "?") 605 (define-key consult-narrow-map (vconcat consult-narrow-key "?")
599 #'consult-narrow-help)) 606 #'consult-narrow-help))
600 607
601(use-package orderless 608(use-package orderless
602 :ensure t :demand t 609 :ensure t :demand t
603 :init 610 :init
604 (setopt completion-styles '(orderless substring basic) 611 (setq completion-styles '(orderless substring basic)
605 completion-category-defaults nil 612 completion-category-defaults nil
606 completion-category-overrides 613 completion-category-overrides
607 '((file (styles basic partial-completion orderless))))) 614 '((file (styles basic partial-completion orderless)))))
608 615
609(use-package marginalia 616(use-package marginalia
610 :ensure t :demand t 617 :ensure t :demand t
@@ -618,7 +625,7 @@ When at the beginning of a line, delete blank lines before point."
618 ("M-." . embark-dwim) 625 ("M-." . embark-dwim)
619 ("C-h B" . embark-bindings)) 626 ("C-h B" . embark-bindings))
620 :init 627 :init
621 (setopt prefix-help-command #'embark-prefix-help-command) 628 (setq prefix-help-command #'embark-prefix-help-command)
622 :config 629 :config
623 (add-to-list 'display-buffer-alist 630 (add-to-list 'display-buffer-alist
624 '("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*" 631 '("\\`\\*Embark Collect \\(Live\\|Completions\\)\\*"
@@ -642,7 +649,7 @@ When at the beginning of a line, delete blank lines before point."
642(use-package undo-fu-session 649(use-package undo-fu-session
643 :ensure t 650 :ensure t
644 :config 651 :config
645 (setopt undo-fu-session-compression (cond 652 (setq undo-fu-session-compression (cond
646 ((executable-find "gunzip") 'gz) 653 ((executable-find "gunzip") 'gz)
647 ((executable-find "bzip2") 'bz2)) 654 ((executable-find "bzip2") 'bz2))
648 undo-fu-session-incompatible-files '("/COMMIT_EDITMSG\\'" 655 undo-fu-session-incompatible-files '("/COMMIT_EDITMSG\\'"
@@ -667,6 +674,7 @@ When at the beginning of a line, delete blank lines before point."
667 ([right-margin double-wheel-up] . pixel-scroll-precision) 674 ([right-margin double-wheel-up] . pixel-scroll-precision)
668 ([right-margin triple-wheel-up] . pixel-scroll-precision)) 675 ([right-margin triple-wheel-up] . pixel-scroll-precision))
669 :config 676 :config
670 (pixel-scroll-precision-mode)) 677 (when (fboundp 'pixel-scroll-precision-mode)
678 (pixel-scroll-precision-mode)))
671 679
672;;; basics.el ends here 680;;; basics.el ends here