diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2018-12-09 20:56:35 -0500 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2018-12-09 20:56:35 -0500 |
commit | b0ed9d143333827ee8481da0fe7821887a3c6c94 (patch) | |
tree | 1269a0c6f3fdb7897220145dff3e9f852d16c3d0 /lisp/emacs-lisp/cursor-sensor.el | |
parent | ee1ebe8246c333e9ca0e3454f357d12c713c129b (diff) | |
download | emacs-b0ed9d143333827ee8481da0fe7821887a3c6c94.tar.gz emacs-b0ed9d143333827ee8481da0fe7821887a3c6c94.tar.bz2 emacs-b0ed9d143333827ee8481da0fe7821887a3c6c94.zip |
* lisp/emacs-lisp/cursor-sensor.el: Add motivation
Diffstat (limited to 'lisp/emacs-lisp/cursor-sensor.el')
-rw-r--r-- | lisp/emacs-lisp/cursor-sensor.el | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/lisp/emacs-lisp/cursor-sensor.el b/lisp/emacs-lisp/cursor-sensor.el index 21c48f830f2..6c33d04dedd 100644 --- a/lisp/emacs-lisp/cursor-sensor.el +++ b/lisp/emacs-lisp/cursor-sensor.el @@ -38,6 +38,27 @@ ;; called just before redisplay happens, according to the movement of ;; the cursor since the last redisplay. +;;;; Motivation + +;; The old properties were very problematic in practice because they +;; operate at a much lower level and hence affect all motion +;; *functions* like goto-char, forward-char, ... hence breaking +;; invariants like: +;; +;; (forward-char N) == (progn (forward-char N1) (forward-char (- N N1))) +;; (point) == (progn (forward-char N) (forward-char -N) (point)) +;; (+ N (point)) == (progn (forward-char N) (point)) +;; +;; The problems would usually show up due to interaction between +;; unrelated code working in the same buffer, where one code used those +;; properties and the other (unknowingly) assumed those aren't used. +;; In practice a *lot* of code assumes there's no such funny business. +;; +;; Worse: all(?) packages using those properties don't actually want those +;; properties to affect motion at such a low-level, they only want to +;; affect the overall effect of commands, but not the effect of every +;; single point-motion that a given command happened to use internally. + ;;; Code: ;;;###autoload |