From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: add-hook and defvar Date: Thu, 5 Mar 2015 18:45:23 -0300 Message-ID: References: Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1425591964 10608 80.91.229.3 (5 Mar 2015 21:46:04 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 5 Mar 2015 21:46:04 +0000 (UTC) Cc: Stefan Monnier , emacs-devel To: Philipp Stephani Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 05 22:46:03 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1YTdag-0002py-EK for ged-emacs-devel@m.gmane.org; Thu, 05 Mar 2015 22:45:58 +0100 Original-Received: from localhost ([::1]:55088 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTdaf-0007fF-VY for ged-emacs-devel@m.gmane.org; Thu, 05 Mar 2015 16:45:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:54890) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTdaA-0007X5-5f for emacs-devel@gnu.org; Thu, 05 Mar 2015 16:45:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YTda8-0008C9-IH for emacs-devel@gnu.org; Thu, 05 Mar 2015 16:45:26 -0500 Original-Received: from mail-la0-x236.google.com ([2a00:1450:4010:c03::236]:40029) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YTda8-0008Bl-BV for emacs-devel@gnu.org; Thu, 05 Mar 2015 16:45:24 -0500 Original-Received: by labgm9 with SMTP id gm9so14391856lab.7 for ; Thu, 05 Mar 2015 13:45:23 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=YVTTs+6AgUheJ0PWlVp55yHknc3SUAvDRNB9oubSdUU=; b=gptYflcRkkQjutic8i37gmipGyreTmDUd8km7otqvNcHyHN5wa0MQDeLxQqIg857Us 0YZ5ICcntcBMNeyIlgx52T0qG9vsVgEe8AzzkaLp9/zjnvLaQUj3hfszpPj9yj15sFt8 +oQsdo7ppv/d0IUyKN2mca+PxdRv57lR+UlyBNdnNtkhX+6QcYilbuwlIzrjCKCht80Z qPqKIwRCp7K/ThEYXNhimfxSd/zG+KHe5kieMH321TVk9ioIOpBd53I98SRRj8vWwg3J MkSGF1JoINhuaH0ZxMtHMyRLLQcaidoYYpwgVpNoFtZyvP0gjBrtr/v/FFbMHVcGx8mo VEKg== X-Received: by 10.112.36.69 with SMTP id o5mr10048248lbj.59.1425591923387; Thu, 05 Mar 2015 13:45:23 -0800 (PST) Original-Received: by 10.112.207.225 with HTTP; Thu, 5 Mar 2015 13:45:23 -0800 (PST) In-Reply-To: X-Google-Sender-Auth: _iJGNhbjoMS1vwGsdZhgiwPtFrY X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::236 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 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-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:183683 Archived-At: This should probably do the same if the variable name ends with "-functions" (since IIUC that's the correct way of naming a hook where the functions should take arguments). 2015-03-05 17:28 GMT-03:00 Philipp Stephani : > > > Stefan Monnier schrieb am Mi., 25. Feb. 2015 um > 03:56 Uhr: > >> > Is this something the byte compiler could warn about? At least normal >> > hooks >> > by convention end in "-hook", so a warning could be emitted every time >> > such >> > a variable is defined that doesn't have nil as default. >> >> Yes, we could do that. Patch welcome, >> >> > > Added a patch.