Commit | Line | Data |
---|---|---|
1722d680 LC |
1 | ;; Per-directory local variables for GNU Emacs 23 and later. |
2 | ||
d53e8ba6 LC |
3 | ((nil |
4 | . ((fill-column . 78) | |
5 | (tab-width . 8) | |
afb325d8 | 6 | (sentence-end-double-space . t) |
d53e8ba6 LC |
7 | |
8 | ;; For use with 'bug-reference-prog-mode'. | |
d53e8ba6 | 9 | (bug-reference-bug-regexp |
6764455a LC |
10 | . "\\(<https?://\\bugs\\.gnu\\.org/\\([0-9]+\\)>\\)") |
11 | (bug-reference-url-format . "https://bugs.gnu.org/%s") | |
0e1b0958 | 12 | |
31b4eea5 AT |
13 | (eval . (add-to-list 'completion-ignored-extensions ".go")) |
14 | ||
0e1b0958 | 15 | ;; Emacs-Guix |
a895eace CLW |
16 | (eval . (setq-local guix-directory |
17 | (locate-dominating-file default-directory | |
18 | ".dir-locals.el"))) | |
39b8f85a | 19 | |
956a79b9 AT |
20 | ;; YASnippet |
21 | (eval . (with-eval-after-load | |
22 | 'yasnippet | |
23 | (let ((guix-yasnippets | |
24 | (expand-file-name | |
39b8f85a | 25 | "etc/snippets/yas" |
956a79b9 AT |
26 | (locate-dominating-file default-directory |
27 | ".dir-locals.el")))) | |
28 | (unless (member guix-yasnippets yas-snippet-dirs) | |
29 | (add-to-list 'yas-snippet-dirs guix-yasnippets) | |
30 | (yas-reload-all))))) | |
0e1b0958 MC |
31 | |
32 | ;; Geiser | |
33 | ;; This allows automatically setting the `geiser-guile-load-path' | |
34 | ;; variable when using various Guix checkouts (e.g., via git worktrees). | |
1d6e7732 CLW |
35 | (eval . (let ((root-dir-unexpanded (locate-dominating-file |
36 | default-directory ".dir-locals.el"))) | |
37 | ;; While Guix should in theory always have a .dir-locals.el | |
38 | ;; (we are reading this file, after all) there seems to be a | |
39 | ;; strange problem where this code "escapes" to some other buffers, | |
40 | ;; at least vc-mode. See: | |
41 | ;; https://lists.gnu.org/archive/html/guix-devel/2020-11/msg00296.html | |
3428c66c | 42 | ;; Upstream report: <https://bugs.gnu.org/44698> |
1d6e7732 CLW |
43 | ;; Hence the following "when", which might otherwise be unnecessary; |
44 | ;; it prevents causing an error when root-dir-unexpanded is nil. | |
45 | (when root-dir-unexpanded | |
46 | (let* ((root-dir (expand-file-name root-dir-unexpanded)) | |
47 | ;; Workaround for bug https://issues.guix.gnu.org/43818. | |
48 | (root-dir* (directory-file-name root-dir))) | |
49 | ||
50 | (unless (boundp 'geiser-guile-load-path) | |
51 | (defvar geiser-guile-load-path '())) | |
52 | (make-local-variable 'geiser-guile-load-path) | |
53 | (require 'cl-lib) | |
54 | (cl-pushnew root-dir* geiser-guile-load-path | |
55 | :test #'string-equal))))))) | |
0e1b0958 | 56 | |
1722d680 LC |
57 | (c-mode . ((c-file-style . "gnu"))) |
58 | (scheme-mode | |
59 | . | |
60 | ((indent-tabs-mode . nil) | |
21b679f6 | 61 | (eval . (put 'eval-when 'scheme-indent-function 1)) |
2abcc97f | 62 | (eval . (put 'call-with-prompt 'scheme-indent-function 1)) |
0bdba772 | 63 | (eval . (put 'test-assert 'scheme-indent-function 1)) |
92755c63 | 64 | (eval . (put 'test-assertm 'scheme-indent-function 2)) |
22ef06b8 | 65 | (eval . (put 'test-equalm 'scheme-indent-function 1)) |
0bdba772 | 66 | (eval . (put 'test-equal 'scheme-indent-function 1)) |
81deef27 | 67 | (eval . (put 'test-eq 'scheme-indent-function 1)) |
0bdba772 | 68 | (eval . (put 'call-with-input-string 'scheme-indent-function 1)) |
a8d3033d | 69 | (eval . (put 'call-with-port 'scheme-indent-function 1)) |
0bdba772 | 70 | (eval . (put 'guard 'scheme-indent-function 1)) |
1722d680 LC |
71 | (eval . (put 'lambda* 'scheme-indent-function 1)) |
72 | (eval . (put 'substitute* 'scheme-indent-function 1)) | |
f4596f76 | 73 | (eval . (put 'match-record 'scheme-indent-function 2)) |
da99126c | 74 | |
04b2f3dd LC |
75 | ;; 'modify-inputs' and its keywords. |
76 | (eval . (put 'modify-inputs 'scheme-indent-function 1)) | |
77 | (eval . (put 'replace 'scheme-indent-function 1)) | |
04b2f3dd | 78 | |
da99126c | 79 | ;; 'modify-phases' and its keywords. |
8ddc41e1 | 80 | (eval . (put 'modify-phases 'scheme-indent-function 1)) |
da99126c AK |
81 | (eval . (put 'replace 'scheme-indent-function 1)) |
82 | (eval . (put 'add-before 'scheme-indent-function 2)) | |
83 | (eval . (put 'add-after 'scheme-indent-function 2)) | |
84 | ||
cd6f6c22 | 85 | (eval . (put 'modify-services 'scheme-indent-function 1)) |
1722d680 | 86 | (eval . (put 'with-directory-excursion 'scheme-indent-function 1)) |
b7178c22 | 87 | (eval . (put 'with-file-lock 'scheme-indent-function 1)) |
6fbd8fde | 88 | (eval . (put 'with-file-lock/no-wait 'scheme-indent-function 1)) |
55e1dfa4 | 89 | (eval . (put 'with-profile-lock 'scheme-indent-function 1)) |
14c422c1 | 90 | (eval . (put 'with-writable-file 'scheme-indent-function 2)) |
b7178c22 | 91 | |
2a8417ac | 92 | (eval . (put 'package 'scheme-indent-function 0)) |
8d0e5c26 | 93 | (eval . (put 'package/inherit 'scheme-indent-function 1)) |
35ef3633 | 94 | (eval . (put 'origin 'scheme-indent-function 0)) |
0d5a559f LC |
95 | (eval . (put 'build-system 'scheme-indent-function 0)) |
96 | (eval . (put 'bag 'scheme-indent-function 0)) | |
b1c25e2c | 97 | (eval . (put 'computed-file 'scheme-indent-function 1)) |
82daab42 | 98 | (eval . (put 'gexp->derivation 'scheme-indent-function 1)) |
969df974 | 99 | (eval . (put 'graft 'scheme-indent-function 0)) |
83bcd0b8 LC |
100 | (eval . (put 'operating-system 'scheme-indent-function 0)) |
101 | (eval . (put 'file-system 'scheme-indent-function 0)) | |
a2078770 LC |
102 | (eval . (put 'manifest-entry 'scheme-indent-function 0)) |
103 | (eval . (put 'manifest-pattern 'scheme-indent-function 0)) | |
073c34d7 | 104 | (eval . (put 'substitute-keyword-arguments 'scheme-indent-function 1)) |
ce4a4829 | 105 | (eval . (put 'with-store 'scheme-indent-function 1)) |
19c924af | 106 | (eval . (put 'with-external-store 'scheme-indent-function 1)) |
03323862 | 107 | (eval . (put 'with-error-handling 'scheme-indent-function 0)) |
b860f382 | 108 | (eval . (put 'with-mutex 'scheme-indent-function 1)) |
04d4c8a4 | 109 | (eval . (put 'with-atomic-file-output 'scheme-indent-function 1)) |
01ac19dc LC |
110 | (eval . (put 'call-with-compressed-output-port 'scheme-indent-function 2)) |
111 | (eval . (put 'call-with-decompressed-port 'scheme-indent-function 2)) | |
72153902 LC |
112 | (eval . (put 'call-with-gzip-input-port 'scheme-indent-function 1)) |
113 | (eval . (put 'call-with-gzip-output-port 'scheme-indent-function 1)) | |
66229b04 LC |
114 | (eval . (put 'call-with-lzip-input-port 'scheme-indent-function 1)) |
115 | (eval . (put 'call-with-lzip-output-port 'scheme-indent-function 1)) | |
81deef27 | 116 | (eval . (put 'signature-case 'scheme-indent-function 1)) |
75f3b1a1 MW |
117 | (eval . (put 'emacs-batch-eval 'scheme-indent-function 0)) |
118 | (eval . (put 'emacs-batch-edit-file 'scheme-indent-function 1)) | |
119 | (eval . (put 'emacs-substitute-sexps 'scheme-indent-function 1)) | |
120 | (eval . (put 'emacs-substitute-variables 'scheme-indent-function 1)) | |
6eebbab5 | 121 | (eval . (put 'with-derivation-narinfo 'scheme-indent-function 1)) |
c63d9403 | 122 | (eval . (put 'with-derivation-substitute 'scheme-indent-function 2)) |
dc0f74e5 | 123 | (eval . (put 'with-status-report 'scheme-indent-function 1)) |
7804c45b | 124 | (eval . (put 'with-status-verbosity 'scheme-indent-function 1)) |
041b340d | 125 | (eval . (put 'with-build-handler 'scheme-indent-function 1)) |
b860f382 | 126 | |
f9704f17 LC |
127 | (eval . (put 'mlambda 'scheme-indent-function 1)) |
128 | (eval . (put 'mlambdaq 'scheme-indent-function 1)) | |
b860f382 LC |
129 | (eval . (put 'syntax-parameterize 'scheme-indent-function 1)) |
130 | (eval . (put 'with-monad 'scheme-indent-function 1)) | |
405a9d4e | 131 | (eval . (put 'mbegin 'scheme-indent-function 1)) |
21caa6de LC |
132 | (eval . (put 'mwhen 'scheme-indent-function 1)) |
133 | (eval . (put 'munless 'scheme-indent-function 1)) | |
b860f382 LC |
134 | (eval . (put 'mlet* 'scheme-indent-function 2)) |
135 | (eval . (put 'mlet 'scheme-indent-function 2)) | |
9fdc4b6c | 136 | (eval . (put 'mparameterize 'scheme-indent-function 2)) |
21b679f6 | 137 | (eval . (put 'run-with-store 'scheme-indent-function 1)) |
81a97734 | 138 | (eval . (put 'run-with-state 'scheme-indent-function 1)) |
b1ec2233 | 139 | (eval . (put 'wrap-program 'scheme-indent-function 1)) |
b5e85191 | 140 | (eval . (put 'wrap-script 'scheme-indent-function 1)) |
0bb9929e | 141 | (eval . (put 'with-imported-modules 'scheme-indent-function 1)) |
838e17d8 | 142 | (eval . (put 'with-extensions 'scheme-indent-function 1)) |
cf2ac04f | 143 | (eval . (put 'with-parameters 'scheme-indent-function 1)) |
644cb40c | 144 | (eval . (put 'let-system 'scheme-indent-function 1)) |
7d873f19 | 145 | (eval . (put 'with-build-variables 'scheme-indent-function 2)) |
21b679f6 | 146 | |
7f9d184d | 147 | (eval . (put 'with-database 'scheme-indent-function 2)) |
1574bd82 | 148 | (eval . (put 'call-with-database 'scheme-indent-function 1)) |
1d40e6fd | 149 | (eval . (put 'call-with-transaction 'scheme-indent-function 1)) |
5d6e2255 | 150 | (eval . (put 'with-statement 'scheme-indent-function 3)) |
1d40e6fd | 151 | (eval . (put 'call-with-retrying-transaction 'scheme-indent-function 1)) |
37545de4 | 152 | (eval . (put 'call-with-savepoint 'scheme-indent-function 1)) |
8971f626 | 153 | (eval . (put 'call-with-retrying-savepoint 'scheme-indent-function 1)) |
7f9d184d | 154 | |
c1f6a0c2 DT |
155 | (eval . (put 'call-with-container 'scheme-indent-function 1)) |
156 | (eval . (put 'container-excursion 'scheme-indent-function 1)) | |
1563d6c7 | 157 | (eval . (put 'eventually 'scheme-indent-function 1)) |
c1f6a0c2 | 158 | |
1fafa2f5 | 159 | (eval . (put 'call-with-progress-reporter 'scheme-indent-function 1)) |
43badf26 | 160 | (eval . (put 'with-repository 'scheme-indent-function 2)) |
873f6f13 | 161 | (eval . (put 'with-temporary-git-repository 'scheme-indent-function 2)) |
c83eedba LC |
162 | (eval . (put 'with-environment-variables 'scheme-indent-function 1)) |
163 | (eval . (put 'with-fresh-gnupg-setup 'scheme-indent-function 1)) | |
1fafa2f5 | 164 | |
c39693d7 LC |
165 | (eval . (put 'with-paginated-output-port 'scheme-indent-function 1)) |
166 | ||
6b9bebbb MC |
167 | (eval . (put 'with-shepherd-action 'scheme-indent-function 3)) |
168 | ||
049aefdd LC |
169 | (eval . (put 'with-http-server 'scheme-indent-function 1)) |
170 | ||
667b2508 LC |
171 | ;; This notably allows '(' in Paredit to not insert a space when the |
172 | ;; preceding symbol is one of these. | |
21b679f6 | 173 | (eval . (modify-syntax-entry ?~ "'")) |
667b2508 | 174 | (eval . (modify-syntax-entry ?$ "'")) |
c9fb789f MC |
175 | (eval . (modify-syntax-entry ?+ "'")) |
176 | ||
177 | ;; Emacs 28 changed the behavior of 'lisp-fill-paragraph', which causes the | |
178 | ;; first line of package descriptions to extrude past 'fill-column', and | |
179 | ;; somehow that is deemed more correct upstream (see: | |
180 | ;; https://issues.guix.gnu.org/56197). | |
181 | (eval . (progn | |
182 | (require 'lisp-mode) | |
183 | (defun emacs27-lisp-fill-paragraph (&optional justify) | |
184 | (interactive "P") | |
185 | (or (fill-comment-paragraph justify) | |
186 | (let ((paragraph-start | |
187 | (concat paragraph-start | |
188 | "\\|\\s-*\\([(;\"]\\|\\s-:\\|`(\\|#'(\\)")) | |
189 | (paragraph-separate | |
190 | (concat paragraph-separate "\\|\\s-*\".*[,\\.]$")) | |
191 | (fill-column (if (and (integerp emacs-lisp-docstring-fill-column) | |
192 | (derived-mode-p 'emacs-lisp-mode)) | |
193 | emacs-lisp-docstring-fill-column | |
194 | fill-column))) | |
195 | (fill-paragraph justify)) | |
196 | ;; Never return nil. | |
197 | t)) | |
198 | (setq-local fill-paragraph-function #'emacs27-lisp-fill-paragraph))))) | |
199 | ||
1722d680 LC |
200 | (emacs-lisp-mode . ((indent-tabs-mode . nil))) |
201 | (texinfo-mode . ((indent-tabs-mode . nil) | |
202 | (fill-column . 72)))) |