.dir-locals.el (9136B)
1 ;;; Directory Local Variables -*- no-byte-compile: t -*- 2 ;;; For more information see (info "(emacs) Directory Variables") 3 4 ((emacs-lisp-mode . ((indent-tabs-mode . nil))) 5 (nil 6 . ((fill-column . 78) 7 (tab-width . 8) 8 (sentence-end-double-space . t) 9 10 ;; For use with 'bug-reference-prog-mode'. Extra bug-reference 11 ;; configuration should be done in your Emacs user configuration file; 12 ;; refer to (info (guix) The Perfect Setup). 13 (bug-reference-bug-regexp 14 . "\\(<https?://\\bugs\\.gnu\\.org/\\([0-9]+\\)>\\)") 15 (bug-reference-url-format . "https://issues.guix.gnu.org/%s") 16 17 (eval . (add-to-list 'completion-ignored-extensions ".go")) 18 19 ;; Emacs-Guix 20 (eval . (setq-local guix-directory 21 (locate-dominating-file default-directory 22 ".dir-locals.el"))) 23 24 ;; YASnippet 25 (eval . (with-eval-after-load 26 'yasnippet 27 (let ((guix-yasnippets 28 (expand-file-name 29 "etc/snippets/yas" 30 (locate-dominating-file default-directory 31 ".dir-locals.el")))) 32 (unless (member guix-yasnippets yas-snippet-dirs) 33 (add-to-list 'yas-snippet-dirs guix-yasnippets) 34 (yas-reload-all))))) 35 36 ;; Geiser 37 ;; This allows automatically setting the `geiser-guile-load-path' 38 ;; variable when using various Guix checkouts (e.g., via git worktrees). 39 (geiser-repl-per-project-p . t))) 40 (scheme-mode 41 . 42 ((indent-tabs-mode . nil) 43 (eval . (put 'eval-when 'scheme-indent-function 1)) 44 (eval . (put 'call-with-prompt 'scheme-indent-function 1)) 45 (eval . (put 'test-assert 'scheme-indent-function 1)) 46 (eval . (put 'test-assertm 'scheme-indent-function 1)) 47 (eval . (put 'test-equalm 'scheme-indent-function 1)) 48 (eval . (put 'test-equal 'scheme-indent-function 1)) 49 (eval . (put 'test-eq 'scheme-indent-function 1)) 50 (eval . (put 'call-with-input-string 'scheme-indent-function 1)) 51 (eval . (put 'call-with-port 'scheme-indent-function 1)) 52 (eval . (put 'guard 'scheme-indent-function 1)) 53 (eval . (put 'lambda* 'scheme-indent-function 1)) 54 (eval . (put 'substitute* 'scheme-indent-function 1)) 55 (eval . (put 'match-record 'scheme-indent-function 3)) 56 (eval . (put 'match-record-lambda 'scheme-indent-function 2)) 57 58 ;; TODO: Contribute these to Emacs' scheme-mode. 59 (eval . (put 'let-keywords 'scheme-indent-function 3)) 60 61 ;; 'modify-inputs' and its keywords. 62 (eval . (put 'modify-inputs 'scheme-indent-function 1)) 63 (eval . (put 'replace 'scheme-indent-function 1)) 64 65 ;; 'modify-phases' and its keywords. 66 (eval . (put 'modify-phases 'scheme-indent-function 1)) 67 (eval . (put 'replace 'scheme-indent-function 1)) 68 (eval . (put 'add-before 'scheme-indent-function 2)) 69 (eval . (put 'add-after 'scheme-indent-function 2)) 70 71 (eval . (put 'modify-services 'scheme-indent-function 1)) 72 (eval . (put 'with-directory-excursion 'scheme-indent-function 1)) 73 (eval . (put 'with-file-lock 'scheme-indent-function 1)) 74 (eval . (put 'with-file-lock/no-wait 'scheme-indent-function 1)) 75 (eval . (put 'with-profile-lock 'scheme-indent-function 1)) 76 (eval . (put 'with-writable-file 'scheme-indent-function 2)) 77 78 (eval . (put 'package 'scheme-indent-function 0)) 79 (eval . (put 'package/inherit 'scheme-indent-function 1)) 80 (eval . (put 'origin 'scheme-indent-function 0)) 81 (eval . (put 'build-system 'scheme-indent-function 0)) 82 (eval . (put 'bag 'scheme-indent-function 0)) 83 (eval . (put 'graft 'scheme-indent-function 0)) 84 (eval . (put 'operating-system 'scheme-indent-function 0)) 85 (eval . (put 'file-system 'scheme-indent-function 0)) 86 (eval . (put 'swap-space 'scheme-indent-function 0)) 87 (eval . (put 'manifest-entry 'scheme-indent-function 0)) 88 (eval . (put 'manifest-pattern 'scheme-indent-function 0)) 89 (eval . (put 'substitute-keyword-arguments 'scheme-indent-function 1)) 90 (eval . (put 'with-store 'scheme-indent-function 1)) 91 (eval . (put 'with-store/non-blocking 'scheme-indent-function 1)) 92 (eval . (put 'with-external-store 'scheme-indent-function 1)) 93 (eval . (put 'with-error-handling 'scheme-indent-function 0)) 94 (eval . (put 'with-mutex 'scheme-indent-function 1)) 95 (eval . (put 'with-atomic-file-output 'scheme-indent-function 1)) 96 (eval . (put 'call-with-compressed-output-port 'scheme-indent-function 2)) 97 (eval . (put 'call-with-decompressed-port 'scheme-indent-function 2)) 98 (eval . (put 'call-with-gzip-input-port 'scheme-indent-function 1)) 99 (eval . (put 'call-with-gzip-output-port 'scheme-indent-function 1)) 100 (eval . (put 'call-with-lzip-input-port 'scheme-indent-function 1)) 101 (eval . (put 'call-with-lzip-output-port 'scheme-indent-function 1)) 102 (eval . (put 'signature-case 'scheme-indent-function 1)) 103 (eval . (put 'emacs-batch-eval 'scheme-indent-function 0)) 104 (eval . (put 'emacs-batch-edit-file 'scheme-indent-function 1)) 105 (eval . (put 'emacs-substitute-sexps 'scheme-indent-function 1)) 106 (eval . (put 'emacs-substitute-variables 'scheme-indent-function 1)) 107 (eval . (put 'with-derivation-narinfo 'scheme-indent-function 1)) 108 (eval . (put 'with-derivation-substitute 'scheme-indent-function 2)) 109 (eval . (put 'with-status-report 'scheme-indent-function 1)) 110 (eval . (put 'with-status-verbosity 'scheme-indent-function 1)) 111 (eval . (put 'with-build-handler 'scheme-indent-function 1)) 112 113 (eval . (put 'mlambda 'scheme-indent-function 1)) 114 (eval . (put 'mlambdaq 'scheme-indent-function 1)) 115 (eval . (put 'syntax-parameterize 'scheme-indent-function 1)) 116 (eval . (put 'with-monad 'scheme-indent-function 1)) 117 (eval . (put 'mbegin 'scheme-indent-function 1)) 118 (eval . (put 'mwhen 'scheme-indent-function 1)) 119 (eval . (put 'munless 'scheme-indent-function 1)) 120 (eval . (put 'mlet* 'scheme-indent-function 2)) 121 (eval . (put 'mlet 'scheme-indent-function 2)) 122 (eval . (put 'mparameterize 'scheme-indent-function 2)) 123 (eval . (put 'run-with-store 'scheme-indent-function 1)) 124 (eval . (put 'run-with-state 'scheme-indent-function 1)) 125 (eval . (put 'wrap-program 'scheme-indent-function 1)) 126 (eval . (put 'wrap-script 'scheme-indent-function 1)) 127 (eval . (put 'with-imported-modules 'scheme-indent-function 1)) 128 (eval . (put 'with-extensions 'scheme-indent-function 1)) 129 (eval . (put 'with-parameters 'scheme-indent-function 1)) 130 (eval . (put 'let-system 'scheme-indent-function 1)) 131 (eval . (put 'with-build-variables 'scheme-indent-function 2)) 132 133 (eval . (put 'with-database 'scheme-indent-function 2)) 134 (eval . (put 'call-with-database 'scheme-indent-function 1)) 135 (eval . (put 'call-with-transaction 'scheme-indent-function 1)) 136 (eval . (put 'call-with-retrying-transaction 'scheme-indent-function 1)) 137 138 (eval . (put 'call-with-container 'scheme-indent-function 1)) 139 (eval . (put 'container-excursion 'scheme-indent-function 1)) 140 (eval . (put 'eventually 'scheme-indent-function 1)) 141 142 (eval . (put 'call-with-progress-reporter 'scheme-indent-function 1)) 143 (eval . (put 'with-repository 'scheme-indent-function 2)) 144 (eval . (put 'with-temporary-git-repository 'scheme-indent-function 2)) 145 (eval . (put 'with-environment-variables 'scheme-indent-function 1)) 146 (eval . (put 'with-fresh-gnupg-setup 'scheme-indent-function 1)) 147 148 (eval . (put 'with-paginated-output-port 'scheme-indent-function 1)) 149 150 (eval . (put 'with-shepherd-action 'scheme-indent-function 3)) 151 152 (eval . (put 'with-http-server 'scheme-indent-function 1)) 153 154 ;; This notably allows '(' in Paredit to not insert a space when the 155 ;; preceding symbol is one of these. 156 (eval . (modify-syntax-entry ?~ "'")) 157 (eval . (modify-syntax-entry ?$ "'")) 158 (eval . (modify-syntax-entry ?+ "'")) 159 160 ;; Emacs 28 changed the behavior of 'lisp-fill-paragraph', which causes the 161 ;; first line of package descriptions to extrude past 'fill-column', and 162 ;; somehow that is deemed more correct upstream (see: 163 ;; https://issues.guix.gnu.org/56197). 164 (eval . (progn 165 (require 'lisp-mode) 166 (defun emacs27-lisp-fill-paragraph (&optional justify) 167 (interactive "P") 168 (or (fill-comment-paragraph justify) 169 (let ((paragraph-start 170 (concat paragraph-start 171 "\\|\\s-*\\([(;\"]\\|\\s-:\\|`(\\|#'(\\)")) 172 (paragraph-separate 173 (concat paragraph-separate "\\|\\s-*\".*[,\\.]$")) 174 (fill-column (if (and (integerp emacs-lisp-docstring-fill-column) 175 (derived-mode-p 'emacs-lisp-mode)) 176 emacs-lisp-docstring-fill-column 177 fill-column))) 178 (fill-paragraph justify)) 179 ;; Never return nil. 180 t)) 181 (setq-local fill-paragraph-function #'emacs27-lisp-fill-paragraph))))))