summary refs log tree commit diff
path: root/.dir-locals.el
diff options
context:
space:
mode:
authorMarius Bakke <marius@gnu.org>2022-07-22 01:09:14 +0200
committerMarius Bakke <marius@gnu.org>2022-07-22 01:09:14 +0200
commit9044b086ddca64a62966a83cbf1b82d32dece89e (patch)
tree2c7f910c9100b2f2a752d07fe0ec44be83fb7600 /.dir-locals.el
parent5dfc6ab1ab292b87ceea144aa661d0e64c834031 (diff)
parentabea091dbef2d44e6eb46bd2413bdf917e14d095 (diff)
downloadguix-9044b086ddca64a62966a83cbf1b82d32dece89e.tar.gz
Merge branch 'staging' into core-updates
Diffstat (limited to '.dir-locals.el')
-rw-r--r--.dir-locals.el28
1 files changed, 27 insertions, 1 deletions
diff --git a/.dir-locals.el b/.dir-locals.el
index da6a44ea08..e4c1da8026 100644
--- a/.dir-locals.el
+++ b/.dir-locals.el
@@ -118,9 +118,11 @@
    (eval . (put 'munless 'scheme-indent-function 1))
    (eval . (put 'mlet* 'scheme-indent-function 2))
    (eval . (put 'mlet 'scheme-indent-function 2))
+   (eval . (put 'mparameterize 'scheme-indent-function 2))
    (eval . (put 'run-with-store 'scheme-indent-function 1))
    (eval . (put 'run-with-state 'scheme-indent-function 1))
    (eval . (put 'wrap-program 'scheme-indent-function 1))
+   (eval . (put 'wrap-script 'scheme-indent-function 1))
    (eval . (put 'with-imported-modules 'scheme-indent-function 1))
    (eval . (put 'with-extensions 'scheme-indent-function 1))
    (eval . (put 'with-parameters 'scheme-indent-function 1))
@@ -155,7 +157,31 @@
    ;; preceding symbol is one of these.
    (eval . (modify-syntax-entry ?~ "'"))
    (eval . (modify-syntax-entry ?$ "'"))
-   (eval . (modify-syntax-entry ?+ "'"))))
+   (eval . (modify-syntax-entry ?+ "'"))
+
+   ;; Emacs 28 changed the behavior of 'lisp-fill-paragraph', which causes the
+   ;; first line of package descriptions to extrude past 'fill-column', and
+   ;; somehow that is deemed more correct upstream (see:
+   ;; https://issues.guix.gnu.org/56197).
+   (eval . (progn
+             (require 'lisp-mode)
+             (defun emacs27-lisp-fill-paragraph (&optional justify)
+               (interactive "P")
+               (or (fill-comment-paragraph justify)
+                   (let ((paragraph-start
+                          (concat paragraph-start
+                                  "\\|\\s-*\\([(;\"]\\|\\s-:\\|`(\\|#'(\\)"))
+                         (paragraph-separate
+                          (concat paragraph-separate "\\|\\s-*\".*[,\\.]$"))
+                         (fill-column (if (and (integerp emacs-lisp-docstring-fill-column)
+                                               (derived-mode-p 'emacs-lisp-mode))
+                                          emacs-lisp-docstring-fill-column
+                                        fill-column)))
+                     (fill-paragraph justify))
+                   ;; Never return nil.
+                   t))
+             (setq-local fill-paragraph-function #'emacs27-lisp-fill-paragraph)))))
+
  (emacs-lisp-mode . ((indent-tabs-mode . nil)))
  (texinfo-mode    . ((indent-tabs-mode . nil)
                      (fill-column . 72))))