From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Dunn Newsgroups: gmane.emacs.devel Subject: [ELPA] New package: hook-helpers.el Date: Sun, 12 Jun 2016 14:57:54 -0400 (2 minutes, 34 seconds ago) Message-ID: <878tya6xfg.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1465758298 18787 80.91.229.3 (12 Jun 2016 19:04:58 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 12 Jun 2016 19:04:58 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jun 12 21:04:52 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 1bCAgl-0007p3-EW for ged-emacs-devel@m.gmane.org; Sun, 12 Jun 2016 21:04:51 +0200 Original-Received: from localhost ([::1]:52377 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCAgk-00031P-1Z for ged-emacs-devel@m.gmane.org; Sun, 12 Jun 2016 15:04:50 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53351) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCAgZ-0002yj-BA for emacs-devel@gnu.org; Sun, 12 Jun 2016 15:04:40 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bCAgX-0001QT-5j for emacs-devel@gnu.org; Sun, 12 Jun 2016 15:04:38 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:44960) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bCAgX-0001QP-25 for emacs-devel@gnu.org; Sun, 12 Jun 2016 15:04:37 -0400 Original-Received: from [2604:6000:1010:176:d06f:8928:a420:e516] (port=33634 helo=escafil) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1bCAgW-0006W4-9Q for emacs-devel@gnu.org; Sun, 12 Jun 2016 15:04:36 -0400 User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e 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:204318 Archived-At: As no one has made any other objections, I'll officially submit this to= GNU ELPA. It's currently maintained on Savannah, so I've included the patch for a= dding hook-helpers to the externals-list file. I apologize if I've done th= is incorrectly. Official Description: Often times, I see people define a function to be used once in a hook. If = they don=E2=80=99t do this, then it will be an anonymous function. If the = anonymous function is modified, then the function can=E2=80=99t be removed.= With a function outside of the =E2=80=98add-hook=E2=80=99 call, it looks = messy. The =E2=80=98define-hook-helper=E2=80=99 macro is a solution to this. Thin= k of it as an anaphoric =E2=80=98add-hook=E2=80=99, but one that can be cal= led many times without risking redundant hook functions. It gives a cleane= r look and feel to Emacs configuration files, and could even be used in act= ual libraries. diff --git a/externals-list b/externals-list index 169cb11..6876140 100644 --- a/externals-list +++ b/externals-list @@ -55,6 +55,7 @@ ("ggtags" :subtree "https://github.com/leoliu/ggtags") ("gnome-c-style" :subtree "https://github.com/ueno/gnome-c-style.git= ") ("gnorb" :subtree "https://github.com/girzel/gnorb") + ("hook-helpers" :subtree "git://git.sv.gnu.org/hook-helpers-el.git= ") ("ioccur" :subtree "https://github.com/thierryvolpiatto/ioccu= r.git") ("js2-mode" :subtree "https://github.com/mooz/js2-mode.git") ("let-alist" :core "lisp/emacs-lisp/let-alist.el") --=20 Ian Dunn