| 1 | ;; Per-directory local variables for GNU Emacs 23 and later. |
| 2 | |
| 3 | ((nil |
| 4 | . ((fill-column . 78) |
| 5 | (tab-width . 8) |
| 6 | (sentence-end-double-space . t) |
| 7 | |
| 8 | ;; For use with 'bug-reference-prog-mode'. |
| 9 | (bug-reference-url-format . "http://bugs.gnu.org/%s") |
| 10 | (bug-reference-bug-regexp |
| 11 | . "<https?://\\(debbugs\\|bugs\\)\\.gnu\\.org/\\([0-9]+\\)>") |
| 12 | |
| 13 | ;; Emacs-Guix |
| 14 | (eval . (setq-local guix-directory |
| 15 | (locate-dominating-file default-directory |
| 16 | ".dir-locals.el"))) |
| 17 | |
| 18 | ;; Geiser |
| 19 | ;; This allows automatically setting the `geiser-guile-load-path' |
| 20 | ;; variable when using various Guix checkouts (e.g., via git worktrees). |
| 21 | (eval . (let ((root-dir-unexpanded (locate-dominating-file |
| 22 | default-directory ".dir-locals.el"))) |
| 23 | ;; While Guix should in theory always have a .dir-locals.el |
| 24 | ;; (we are reading this file, after all) there seems to be a |
| 25 | ;; strange problem where this code "escapes" to some other buffers, |
| 26 | ;; at least vc-mode. See: |
| 27 | ;; https://lists.gnu.org/archive/html/guix-devel/2020-11/msg00296.html |
| 28 | ;; Upstream report: <https://bugs.gnu.org/44698> |
| 29 | ;; Hence the following "when", which might otherwise be unnecessary; |
| 30 | ;; it prevents causing an error when root-dir-unexpanded is nil. |
| 31 | (when root-dir-unexpanded |
| 32 | (let* ((root-dir (expand-file-name root-dir-unexpanded)) |
| 33 | ;; Workaround for bug https://issues.guix.gnu.org/43818. |
| 34 | (root-dir* (directory-file-name root-dir))) |
| 35 | |
| 36 | (unless (boundp 'geiser-guile-load-path) |
| 37 | (defvar geiser-guile-load-path '())) |
| 38 | (make-local-variable 'geiser-guile-load-path) |
| 39 | (require 'cl-lib) |
| 40 | (cl-pushnew root-dir* geiser-guile-load-path |
| 41 | :test #'string-equal))))))) |
| 42 | |
| 43 | (c-mode . ((c-file-style . "gnu"))) |
| 44 | (scheme-mode |
| 45 | . |
| 46 | ((indent-tabs-mode . nil) |
| 47 | (eval . (put 'eval-when 'scheme-indent-function 1)) |
| 48 | (eval . (put 'call-with-prompt 'scheme-indent-function 1)) |
| 49 | (eval . (put 'test-assert 'scheme-indent-function 1)) |
| 50 | (eval . (put 'test-assertm 'scheme-indent-function 1)) |
| 51 | (eval . (put 'test-equalm 'scheme-indent-function 1)) |
| 52 | (eval . (put 'test-equal 'scheme-indent-function 1)) |
| 53 | (eval . (put 'test-eq 'scheme-indent-function 1)) |
| 54 | (eval . (put 'call-with-input-string 'scheme-indent-function 1)) |
| 55 | (eval . (put 'guard 'scheme-indent-function 1)) |
| 56 | (eval . (put 'lambda* 'scheme-indent-function 1)) |
| 57 | (eval . (put 'substitute* 'scheme-indent-function 1)) |
| 58 | (eval . (put 'match-record 'scheme-indent-function 2)) |
| 59 | |
| 60 | ;; 'modify-phases' and its keywords. |
| 61 | (eval . (put 'modify-phases 'scheme-indent-function 1)) |
| 62 | (eval . (put 'replace 'scheme-indent-function 1)) |
| 63 | (eval . (put 'add-before 'scheme-indent-function 2)) |
| 64 | (eval . (put 'add-after 'scheme-indent-function 2)) |
| 65 | |
| 66 | (eval . (put 'modify-services 'scheme-indent-function 1)) |
| 67 | (eval . (put 'with-directory-excursion 'scheme-indent-function 1)) |
| 68 | (eval . (put 'with-file-lock 'scheme-indent-function 1)) |
| 69 | (eval . (put 'with-file-lock/no-wait 'scheme-indent-function 1)) |
| 70 | (eval . (put 'with-profile-lock 'scheme-indent-function 1)) |
| 71 | (eval . (put 'with-writable-file 'scheme-indent-function 2)) |
| 72 | |
| 73 | (eval . (put 'package 'scheme-indent-function 0)) |
| 74 | (eval . (put 'package/inherit 'scheme-indent-function 1)) |
| 75 | (eval . (put 'origin 'scheme-indent-function 0)) |
| 76 | (eval . (put 'build-system 'scheme-indent-function 0)) |
| 77 | (eval . (put 'bag 'scheme-indent-function 0)) |
| 78 | (eval . (put 'graft 'scheme-indent-function 0)) |
| 79 | (eval . (put 'operating-system 'scheme-indent-function 0)) |
| 80 | (eval . (put 'file-system 'scheme-indent-function 0)) |
| 81 | (eval . (put 'manifest-entry 'scheme-indent-function 0)) |
| 82 | (eval . (put 'manifest-pattern 'scheme-indent-function 0)) |
| 83 | (eval . (put 'substitute-keyword-arguments 'scheme-indent-function 1)) |
| 84 | (eval . (put 'with-store 'scheme-indent-function 1)) |
| 85 | (eval . (put 'with-external-store 'scheme-indent-function 1)) |
| 86 | (eval . (put 'with-error-handling 'scheme-indent-function 0)) |
| 87 | (eval . (put 'with-mutex 'scheme-indent-function 1)) |
| 88 | (eval . (put 'with-atomic-file-output 'scheme-indent-function 1)) |
| 89 | (eval . (put 'call-with-compressed-output-port 'scheme-indent-function 2)) |
| 90 | (eval . (put 'call-with-decompressed-port 'scheme-indent-function 2)) |
| 91 | (eval . (put 'call-with-gzip-input-port 'scheme-indent-function 1)) |
| 92 | (eval . (put 'call-with-gzip-output-port 'scheme-indent-function 1)) |
| 93 | (eval . (put 'call-with-lzip-input-port 'scheme-indent-function 1)) |
| 94 | (eval . (put 'call-with-lzip-output-port 'scheme-indent-function 1)) |
| 95 | (eval . (put 'signature-case 'scheme-indent-function 1)) |
| 96 | (eval . (put 'emacs-batch-eval 'scheme-indent-function 0)) |
| 97 | (eval . (put 'emacs-batch-edit-file 'scheme-indent-function 1)) |
| 98 | (eval . (put 'emacs-substitute-sexps 'scheme-indent-function 1)) |
| 99 | (eval . (put 'emacs-substitute-variables 'scheme-indent-function 1)) |
| 100 | (eval . (put 'with-derivation-narinfo 'scheme-indent-function 1)) |
| 101 | (eval . (put 'with-derivation-substitute 'scheme-indent-function 2)) |
| 102 | (eval . (put 'with-status-report 'scheme-indent-function 1)) |
| 103 | (eval . (put 'with-status-verbosity 'scheme-indent-function 1)) |
| 104 | (eval . (put 'with-build-handler 'scheme-indent-function 1)) |
| 105 | |
| 106 | (eval . (put 'mlambda 'scheme-indent-function 1)) |
| 107 | (eval . (put 'mlambdaq 'scheme-indent-function 1)) |
| 108 | (eval . (put 'syntax-parameterize 'scheme-indent-function 1)) |
| 109 | (eval . (put 'with-monad 'scheme-indent-function 1)) |
| 110 | (eval . (put 'mbegin 'scheme-indent-function 1)) |
| 111 | (eval . (put 'mwhen 'scheme-indent-function 1)) |
| 112 | (eval . (put 'munless 'scheme-indent-function 1)) |
| 113 | (eval . (put 'mlet* 'scheme-indent-function 2)) |
| 114 | (eval . (put 'mlet 'scheme-indent-function 2)) |
| 115 | (eval . (put 'run-with-store 'scheme-indent-function 1)) |
| 116 | (eval . (put 'run-with-state 'scheme-indent-function 1)) |
| 117 | (eval . (put 'wrap-program 'scheme-indent-function 1)) |
| 118 | (eval . (put 'with-imported-modules 'scheme-indent-function 1)) |
| 119 | (eval . (put 'with-extensions 'scheme-indent-function 1)) |
| 120 | (eval . (put 'with-parameters 'scheme-indent-function 1)) |
| 121 | (eval . (put 'let-system 'scheme-indent-function 1)) |
| 122 | |
| 123 | (eval . (put 'with-database 'scheme-indent-function 2)) |
| 124 | (eval . (put 'call-with-database 'scheme-indent-function 1)) |
| 125 | (eval . (put 'call-with-transaction 'scheme-indent-function 1)) |
| 126 | (eval . (put 'with-statement 'scheme-indent-function 3)) |
| 127 | (eval . (put 'call-with-retrying-transaction 'scheme-indent-function 1)) |
| 128 | (eval . (put 'call-with-savepoint 'scheme-indent-function 1)) |
| 129 | (eval . (put 'call-with-retrying-savepoint 'scheme-indent-function 1)) |
| 130 | |
| 131 | (eval . (put 'call-with-container 'scheme-indent-function 1)) |
| 132 | (eval . (put 'container-excursion 'scheme-indent-function 1)) |
| 133 | (eval . (put 'eventually 'scheme-indent-function 1)) |
| 134 | |
| 135 | (eval . (put 'call-with-progress-reporter 'scheme-indent-function 1)) |
| 136 | (eval . (put 'with-repository 'scheme-indent-function 2)) |
| 137 | (eval . (put 'with-temporary-git-repository 'scheme-indent-function 2)) |
| 138 | (eval . (put 'with-environment-variables 'scheme-indent-function 1)) |
| 139 | (eval . (put 'with-fresh-gnupg-setup 'scheme-indent-function 1)) |
| 140 | |
| 141 | (eval . (put 'with-paginated-output-port 'scheme-indent-function 1)) |
| 142 | |
| 143 | ;; This notably allows '(' in Paredit to not insert a space when the |
| 144 | ;; preceding symbol is one of these. |
| 145 | (eval . (modify-syntax-entry ?~ "'")) |
| 146 | (eval . (modify-syntax-entry ?$ "'")) |
| 147 | (eval . (modify-syntax-entry ?+ "'")))) |
| 148 | (emacs-lisp-mode . ((indent-tabs-mode . nil))) |
| 149 | (texinfo-mode . ((indent-tabs-mode . nil) |
| 150 | (fill-column . 72)))) |