aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarl Heuer1994-02-04 20:51:16 +0000
committerKarl Heuer1994-02-04 20:51:16 +0000
commit3e76261f9b744040389fffe39c610b33ecd93181 (patch)
tree79e1ddc140d5f32edee782755493a62ff169fdb9 /src
parentbedae5a588b7f8968821cfa09071cd59e69be624 (diff)
downloademacs-3e76261f9b744040389fffe39c610b33ecd93181.tar.gz
emacs-3e76261f9b744040389fffe39c610b33ecd93181.zip
(verify_interval_modification): When checking read-only, allow for the case
that stickiness might be t instead of a list.
Diffstat (limited to 'src')
-rw-r--r--src/intervals.c34
1 files changed, 19 insertions, 15 deletions
diff --git a/src/intervals.c b/src/intervals.c
index 7a843040e23..400ef43d0d6 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -1831,14 +1831,16 @@ verify_interval_modification (buf, start, end)
1831 front-sticky, inhibit insertion. 1831 front-sticky, inhibit insertion.
1832 Check for read-only as well as category. */ 1832 Check for read-only as well as category. */
1833 if (! NILP (after) 1833 if (! NILP (after)
1834 && NILP (Fmemq (after, Vinhibit_read_only)) 1834 && NILP (Fmemq (after, Vinhibit_read_only)))
1835 && (! NILP (Fmemq (Qread_only, 1835 {
1836 textget (i->plist, Qfront_sticky))) 1836 Lisp_Object tem;
1837
1838 tem = textget (i->plist, Qfront_sticky);
1839 if (TMEM (Qread_only, tem)
1837 || (NILP (textget_direct (i->plist, Qread_only)) 1840 || (NILP (textget_direct (i->plist, Qread_only))
1838 && ! NILP (Fmemq (Qcategory, 1841 && TMEM (Qcategory, tem)))
1839 textget (i->plist, 1842 error ("Attempt to insert within read-only text");
1840 Qfront_sticky)))))) 1843 }
1841 error ("Attempt to insert within read-only text");
1842 } 1844 }
1843 else 1845 else
1844 after = Qnil; 1846 after = Qnil;
@@ -1850,14 +1852,16 @@ verify_interval_modification (buf, start, end)
1850 rear-nonsticky, inhibit insertion. 1852 rear-nonsticky, inhibit insertion.
1851 Check for read-only as well as category. */ 1853 Check for read-only as well as category. */
1852 if (! NILP (before) 1854 if (! NILP (before)
1853 && NILP (Fmemq (before, Vinhibit_read_only)) 1855 && NILP (Fmemq (before, Vinhibit_read_only)))
1854 && NILP (Fmemq (Qread_only, 1856 {
1855 textget (prev->plist, Qrear_nonsticky))) 1857 Lisp_Object tem;
1856 && (! NILP (textget_direct (prev->plist,Qread_only)) 1858
1857 || NILP (Fmemq (Qcategory, 1859 tem = textget (prev->plist, Qrear_nonsticky);
1858 textget (prev->plist, 1860 if (! TMEM (Qread_only, tem)
1859 Qrear_nonsticky))))) 1861 && (! NILP (textget_direct (prev->plist,Qread_only))
1860 error ("Attempt to insert within read-only text"); 1862 || ! TMEM (Qcategory, tem)))
1863 error ("Attempt to insert within read-only text");
1864 }
1861 } 1865 }
1862 else 1866 else
1863 before = Qnil; 1867 before = Qnil;