From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Noam Postavsky Newsgroups: gmane.emacs.bugs Subject: bug#31656: 26.1; `fill-paragraph' malformats in emacs-lisp-mode Date: Sat, 02 Jun 2018 09:34:21 -0400 Message-ID: <87tvql9usi.fsf@gmail.com> References: <83sh66g8wb.fsf@gnu.org> <87bmcuc0bo.fsf@gmail.com> <83muwefziz.fsf@gnu.org> <878t7yarlq.fsf@gmail.com> <834lilg05w.fsf@gnu.org> <87y3fx9w1t.fsf@gmail.com> <5B129ABE.5040102@gmx.at> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1527946397 4900 195.159.176.226 (2 Jun 2018 13:33:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 2 Jun 2018 13:33:17 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) Cc: 31656@debbugs.gnu.org, stefan@automata.se To: martin rudalics Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sat Jun 02 15:33:13 2018 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fP6ee-00017t-K5 for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Jun 2018 15:33:12 +0200 Original-Received: from localhost ([::1]:59870 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fP6gj-0003ZA-AY for geb-bug-gnu-emacs@m.gmane.org; Sat, 02 Jun 2018 09:35:21 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35855) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fP6gT-0003VG-CJ for bug-gnu-emacs@gnu.org; Sat, 02 Jun 2018 09:35:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fP6gQ-0002gG-94 for bug-gnu-emacs@gnu.org; Sat, 02 Jun 2018 09:35:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50590) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fP6gQ-0002fk-4h for bug-gnu-emacs@gnu.org; Sat, 02 Jun 2018 09:35:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fP6gP-000530-Rv for bug-gnu-emacs@gnu.org; Sat, 02 Jun 2018 09:35:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Noam Postavsky Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 02 Jun 2018 13:35:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 31656 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 31656-submit@debbugs.gnu.org id=B31656.152794647119353 (code B ref 31656); Sat, 02 Jun 2018 13:35:01 +0000 Original-Received: (at 31656) by debbugs.gnu.org; 2 Jun 2018 13:34:31 +0000 Original-Received: from localhost ([127.0.0.1]:58487 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fP6fv-000524-0A for submit@debbugs.gnu.org; Sat, 02 Jun 2018 09:34:31 -0400 Original-Received: from mail-it0-f68.google.com ([209.85.214.68]:34635) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1fP6fs-00051l-Sc for 31656@debbugs.gnu.org; Sat, 02 Jun 2018 09:34:29 -0400 Original-Received: by mail-it0-f68.google.com with SMTP id y127-v6so6289883itd.1 for <31656@debbugs.gnu.org>; Sat, 02 Jun 2018 06:34:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:in-reply-to:references:user-agent:date :message-id:mime-version; bh=4YKX4Hicr2iJwLb5Gltmi8P5nhTghdZhL5BqNHLVWDI=; b=ioGI7t41Uwe1PJvVmRTccUQzHEmmAFEQTfa0S1dOL6+yC62kLDUKyvFhdqkWjjHFNj /+1H8YcDdv6INn/h2uJyjTrl7DF99wfLgEMqG7iFNtIMQKI4Txij+1qHEDpQ443by+FO t7wkEbzdoioiwILgB6NJoNeMaUr6dzPpC+0I5A/P6LsKvZnTJPb9s/HyzGpjA7Z2g0rn k9Z3yvipk63aytMVo2wDeuBg7EDVsJQ135sPLrWB0yxS1yLrUAkuVbKskT/iRuUmsTm9 YfShh8fk+hK2sad9N7h38mjwfVbmomkPrWGQ3UvbvV8MrfjlR1RvX+zH4ZxaH2qbBxdO AOTQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:in-reply-to:references :user-agent:date:message-id:mime-version; bh=4YKX4Hicr2iJwLb5Gltmi8P5nhTghdZhL5BqNHLVWDI=; b=XkWurMC25Kbr4cNut8FElC95pMv00caH9sOjSj8qTTWBt5BoXJlJM+/56sGUHUTtxP uxhwObWCCwvEwZL3/7iXn3KnV2VBUCLHyPrpj2hns/ngyU+j/cOR8SOY+3R1oBMGipYQ Ljl/4mb6bPS/ipr9YDcKWKpUKPugXxTYXzA5Agh8YryEo5uUEY5mUWQtX+1oukz8P4FZ RKK3dWW/IgK0seg7Zml0I56rnJUYRkXn5ZrFF00KkNUVQuvU1eVsTxre9iY5i471QrQO Elvhsx00K/KgLhI2p381HuVb+5Q55rIDMhrEfcGgDO6fO7LUZHxDYDZ1JkHV/AD2PPWa 0czA== X-Gm-Message-State: APt69E3L0W8RkE1HoakcJVC357rdjVaW4tAcd6JsS3AbkWX2JYtaeifd o5kSUeyGbNSLE1mts1BxTCs= X-Google-Smtp-Source: ADUXVKKyoSEidKujsB9hLUE8gkPRvijCyGVJlq9Td1DDk+R4bZUXc1K4MOspM/DifRnBvjQg4Kpedg== X-Received: by 2002:a24:b550:: with SMTP id j16-v6mr7683071iti.87.1527946463332; Sat, 02 Jun 2018 06:34:23 -0700 (PDT) Original-Received: from zebian (cbl-45-2-119-34.yyz.frontiernetworks.ca. [45.2.119.34]) by smtp.googlemail.com with ESMTPSA id p20-v6sm939621itf.4.2018.06.02.06.34.22 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 02 Jun 2018 06:34:22 -0700 (PDT) In-Reply-To: <5B129ABE.5040102@gmx.at> (martin rudalics's message of "Sat, 02 Jun 2018 15:25:18 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:146861 Archived-At: martin rudalics writes: >>> Are there no use cases where we would want M-q outside of syntactic >>> strings? >> >> Okay, I can think of one possibility: if you've pasted a long single >> line consisting of a quoted list of symbols, then M-q could be a >> convenient way of breaking it up into multiple lines. With M-q disabled >> in Lisp code, you would need to copy the data to a temp non-lisp-mode >> buffer in order to do that, so a bit more inconvenient. > > Don't we want to fill comments as well? Yes, we lost a bit of context there; comment filling is taken care of at the top of lisp-fill-paragraph, I wasn't proposing to disable that. (defun lisp-fill-paragraph (&optional justify) [...] (or (fill-comment-paragraph justify) ;; Since fill-comment-paragraph returned nil, that means we're not in ;; a comment: Point is on a program line; we are interested ;; particularly in docstring lines. ;; [...] This setting has the consequence of inhibiting ;; filling many program lines that are not docstrings, which is sensible, ;; because the user probably asked to fill program lines by accident, or ;; expecting indentation (perhaps we should try to do indenting in that ;; case).[...] + (when (nth 3 (syntax-ppss)) ; Only fill inside strings. (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)) + (fill-paragraph justify))) ;; Never return nil. t))