aboutsummaryrefslogtreecommitdiffstats
path: root/src/buffer.c
diff options
context:
space:
mode:
authorStephen Leake2019-09-10 03:37:51 -0700
committerStephen Leake2019-09-10 03:37:51 -0700
commit3d442312889ef2d14c07282d0aff6199d00cc165 (patch)
tree74034ca2dded6ed233d0701b4cb5c10a0b5e9034 /src/buffer.c
parentac1a2e260e8ece34500b5879f766b4e54ee57b94 (diff)
parent74e9799bd89484b8d15bdd6597c68fc00d07e7f7 (diff)
downloademacs-3d442312889ef2d14c07282d0aff6199d00cc165.tar.gz
emacs-3d442312889ef2d14c07282d0aff6199d00cc165.zip
Merge commit '74e9799bd89484b8d15bdd6597c68fc00d07e7f7'
Diffstat (limited to 'src/buffer.c')
-rw-r--r--src/buffer.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/buffer.c b/src/buffer.c
index ea785bbcd70..77e8b6bb779 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -105,7 +105,7 @@ static char buffer_permanent_local_flags[MAX_PER_BUFFER_VARS];
105 105
106/* Number of per-buffer variables used. */ 106/* Number of per-buffer variables used. */
107 107
108int last_per_buffer_idx; 108static int last_per_buffer_idx;
109 109
110static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay, 110static void call_overlay_mod_hooks (Lisp_Object list, Lisp_Object overlay,
111 bool after, Lisp_Object arg1, 111 bool after, Lisp_Object arg1,
@@ -655,6 +655,12 @@ set_buffer_overlays_after (struct buffer *b, struct Lisp_Overlay *o)
655 b->overlays_after = o; 655 b->overlays_after = o;
656} 656}
657 657
658bool
659valid_per_buffer_idx (int idx)
660{
661 return 0 <= idx && idx < last_per_buffer_idx;
662}
663
658/* Clone per-buffer values of buffer FROM. 664/* Clone per-buffer values of buffer FROM.
659 665
660 Buffer TO gets the same per-buffer values as FROM, with the 666 Buffer TO gets the same per-buffer values as FROM, with the
@@ -4568,7 +4574,7 @@ report_overlay_modification (Lisp_Object start, Lisp_Object end, bool after,
4568 prop_i = copy[i++]; 4574 prop_i = copy[i++];
4569 overlay_i = copy[i++]; 4575 overlay_i = copy[i++];
4570 /* It is possible that the recorded overlay has been deleted 4576 /* It is possible that the recorded overlay has been deleted
4571 (which makes it's markers' buffers be nil), or that (due to 4577 (which makes its markers' buffers be nil), or that (due to
4572 some bug) it belongs to a different buffer. Only run this 4578 some bug) it belongs to a different buffer. Only run this
4573 hook if the overlay belongs to the current buffer. */ 4579 hook if the overlay belongs to the current buffer. */
4574 if (XMARKER (OVERLAY_START (overlay_i))->buffer == current_buffer) 4580 if (XMARKER (OVERLAY_START (overlay_i))->buffer == current_buffer)