mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2026-04-06 21:20:33 +02:00
Revert "maint: Clean-up .dir-locals.el a bit."
This reverts commit 54b5356488.
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
This commit is contained in:
@@ -98,9 +98,27 @@
|
|||||||
((indent-tabs-mode . nil)
|
((indent-tabs-mode . nil)
|
||||||
|
|
||||||
;; Emacs 28 changed the behavior of 'lisp-fill-paragraph', which causes the
|
;; Emacs 28 changed the behavior of 'lisp-fill-paragraph', which causes the
|
||||||
;; first line of package descriptions to extrude past 'fill-column'. The
|
;; first line of package descriptions to extrude past 'fill-column', and
|
||||||
;; following variable reverts its behavior to the previous one.
|
;; somehow that is deemed more correct upstream (see:
|
||||||
(lisp-fill-paragraphs-as-doc-string nil)
|
;; 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
|
;; This notably allows '(' in Paredit to not insert a space when the
|
||||||
;; preceding symbol is one of these.
|
;; preceding symbol is one of these.
|
||||||
|
|||||||
Reference in New Issue
Block a user