aboutsummaryrefslogtreecommitdiffstats
path: root/src/intervals.h
diff options
context:
space:
mode:
authorRichard M. Stallman <[email protected]>1993-06-07 05:28:42 +0000
committerRichard M. Stallman <[email protected]>1993-06-07 05:28:42 +0000
commit9207deb2b984aa202f35bd3598b39eb093520514 (patch)
tree7d592a7ffdf705cc7ef7669867703994fae13e29 /src/intervals.h
parent0a4469c908bfdb1b1b503cc66dc8540e0fb92b33 (diff)
(INTERVAL_VISIBLE_P): Use textget.
(INTERVAL_WRITABLE_P): Use textget. Check Vinhibit_read_only.
Diffstat (limited to 'src/intervals.h')
-rw-r--r--src/intervals.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/intervals.h b/src/intervals.h
index e7ebb8f5cd..c724f31ede 100644
--- a/src/intervals.h
+++ b/src/intervals.h
@@ -137,11 +137,15 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* Is this interval visible? Replace later with cache access */
#define INTERVAL_VISIBLE_P(i) \
- (! NULL_INTERVAL_P (i) && NILP (Fmemq (Qinvisible, (i)->plist)))
+ (! NULL_INTERVAL_P (i) && NILP (textget ((i)->plist, Qinvisible)))
/* Is this interval writable? Replace later with cache access */
#define INTERVAL_WRITABLE_P(i) \
- (! NULL_INTERVAL_P (i) && NILP (Fmemq (Qread_only, (i)->plist)))
+ (! NULL_INTERVAL_P (i) && NILP (textget ((i)->plist, Qread_only)) \
+ && (NILP (Vinhibit_read_only) \
+ || (CONSP (Vinhibit_read_only) \
+ && !NILP (Fmemq (textget ((i)->plist, Qread_only), \
+ Vinhibit_read_only)))))
/* Macros to tell whether insertions before or after this interval
should stick to it. */