Function: pulsar--after-change-function
pulsar--after-change-function is a natively compiled function defined
in pulsar.el.
Signature
(pulsar--after-change-function BEG END LEN)
Documentation
Provide after-change-functions hook to accumulate buffer edits.
Changes are defined by BEG, END, LEN:
- BEG and END mark the region of text.
- LEN is zero for insertions.
- LEN is the extent of deletions and BEG==END.
Source Code
;; Defined in /nix/store/3sr3j7hp5p1wsd8fv5763k239hzdxi1c-emacs-packages-deps/share/emacs/site-lisp/elpa/pulsar-1.4.1/pulsar.el
;; This feature is heavily inspired by Daniel Mendler's `goggles' package.
(defun pulsar--after-change-function (beg end len)
"Provide `after-change-functions' hook to accumulate buffer edits.
Changes are defined by BEG, END, LEN:
- BEG and END mark the region of text.
- LEN is zero for insertions.
- LEN is the extent of deletions and BEG==END."
(when (or (memq this-command pulsar-pulse-region-functions)
(memq real-this-command pulsar-pulse-region-functions))
(when (and (zerop len) (= beg end)) ; In case of a deletion
(when (> beg (buffer-size))
(setq beg (1- beg)))
(setq end (1+ beg)))
(push (cons (copy-marker beg) (copy-marker end)) pulsar--pulse-region-changes)))