aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman2006-05-14 21:53:45 +0000
committerRichard M. Stallman2006-05-14 21:53:45 +0000
commit1b0440ed041cd311eb7e59cbe6219f7ffa26a909 (patch)
tree0700b3eeb81053842f9b5115b64365c62489bd5b /src
parent6c27fdb95db3c21882adde04366ae25a01c3c896 (diff)
downloademacs-1b0440ed041cd311eb7e59cbe6219f7ffa26a909.tar.gz
emacs-1b0440ed041cd311eb7e59cbe6219f7ffa26a909.zip
(get_local_map): Abort if POSITION outside BEGV, ZV.
Diffstat (limited to 'src')
-rw-r--r--src/intervals.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/intervals.c b/src/intervals.c
index 086db4db6bd..e69ff701387 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -2341,7 +2341,9 @@ get_property_and_range (pos, prop, val, start, end, object)
2341/* Return the proper local keymap TYPE for position POSITION in 2341/* Return the proper local keymap TYPE for position POSITION in
2342 BUFFER; TYPE should be one of `keymap' or `local-map'. Use the map 2342 BUFFER; TYPE should be one of `keymap' or `local-map'. Use the map
2343 specified by the PROP property, if any. Otherwise, if TYPE is 2343 specified by the PROP property, if any. Otherwise, if TYPE is
2344 `local-map' use BUFFER's local map. */ 2344 `local-map' use BUFFER's local map.
2345
2346 POSITION must be in the accessible part of BUFFER. */
2345 2347
2346Lisp_Object 2348Lisp_Object
2347get_local_map (position, buffer, type) 2349get_local_map (position, buffer, type)
@@ -2353,7 +2355,7 @@ get_local_map (position, buffer, type)
2353 int old_begv, old_zv, old_begv_byte, old_zv_byte; 2355 int old_begv, old_zv, old_begv_byte, old_zv_byte;
2354 2356
2355 /* Perhaps we should just change `position' to the limit. */ 2357 /* Perhaps we should just change `position' to the limit. */
2356 if (position > BUF_Z (buffer) || position < BUF_BEG (buffer)) 2358 if (position > BUF_ZV (buffer) || position < BUF_BEGV (buffer))
2357 abort (); 2359 abort ();
2358 2360
2359 /* Ignore narrowing, so that a local map continues to be valid even if 2361 /* Ignore narrowing, so that a local map continues to be valid even if