unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Broken lisp-fill-paragraph post Emacs 28 update
@ 2022-07-09  2:52 Maxim Cournoyer
  2022-07-09  6:53 ` Ricardo Wurmus
  0 siblings, 1 reply; 3+ messages in thread
From: Maxim Cournoyer @ 2022-07-09  2:52 UTC (permalink / raw)
  To: guix-devel; +Cc: Ricardo Wurmus

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-07-10  5:08 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-09  2:52 Broken lisp-fill-paragraph post Emacs 28 update Maxim Cournoyer
2022-07-09  6:53 ` Ricardo Wurmus
2022-07-10  5:08   ` Maxim Cournoyer

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).