From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: Smie-auto-fill =?utf-8?Q?doesn=E2=80=99t?= respect comment-auto-fill-only-comments Date: Sun, 21 May 2017 17:03:57 -0400 Message-ID: References: <87o9vdj0s5.fsf@tromey.com> <87mvavw0h5.fsf@pokyo> <87r2zidut2.fsf@bapiya> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: blaine.gmane.org 1495400695 28090 195.159.176.226 (21 May 2017 21:04:55 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 21 May 2017 21:04:55 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.0.50 (gnu/linux) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun May 21 23:04:52 2017 Return-path: Envelope-to: ged-emacs-devel@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 1dCY1z-0007Ba-Jq for ged-emacs-devel@m.gmane.org; Sun, 21 May 2017 23:04:51 +0200 Original-Received: from localhost ([::1]:39298 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCY25-00007i-B7 for ged-emacs-devel@m.gmane.org; Sun, 21 May 2017 17:04:57 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:41530) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dCY1M-0008H8-RD for emacs-devel@gnu.org; Sun, 21 May 2017 17:04:13 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dCY1H-0005G8-VE for emacs-devel@gnu.org; Sun, 21 May 2017 17:04:12 -0400 Original-Received: from [195.159.176.226] (port=45288 helo=blaine.gmane.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dCY1H-0005F0-Nx for emacs-devel@gnu.org; Sun, 21 May 2017 17:04:07 -0400 Original-Received: from list by blaine.gmane.org with local (Exim 4.84_2) (envelope-from ) id 1dCY17-00069y-HD for emacs-devel@gnu.org; Sun, 21 May 2017 23:03:57 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 18 Original-X-Complaints-To: usenet@blaine.gmane.org Cancel-Lock: sha1:Ra9Ig/EzLVFj+saHrd0MlAZqm1M= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 195.159.176.226 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:215070 Archived-At: > +(defun internal-auto-fill () > + "The function called by `self-insert-command' to perform auto-filling." > + (when (or (not comment-auto-fill-only-comments) > + (nth 4 (syntax-ppss))) > + (do-auto-fill))) Please check also comment-start, since you don't want to check (syntax-ppss) if there's no comment-start defined. Well, technically, it shouldn't make any difference, but it's the way it's been defined so far, so it makes sense to preserve it. The patch looks good, but please also remove the comment-auto-fill-only-comments handling from newcomment.el [ BTW, yes, not only I feel silly about this name now, but I already felt silly about it when I came up with it. ] Stefan