alphapapa / alphapapa/emacs-package-dev-handbook

Add section on using hooks

Ouverte
#26 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub
enhancement help wanted
Langage dominant
JavaScript
Étoiles
1.2k
Forks
46
Métriques de merge des PR
Aucune PR mergée en 30 j

Description

As a package dev, I'd like to have a reference section of hooks that are commonly used in packages and how to use them.

In particular, for my use case, I've been looking for a good reference implementation of using the `after-change-hooks` for building up a set of changes a user has made to the buffer.

IE:
If a user replaces a region of text
```
abcd => efgh
```
would look something like:
```
(:before-change "abcd"
:after-change "efgh")
```

or if a user deletes a char:
```
hello world => helloworld
```
would look like
```
(:before-change " "
:after-change "")
```
I've tried implementing this myself using the after-change-hook, but I keep running edges in my knowledge causing weird bugs.

Guide de contribution

Aucun guide de contribution indexé pour ce dépôt

Évaluation

Cette issue n'a pas encore été évaluée.

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.