diff options
| author | Maxim Cournoyer <maxim@guixotic.coop> | 2026-01-27 11:06:39 +0900 |
|---|---|---|
| committer | Maxim Cournoyer <maxim@guixotic.coop> | 2026-01-27 11:09:09 +0900 |
| commit | 476e0818c15f538297af724443e25faa77b08022 (patch) | |
| tree | 44b82866acc89473d72f3a2939d52a9b7b76d7ba | |
| parent | 42fe5b361cefb0b4cbf00acf046a06a85cb9b4d6 (diff) | |
Revert "maint: Clean-up .dir-locals.el a bit."
This reverts commit 54b535648886da6e5edbce042682b4e0c0999820.
The supporting `lisp-fill-paragraphs-as-doc-string' variable in Emacs hasn't
been released yet. To check, run this in an Emacs git checkout:
git branch --contains 192355e54af91ad6e7d1343071a749e1ced29400
Change-Id: I3fc23ceb7bc22876d7d3a51a1e55c6965c45699f
| -rw-r--r-- | .dir-locals.el | 24 |
1 files changed, 21 insertions, 3 deletions
diff --git a/.dir-locals.el b/.dir-locals.el index 4bd0d97cb33..c198d1a6317 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -98,9 +98,27 @@ ((indent-tabs-mode . nil) ;; Emacs 28 changed the behavior of 'lisp-fill-paragraph', which causes the - ;; first line of package descriptions to extrude past 'fill-column'. The - ;; following variable reverts its behavior to the previous one. - (lisp-fill-paragraphs-as-doc-string nil) + ;; 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))) ;; This notably allows '(' in Paredit to not insert a space when the ;; preceding symbol is one of these. |
