guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Broken lisp-fill-paragraph post Emacs 28 update


From: Maxim Cournoyer
Subject: Broken lisp-fill-paragraph post Emacs 28 update
Date: Fri, 08 Jul 2022 22:52:15 -0400

Hi,

If you too have been wondering why hitting M-q on package descriptions
doesn't produce the intended effect anymore (the first line of text
protrudes beyond the fill-column value), this may be of interest.

The problem was introduced in commit 9bf367e1848, which aimed to improve
the handling of Elisp docstrings.  To revert to the old version (the one
that shipped with Emacs 27), you can put this in your .emacs:

--8<---------------cut here---------------start------------->8---
(require 'lisp-mode)
(defun 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))
--8<---------------cut here---------------end--------------->8---

For more details, you can refer to the (now closed) upstream bug report
here [0].

[0]  https://issues.guix.gnu.org/56197

Happy hacking!

Maxim



reply via email to

[Prev in Thread] Current Thread [Next in Thread]