]> git.eshelyaron.com Git - emacs.git/commit
eww.el: Use `track-changes`
authorStefan Monnier <monnier@iro.umontreal.ca>
Sun, 18 May 2025 19:44:35 +0000 (15:44 -0400)
committerEshel Yaron <me@eshelyaron.com>
Wed, 21 May 2025 06:10:25 +0000 (08:10 +0200)
commit7008ed0298f16a7d8fc3351753e24be3a5ea63ab
tree4e5fb3ce421fb4b54543989b2f249a88ec99ad4a
parent6ed587279564c841cda0bc8df0388f8fdacbe987
eww.el: Use `track-changes`

* lisp/net/eww.el: Require `track-changes`.
(eww-display-document): Don't `inhibit-modification-hooks` any more.
Use `track-changes-register` *at the end* instead.
(eww-mode): Don't use `after-change-functions` any more.
(eww--track-changes): New function.
(eww--process-text-input): Rename from `eww-process-text-input`.
Try and be more careful: don't presume `point` is near
the modification.  Check for a form both at BEG and at END.
Don't rely on `:start/:end` pointing to the right places.
Use `:length` instead and shrink the field back to its original length
when possible.
(eww-size-text-inputs): Set `:length` rather than `:start/:end`.

(cherry picked from commit 168b67b1eeb2e2b79d2e5f3712d8ebfda31fd753)
lisp/net/eww.el