unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Maxim Cournoyer <maxim.cournoyer@gmail.com>
To: guix-devel <guix-devel@gnu.org>
Cc: Ricardo Wurmus <rekado@elephly.net>
Subject: Broken lisp-fill-paragraph post Emacs 28 update
Date: Fri, 08 Jul 2022 22:52:15 -0400	[thread overview]
Message-ID: <87sfnbuheo.fsf@gmail.com> (raw)

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	other threads:[~2022-07-09  2:52 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-09  2:52 Maxim Cournoyer [this message]
2022-07-09  6:53 ` Broken lisp-fill-paragraph post Emacs 28 update Ricardo Wurmus
2022-07-10  5:08   ` Maxim Cournoyer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87sfnbuheo.fsf@gmail.com \
    --to=maxim.cournoyer@gmail.com \
    --cc=guix-devel@gnu.org \
    --cc=rekado@elephly.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).