emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ELPA] New package: hook-helpers.el


From: Ian Dunn
Subject: [ELPA] New package: hook-helpers.el
Date: Sun, 12 Jun 2016 14:57:54 -0400 (2 minutes, 34 seconds ago)
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux)

    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 
adding hook-helpers to the externals-list file.  I apologize if I've done this 
incorrectly.

Official Description:

Often times, I see people define a function to be used once in a hook.  If they 
don’t do this, then it will be an anonymous function.  If the anonymous 
function is modified, then the function can’t be removed.  With a function 
outside of the ‘add-hook’ call, it looks messy.

The ‘define-hook-helper’ macro is a solution to this.  Think of it as an 
anaphoric ‘add-hook’, but one that can be called many times without risking 
redundant hook functions.  It gives a cleaner look and feel to Emacs 
configuration files, and could even be used in actual 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/ioccur.git";)
  ("js2-mode"           :subtree "https://github.com/mooz/js2-mode.git";)
  ("let-alist" :core "lisp/emacs-lisp/let-alist.el")

-- 
Ian Dunn



reply via email to

[Prev in Thread] Current Thread [Next in Thread]