all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Stefan Monnier <monnier@IRO.UMontreal.CA>
To: Drew Adams <drew.adams@oracle.com>
Cc: 33664@debbugs.gnu.org
Subject: bug#33664: 26.1; Document vars and functions in `cursor-sensor.el'
Date: Sun, 09 Dec 2018 09:01:02 -0500	[thread overview]
Message-ID: <jwvo99u4x81.fsf-monnier+bug#33664@gnu.org> (raw)
In-Reply-To: <cfd3992c-7a13-4ff5-816f-689ceb856396@default> (Drew Adams's message of "Fri, 7 Dec 2018 15:15:37 +0000 (UTC)")

I installed the patch below.


        Stefan


diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi
index 14cc4fba45..78d51c6dbb 100644
--- a/doc/lispref/text.texi
+++ b/doc/lispref/text.texi
@@ -3398,6 +3398,9 @@ Special Properties
 is moved away from any position that has a non-@code{nil}
 @code{cursor-intangible} property, just before redisplay happens.
 
+When the variable @code{cursor-sensor-inhibit} is non-@code{nil}, the
+@code{cursor-intangible} property is ignored.
+
 @item field
 @kindex field @r{(text property)}
 Consecutive characters with the same @code{field} property constitute a
@@ -3579,6 +3582,9 @@ Special Properties
 property or leaving it.  The functions are called only when the minor
 mode @code{cursor-sensor-mode} is turned on.
 
+When the variable @code{cursor-sensor-inhibit} is non-@code{nil}, the
+@code{cursor-sensor-functions} property is ignored.
+
 @item composition
 @kindex composition @r{(text property)}
 This text property is used to display a sequence of characters as a
diff --git a/lisp/emacs-lisp/cursor-sensor.el b/lisp/emacs-lisp/cursor-sensor.el
index 7e3088dd91..21c48f830f 100644
--- a/lisp/emacs-lisp/cursor-sensor.el
+++ b/lisp/emacs-lisp/cursor-sensor.el
@@ -22,17 +22,29 @@
 
 ;;; Commentary:
 
-;; This package implements the `cursor-intangible' property, which is
-;; meant to replace the old `intangible' property.  To use it, just enable the
-;; `cursor-intangible-mode', after which this package will move point away from
-;; any position that has a non-nil `cursor-intangible' property.  This is only
-;; done just before redisplay happens, contrary to the old `intangible'
-;; property which was done at a much lower level.
+;; This package implements the `cursor-intangible' and
+;; `cursor-sensor-functions' properties, which are meant to replace
+;; the old `intangible', `point-entered', and `point-left' properties.
+
+;; To use `cursor-intangible', just enable the
+;; `cursor-intangible-mode' minor mode, after which this package will
+;; move point away from any position that has a non-nil
+;; `cursor-intangible' property.  This is only done just before
+;; redisplay happens, contrary to the old `intangible' property which
+;; was done at a much lower level.
+
+;; To use `cursor-sensor-functions', enable the `cursor-sensor-mode'
+;; minor mode, after which the `cursor-sensor-functions' will be
+;; called just before redisplay happens, according to the movement of
+;; the cursor since the last redisplay.
 
 ;;; Code:
 
 ;;;###autoload
-(defvar cursor-sensor-inhibit nil)
+(defvar cursor-sensor-inhibit nil
+  "When non-nil, suspend `cursor-sensor-mode' and `cursor-intangible-mode'.
+By convention, this is a list of symbols where each symbol stands for the
+\"cause\" of the suspension.")
 
 (defun cursor-sensor--intangible-p (pos)
   (let ((p (get-pos-property pos 'cursor-intangible)))





  parent reply	other threads:[~2018-12-09 14:01 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <<cfd3992c-7a13-4ff5-816f-689ceb856396@default>
     [not found] ` <<83k1kl5ozh.fsf@gnu.org>
2018-12-07 15:57   ` bug#33664: 26.1; Document vars and functions in `cursor-sensor.el' Drew Adams
2018-12-07 16:29     ` Eli Zaretskii
2018-12-08 23:10     ` Juri Linkov
2018-12-09  3:53       ` Drew Adams
     [not found] ` <<jwvo99u4x81.fsf-monnier+bug#33664@gnu.org>
     [not found]   ` <<83zhte3f4n.fsf@gnu.org>
2018-12-07 15:15     ` Drew Adams
2018-12-07 15:28       ` Drew Adams
2018-12-07 15:34         ` Drew Adams
2018-12-07 15:35       ` Eli Zaretskii
2018-12-08  3:24         ` Richard Stallman
2018-12-09 14:01       ` Stefan Monnier [this message]
2018-12-09 15:15         ` Eli Zaretskii
2018-12-10  3:09         ` Richard Stallman
2018-12-09 18:38       ` Drew Adams
2019-10-12 22:12         ` Lars Ingebrigtsen
2018-12-09 18:32     ` Drew Adams
2018-12-09 19:35       ` Stefan Monnier
2018-12-09 20:56         ` Drew Adams
2018-12-10  1:58           ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='jwvo99u4x81.fsf-monnier+bug#33664@gnu.org' \
    --to=monnier@iro.umontreal.ca \
    --cc=33664@debbugs.gnu.org \
    --cc=drew.adams@oracle.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.