]> git.eshelyaron.com Git - emacs.git/commitdiff
Make 'text-property-default-nonsticky' buffer-local when set
authorEli Zaretskii <eliz@gnu.org>
Sat, 22 Feb 2025 16:04:04 +0000 (18:04 +0200)
committerEshel Yaron <me@eshelyaron.com>
Sun, 23 Feb 2025 08:18:16 +0000 (09:18 +0100)
* src/textprop.c (syms_of_textprop)
<text-property-default-nonsticky>: Make buffer-local when set.
(Bug#76445)

* etc/symbol-releases.eld: Add text-property-default-nonsticky.

* etc/NEWS:
* doc/lispref/text.texi (Sticky Properties): Document the change.

(cherry picked from commit 827a91dbf3a45d6c3c620545b5e620ce76e44bb2)

doc/lispref/text.texi
etc/symbol-releases.eld
src/textprop.c

index ec04085b76af58615e14801ebb2baa88617f0bb9..de09cb01d6047b6a00a555f9728419515856d263 100644 (file)
@@ -4137,10 +4137,10 @@ list, properties are rear-sticky @emph{unless} their names are in the
 list.
 
 @defvar text-property-default-nonsticky
-This variable holds an alist which defines the default rear-stickiness
-of various text properties.  Each element has the form
-@code{(@var{property} . @var{nonstickiness})}, and it defines the
-stickiness of a particular text property, @var{property}.
+This buffer-local variable holds an alist which defines the default
+rear-stickiness of various text properties in the buffer.  Each element
+has the form @code{(@var{property} . @var{nonstickiness})}, and it
+defines the stickiness of a particular text property, @var{property}.
 
 If @var{nonstickiness} is non-@code{nil}, this means that the property
 @var{property} is rear-nonsticky by default.  Since all properties are
index 645ab77972d4e31fdc24859dda30427667babbf9..41200581be54d52afb501ae93d9c9cdb758a63f1 100644 (file)
@@ -44,6 +44,7 @@
  ("22.1" fun version<)
  ("22.1" fun version<=)
  ("22.1" fun read-number)
+ ("21.1" var text-property-default-nonsticky)
 
 ;; Since much of early Emacs source history is lost, these versions are
 ;; conservative estimates: the actual version of first appearance may very
index 30c26ce4809342b915fde7904876576f1b6f90bd..8fdaafccedef8d0104fa89658174f71cc193a36f 100644 (file)
@@ -2427,6 +2427,7 @@ inherits it if NONSTICKINESS is nil.  The `front-sticky' and
      by default.  */
   Vtext_property_default_nonsticky
     = list2 (Fcons (Qsyntax_table, Qt), Fcons (Qdisplay, Qt));
+  Fmake_variable_buffer_local (Qtext_property_default_nonsticky);
 
   interval_insert_behind_hooks = Qnil;
   interval_insert_in_front_hooks = Qnil;
@@ -2444,6 +2445,7 @@ inherits it if NONSTICKINESS is nil.  The `front-sticky' and
   DEFSYM (Qlocal_map, "local-map");
   DEFSYM (Qfront_sticky, "front-sticky");
   DEFSYM (Qrear_nonsticky, "rear-nonsticky");
+  DEFSYM (Qtext_property_default_nonsticky, "text-property-default-nonsticky");
   DEFSYM (Qmouse_face, "mouse-face");
   DEFSYM (Qminibuffer_prompt, "minibuffer-prompt");