[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] scratch/hook-helpers 5e4a3a8 02/19: Added remove-hook-helper to R
From: |
Ian Dunn |
Subject: |
[elpa] scratch/hook-helpers 5e4a3a8 02/19: Added remove-hook-helper to README. |
Date: |
Sun, 23 Apr 2017 12:50:38 -0400 (EDT) |
branch: scratch/hook-helpers
commit 5e4a3a8950a562ab7ab57d5f3611df41cc15cd0e
Author: Ian Dunn <address@hidden>
Commit: Ian Dunn <address@hidden>
Added remove-hook-helper to README.
---
README.org | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/README.org b/README.org
index 70f2d98..0e7d7be 100644
--- a/README.org
+++ b/README.org
@@ -2,8 +2,6 @@
#+AUTHOR: Ian Dunn
#+EMAIL: address@hidden
-
-
* Copying
Copyright (C) 2016 Ian Dunn
@@ -50,7 +48,7 @@ The above creates the function ‘hook-helper--after-init’.
I thought about that too, and devised a solution. ~define-hook-helper~
accepts several keywords: name, append, and args. Append does exactly what it
says on the tin: It appends the hook, passing the argument straight to
-‘add-hook’. Name tacks a name onto the defined hook function. For instance,
+~add-hook~. Name tacks a name onto the defined hook function. For instance,
take the previous example:
#+BEGIN_SRC emacs-lisp
@@ -97,6 +95,17 @@ As above, this creates the function ~hook-helper--text-mode~
like so:
(visual-line-mode 1))
#+END_SRC
-All ~define-mode-hook-helper~ does is add 'mode' to the end of the mode its
+All ~define-mode-hook-helper~ does is add "mode" to the end of the mode its
passed, then passes all other arguments to ~define-hook-helper~. This means
that ~define-mode-hook-helper~ also takes the name and append keywords.
+** Removing the Function
+To remove the new function from the hook, you can use the function
+~remove-hook-helper~. It works just as ~define-hook-helper~:
+
+#+BEGIN_SRC emacs-lisp
+(remove-hook-helper text-mode)
+(remove-hook-helper after-init
+ :name env)
+(remove-hook-helper after-make-frame
+ :suffix "functions")
+#+END_SRC
- [elpa] branch scratch/hook-helpers created (now 365d8de), Ian Dunn, 2017/04/23
- [elpa] scratch/hook-helpers 597fce1 03/19: Updated README to include savannah project link., Ian Dunn, 2017/04/23
- [elpa] scratch/hook-helpers 7981caf 06/19: Removed docstring argument from `hook-helpers'., Ian Dunn, 2017/04/23
- [elpa] scratch/hook-helpers 17f7d5d 07/19: Restored docstring argument in `define-hook-helper'., Ian Dunn, 2017/04/23
- [elpa] scratch/hook-helpers b373c79 08/19: Removed define-mode-hook-helpers, since it only moves the word "mode" around., Ian Dunn, 2017/04/23
- [elpa] scratch/hook-helpers f1409ec 05/19: Updated README to include new usage., Ian Dunn, 2017/04/23
- [elpa] scratch/hook-helpers 73d0cb5 13/19: Added gitignore file, Ian Dunn, 2017/04/23
- [elpa] scratch/hook-helpers e253e03 11/19: Implemented new design for anonymous helpers, Ian Dunn, 2017/04/23
- [elpa] scratch/hook-helpers 5e4a3a8 02/19: Added remove-hook-helper to README.,
Ian Dunn <=
- [elpa] scratch/hook-helpers 706af98 15/19: Clean up describe-hook-helpers, Ian Dunn, 2017/04/23
- [elpa] scratch/hook-helpers 3bb2282 09/19: Updated README, removing define-mode-hook-helper., Ian Dunn, 2017/04/23
- [elpa] scratch/hook-helpers 7f1eccf 16/19: Fixed bug in hkhlp-normalize-hook-spec, Ian Dunn, 2017/04/23
- [elpa] scratch/hook-helpers 0386e23 04/19: Modified define-hook-helper to more closely match defun., Ian Dunn, 2017/04/23
- [elpa] scratch/hook-helpers 0fc0b3d 14/19: Fixed bug in define-hook-helper, Ian Dunn, 2017/04/23
- [elpa] scratch/hook-helpers dff9910 10/19: Added `define-hook-function' to allow defining a function to be added to multiple hooks., Ian Dunn, 2017/04/23
- [elpa] scratch/hook-helpers a46803b 17/19: Fixed failing tests, Ian Dunn, 2017/04/23
- [elpa] scratch/hook-helpers 93ae501 12/19: Finished last commit., Ian Dunn, 2017/04/23
- [elpa] scratch/hook-helpers 7970dcf 01/19: Initial commit., Ian Dunn, 2017/04/23
- [elpa] scratch/hook-helpers ff95f49 18/19: Preparations to push to ELPA, Ian Dunn, 2017/04/23