From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Phil Sainty Newsgroups: gmane.emacs.bugs Subject: bug#28863: 26.0.90; [PATCH] Don't clobber docstrings of explicitly-defined mode hook variables Date: Sun, 22 Oct 2017 15:51:29 +1300 Message-ID: <05578489-27b2-e4ea-ba2f-ec0620fc4003@orcon.net.nz> References: <0e9fedfc-ee21-3c9b-2455-17ae5f128d7f@orcon.net.nz> <874lqsdryr.fsf@users.sourceforge.net> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1508640745 27205 195.159.176.226 (22 Oct 2017 02:52:25 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 22 Oct 2017 02:52:25 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 Cc: 28863@debbugs.gnu.org To: Noam Postavsky Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Oct 22 04:52:20 2017 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 1e66Mx-0004Sf-7C for geb-bug-gnu-emacs@m.gmane.org; Sun, 22 Oct 2017 04:52:07 +0200 Original-Received: from localhost ([::1]:59883 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e66N1-00062e-Dx for geb-bug-gnu-emacs@m.gmane.org; Sat, 21 Oct 2017 22:52:11 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:51625) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1e66Mv-00062M-SU for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2017 22:52:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1e66Ms-0007YF-OE for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2017 22:52:05 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:46137) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1e66Ms-0007Xq-Jv for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2017 22:52:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1e66Ms-0004Gk-AB for bug-gnu-emacs@gnu.org; Sat, 21 Oct 2017 22:52:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Phil Sainty Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 22 Oct 2017 02:52:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 28863 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 28863-submit@debbugs.gnu.org id=B28863.150864069616374 (code B ref 28863); Sun, 22 Oct 2017 02:52:02 +0000 Original-Received: (at 28863) by debbugs.gnu.org; 22 Oct 2017 02:51:36 +0000 Original-Received: from localhost ([127.0.0.1]:54818 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e66MR-0004G2-TZ for submit@debbugs.gnu.org; Sat, 21 Oct 2017 22:51:36 -0400 Original-Received: from smtp-1.orcon.net.nz ([60.234.4.34]:54529) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1e66MP-0004Ft-Mw for 28863@debbugs.gnu.org; Sat, 21 Oct 2017 22:51:34 -0400 Original-Received: from [150.107.172.27] (port=10403 helo=[192.168.20.102]) by smtp-1.orcon.net.nz with esmtpa (Exim 4.86_2) (envelope-from ) id 1e66MM-0005Od-6i; Sun, 22 Oct 2017 15:51:30 +1300 In-Reply-To: <874lqsdryr.fsf@users.sourceforge.net> Content-Language: en-GB X-GeoIP: NZ X-Spam_score: -2.9 X-Spam_score_int: -28 X-Spam_bar: -- 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:138834 Archived-At: On 22/10/17 12:03, Noam Postavsky wrote: > Giving a default value to a hook variable is problematic, because if > the user has (add-hook 'foo-mode-hook 'some-other-fun) then they lose > the default-value if foo-mode.el wasn't loaded yet. Yes indeed; but there are certainly examples of this pattern in use. I'll follow up separately about this, but I don't it has any direct bearing on this patch. > Seems fine to me. > My only nitpick is that you seem to be adding tab-indented lines. Yes, that seemed consistent with the existing sources (or at least there was a mixture of tabs vs spaces, as I recall). ...and I now see that repository's .dir-locals.el sets indent-tabs-mode to nil for emacs-lisp-mode. I didn't realise that had happened. (Has a read of bug #20323.) I'll remember this in future. If no one objects to this being committed, then let's just untabify the changes and amend the commit before pushing. -Phil