aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBoris Goldowsky1995-03-27 16:05:57 +0000
committerBoris Goldowsky1995-03-27 16:05:57 +0000
commit06d92327496908d05ab6d5f52a84adeb7d1efb83 (patch)
tree87b52b1c9a25b8fded28975eb38597690374f0ea
parentb9439338ffec6f77390764cc933f98665db8a0cc (diff)
downloademacs-06d92327496908d05ab6d5f52a84adeb7d1efb83.tar.gz
emacs-06d92327496908d05ab6d5f52a84adeb7d1efb83.zip
(Vdefault_text_properties): name changed from Vdefault_properties.
(textget_direct): Fn deleted. (textget, verify_interval_modification): Use Fplist_get instead.
-rw-r--r--src/intervals.c33
1 files changed, 7 insertions, 26 deletions
diff --git a/src/intervals.c b/src/intervals.c
index d444cc11a59..343e01681f3 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -1544,7 +1544,7 @@ graft_intervals_into_buffer (source, position, length, buffer, inherit)
1544/* Get the value of property PROP from PLIST, 1544/* Get the value of property PROP from PLIST,
1545 which is the plist of an interval. 1545 which is the plist of an interval.
1546 We check for direct properties, for categories with property PROP, 1546 We check for direct properties, for categories with property PROP,
1547 and for PROP appearing on the default-properties list. */ 1547 and for PROP appearing on the default-text-properties list. */
1548 1548
1549Lisp_Object 1549Lisp_Object
1550textget (plist, prop) 1550textget (plist, prop)
@@ -1570,30 +1570,11 @@ textget (plist, prop)
1570 1570
1571 if (! NILP (fallback)) 1571 if (! NILP (fallback))
1572 return fallback; 1572 return fallback;
1573 if (CONSP (Vdefault_properties)) 1573 if (CONSP (Vdefault_text_properties))
1574 return textget_direct (Vdefault_properties, prop); 1574 return Fplist_get (Vdefault_text_properties, prop);
1575 return Qnil; 1575 return Qnil;
1576} 1576}
1577 1577
1578/* Get the value of property PROP from PLIST,
1579 which is the plist of an interval.
1580 We check for direct properties only! */
1581
1582Lisp_Object
1583textget_direct (plist, prop)
1584 Lisp_Object plist;
1585 register Lisp_Object prop;
1586{
1587 register Lisp_Object tail;
1588
1589 for (tail = plist; !NILP (tail); tail = Fcdr (Fcdr (tail)))
1590 {
1591 if (EQ (prop, Fcar (tail)))
1592 return Fcar (Fcdr (tail));
1593 }
1594
1595 return Qnil;
1596}
1597 1578
1598/* Set point in BUFFER to POSITION. If the target position is 1579/* Set point in BUFFER to POSITION. If the target position is
1599 before an intangible character, move to an ok place. */ 1580 before an intangible character, move to an ok place. */
@@ -1890,7 +1871,7 @@ verify_interval_modification (buf, start, end)
1890 1871
1891 tem = textget (i->plist, Qfront_sticky); 1872 tem = textget (i->plist, Qfront_sticky);
1892 if (TMEM (Qread_only, tem) 1873 if (TMEM (Qread_only, tem)
1893 || (NILP (textget_direct (i->plist, Qread_only)) 1874 || (NILP (Fplist_get (i->plist, Qread_only))
1894 && TMEM (Qcategory, tem))) 1875 && TMEM (Qcategory, tem)))
1895 error ("Attempt to insert within read-only text"); 1876 error ("Attempt to insert within read-only text");
1896 } 1877 }
@@ -1910,7 +1891,7 @@ verify_interval_modification (buf, start, end)
1910 1891
1911 tem = textget (prev->plist, Qrear_nonsticky); 1892 tem = textget (prev->plist, Qrear_nonsticky);
1912 if (! TMEM (Qread_only, tem) 1893 if (! TMEM (Qread_only, tem)
1913 && (! NILP (textget_direct (prev->plist,Qread_only)) 1894 && (! NILP (Fplist_get (prev->plist,Qread_only))
1914 || ! TMEM (Qcategory, tem))) 1895 || ! TMEM (Qcategory, tem)))
1915 error ("Attempt to insert within read-only text"); 1896 error ("Attempt to insert within read-only text");
1916 } 1897 }
@@ -1929,13 +1910,13 @@ verify_interval_modification (buf, start, end)
1929 1910
1930 tem = textget (i->plist, Qfront_sticky); 1911 tem = textget (i->plist, Qfront_sticky);
1931 if (TMEM (Qread_only, tem) 1912 if (TMEM (Qread_only, tem)
1932 || (NILP (textget_direct (i->plist, Qread_only)) 1913 || (NILP (Fplist_get (i->plist, Qread_only))
1933 && TMEM (Qcategory, tem))) 1914 && TMEM (Qcategory, tem)))
1934 error ("Attempt to insert within read-only text"); 1915 error ("Attempt to insert within read-only text");
1935 1916
1936 tem = textget (prev->plist, Qrear_nonsticky); 1917 tem = textget (prev->plist, Qrear_nonsticky);
1937 if (! TMEM (Qread_only, tem) 1918 if (! TMEM (Qread_only, tem)
1938 && (! NILP (textget_direct (prev->plist, Qread_only)) 1919 && (! NILP (Fplist_get (prev->plist, Qread_only))
1939 || ! TMEM (Qcategory, tem))) 1920 || ! TMEM (Qcategory, tem)))
1940 error ("Attempt to insert within read-only text"); 1921 error ("Attempt to insert within read-only text");
1941 } 1922 }