From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: John Wiegley Newsgroups: gmane.emacs.devel Subject: Re: New Package for GNU ELPA Date: Fri, 27 May 2016 10:19:09 -0700 Message-ID: References: <8760u045uv.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" X-Trace: ger.gmane.org 1464369585 5054 80.91.229.3 (27 May 2016 17:19:45 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 27 May 2016 17:19:45 +0000 (UTC) Cc: Ian Dunn , emacs-devel@gnu.org To: Kaushal Modi Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri May 27 19:19:39 2016 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 1b6LQ6-0001w7-1e for ged-emacs-devel@m.gmane.org; Fri, 27 May 2016 19:19:34 +0200 Original-Received: from localhost ([::1]:47129 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6LQ5-0006iK-Am for ged-emacs-devel@m.gmane.org; Fri, 27 May 2016 13:19:33 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58502) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6LPz-0006hv-2R for emacs-devel@gnu.org; Fri, 27 May 2016 13:19:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b6LPy-0007yu-1a for emacs-devel@gnu.org; Fri, 27 May 2016 13:19:27 -0400 Original-Received: from mail-oi0-x236.google.com ([2607:f8b0:4003:c06::236]:34446) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b6LPq-0007wt-S9; Fri, 27 May 2016 13:19:18 -0400 Original-Received: by mail-oi0-x236.google.com with SMTP id b65so183991032oia.1; Fri, 27 May 2016 10:19:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:in-reply-to:date:message-id:references :user-agent:mail-followup-to:mime-version; bh=vwtgzws2HgwN5xSp1sNm3TPivLET/pegedwgNbYijoQ=; b=0OY22MdF46nYr/UPP21dvGHTpU72T7r2V5+ApoRB+o9bWV8M+MyBzezsE7EXXfR5g7 IsXiysCIRog5LGMmiCdiAoMXnxhZtRhBeWYkpC5JEt2Ayh6x7Lg/niMgmFhV5jFcX2JM IkNvpCLYX8W5x/ORzaTZkg7jR5/lz+ubv4/QzBlHQ1hROy+5FwgBVbh19FhPDlDU+HRp wKSS7m82xpJURDKuSB2AZZEbNLNNDwxsi2M9K+SjlMU6/idoL9zw8eLTSHm55/I+i9Tg Oup73349RoLFYRVH9w1SJUMTU00leOeEdGKiFtRrX6lhmWwWcjxwxJl1QYaecTX2w0+m oiuA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:in-reply-to:date:message-id :references:user-agent:mail-followup-to:mime-version; bh=vwtgzws2HgwN5xSp1sNm3TPivLET/pegedwgNbYijoQ=; b=UJe8zaUCOE7PA0cHCBc9ryLUTWyvJSLbD7XD2bLYoIQ0rNuEO8pljS925ZWJspv+SS 0xfsCCNmWuCIY1uQvBzmdnywFGnCBPwQuv0i9Zf4XYx26En92Vxic5+NzUtSE3endv6t hNcKisb7qi8p7GSjb3ec8Iw4Fb6gEtNnFVdmDAtJ6kCFvg8O8vwfIhjyDGdM6orKIPCC mFPJIYB5REDUyVsIfu2MTtVSd2moFCFySaSHk3r+MdluF3jvghzO4aPmplyY8Z5GH2zC TCwONSAWR+Ph+WEkZgqqwC7b2NDwtvZEa+w8ezEz443jqE1s717vk2gPyAmBBdnzsMi9 9hWg== X-Gm-Message-State: ALyK8tL3J/hYIXx6X6K86lzGzyrHgWtguHgMdMkUdovtjB4s7vZzG2E9hwigOtuIpB8vJg== X-Received: by 10.202.71.139 with SMTP id u133mr9423497oia.77.1464369557593; Fri, 27 May 2016 10:19:17 -0700 (PDT) Original-Received: from Vulcan.local (76-234-68-79.lightspeed.frokca.sbcglobal.net. [76.234.68.79]) by smtp.gmail.com with ESMTPSA id 108sm9548218ote.39.2016.05.27.10.19.15 (version=TLS1 cipher=AES128-SHA bits=128/128); Fri, 27 May 2016 10:19:15 -0700 (PDT) X-Google-Original-From: "John Wiegley" Original-Received: by Vulcan.local (Postfix, from userid 501) id 8379464B491; Fri, 27 May 2016 10:19:13 -0700 (PDT) In-Reply-To: (Kaushal Modi's message of "Fri, 27 May 2016 10:26:14 +0000") User-Agent: Gnus/5.130014 (Ma Gnus v0.14) Emacs/25.0.94 (darwin) Mail-Followup-To: Kaushal Modi , Ian Dunn , emacs-devel@gnu.org X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2607:f8b0:4003:c06::236 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:204085 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable >>>>> Kaushal Modi writes: > IMO the standard add-hook and remove-hook don't seem to need syntactic > sugar. The macros in the package lack many things that the default > add-hook/remove-hook do and also it is more verbose. > It's not too difficult to define a foo function and add that to a hook us= ing > the standard way. And ALWAYS explicitly defining a function first is a go= od > rule of thumb. It applies to hooks and advices both. I like this package. First, it's not being suggested for core, or as an alternative to standard methods. Second, just because you *can* do something in a manual way, is no reason to argue against convenience. I would both welcome this addition, and start using it. As a bonus, it could be implemented as a macro that does actually generates= a new function and adds that function symbol to the hook, in such a way that = if you change the body and re-evaluate with C-M-x, it removes the old function, and adds the changed one. Then it would be identical to what "best practice= s" say one should do when adding a hook, but with a clearer declaration of intent: "I want the following FORMS to happen when the hook is run". =2D-=20 John Wiegley GPG fingerprint =3D 4710 CF98 AF9B 327B B80F http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGcBAEBCgAGBQJXSIGNAAoJEMFE2PTxn+YwBYcL/juO41n16Yy0+iXRocLtVyY9 xlkRGi0h2EvP0WmH9qRfPQWhIHmkAvn7jTFWWX4tOttT8RB7zO7qhkmjB7XEAiGV q2oP8cY/aX7JPOFOdZezVZLhP6lVVWYl6IoKmcNCE0o3O1JkleQjh1gxLfKfDW1o lAyZJTHbck832UXdqzjBEb2UYjEigd5NKF9uf1bwqyPrHBRQ59MDvM5AEAIGiUCy DxMSqZ1drikDqYTnneKJxtXXOZcjzdtgZe3FSPVyc9V0I/YR9y+XdL8PAswSBN0n hmLonk44NJ90BQmnAne1vP8FkUoqB3GFzijnw9IwAK2o/skyhE1qzwYlMriOh5cV TlWg3E++Xnqz3+qd+zNQ2SAA5aIHjVpcSR3vk8s1IKAEfd5zKcVscj7CnD85Ozfv nRbGUaQDN8Kp6DVwcHSMtqR7+LDYynLHBoEn6k44NaSflJhQChuF7fFccGomdLVD QsWFOGnsF9n6U1LAoYI1bJJuzDv5r3AaAwP1guiMsg== =U62n -----END PGP SIGNATURE----- --=-=-=--