diff options
Diffstat (limited to 'lisp/acdw.el')
-rw-r--r-- | lisp/acdw.el | 79 |
1 files changed, 0 insertions, 79 deletions
diff --git a/lisp/acdw.el b/lisp/acdw.el deleted file mode 100644 index 30c4f44..0000000 --- a/lisp/acdw.el +++ /dev/null | |||
@@ -1,79 +0,0 @@ | |||
1 | ;;; acdw.el --- Basic emacs shit for acdw -*- lexical-binding: t -*- | ||
2 | |||
3 | ;;; Code: | ||
4 | |||
5 | (require 'acdw-funs) ; Extra functions | ||
6 | (require 'acdw-macs) ; Extra macros | ||
7 | |||
8 | (defdir etc/ (locate-user-emacs-file "etc") | ||
9 | "Directory for package configuration files. | ||
10 | See `no-littering' for examples.") | ||
11 | |||
12 | (defdir var/ etc/ | ||
13 | "Directory for package data file. | ||
14 | See `no-littering' for examples.") | ||
15 | |||
16 | (defdir cache/ (if-let ((xdg-cache (getenv "XDG_CACHE_HOME"))) | ||
17 | (expand-file-name "emacs/" xdg-cache) | ||
18 | etc/) | ||
19 | "Directory for cache files.") | ||
20 | |||
21 | (setq native-compile-target-directory (cache/ "eln" t)) | ||
22 | (when (fboundp 'startup-redirect-eln-cache) | ||
23 | (startup-redirect-eln-cache (cache/ "eln" t))) | ||
24 | |||
25 | (defdir sync/ (expand-file-name "/home/case/Sync") | ||
26 | "My Syncthing directory.") | ||
27 | |||
28 | (defdir private/ (sync/ "emacs/private")) | ||
29 | (add-to-list 'load-path private/) | ||
30 | |||
31 | (require 'acdw-defaults) ; Sane defaults | ||
32 | (require '_acdw) ; Private stuff | ||
33 | (require '+lisp) ; Lispy goodness | ||
34 | |||
35 | (setc enable-recursive-minibuffers t | ||
36 | completions-detailed t | ||
37 | completion-ignore-case t | ||
38 | read-buffer-completion-ignore-case t | ||
39 | read-file-name-completion-ignore-case t | ||
40 | initial-buffer-choice #'+initial-buffer | ||
41 | initial-scratch-message | ||
42 | (format "%s\n\n" | ||
43 | (comment-lines | ||
44 | (shell-command-to-string "fortune") | ||
45 | ";; ")) | ||
46 | sentence-end-double-space nil | ||
47 | save-silently t) | ||
48 | |||
49 | (defkeys t | ||
50 | "M-o" #'other-window|switch-buffer | ||
51 | "C-x 0" #'delete-window|bury-buffer | ||
52 | "C-M-;" #'+lisp-comment-or-uncomment-sexp | ||
53 | "M-SPC" #'+cycle-spacing | ||
54 | "C-x C-k" #'kill-this-buffer) | ||
55 | |||
56 | (defkeys t | ||
57 | "M-u" #'universal-argument) | ||
58 | |||
59 | (defkeys universal-argument-map | ||
60 | "M-u" #'universal-argument-more) | ||
61 | |||
62 | (define-advice switch-to-buffer (:after (&rest _) normal-mode) | ||
63 | "Automatically determine the mode for created non-file buffers." | ||
64 | (when-let ((_ (and (eq major-mode 'fundamental-mode))) | ||
65 | (buffer-file-name (buffer-name))) | ||
66 | (normal-mode))) | ||
67 | |||
68 | (define-advice canonically-space-region | ||
69 | (:around (orig &rest args) double-space-sentences) | ||
70 | (let ((sentence-end-double-space t)) | ||
71 | (apply orig args))) | ||
72 | |||
73 | (with-region-or-buffer indent-region) | ||
74 | |||
75 | (winner-mode) | ||
76 | |||
77 | (provide 'acdw) | ||
78 | |||
79 | ;;; acdw.el ends here | ||