Fix bug #15907 with crashes due to after-change-functions.
src/keymap.c (describe_map): Don't crash if PT is 1 both before and after inserting the description string.
This commit is contained in:
parent
43cebc237c
commit
3d6dec8d1e
2 changed files with 10 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
2013-11-16 Eli Zaretskii <eliz@gnu.org>
|
||||
|
||||
* keymap.c (describe_map): Don't crash if PT is 1 both before and
|
||||
after inserting the description string. (Bug#15907)
|
||||
|
||||
2013-11-15 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* data.c: Work around bogus GCC diagnostic about shift count.
|
||||
|
|
|
@ -3383,9 +3383,12 @@ describe_map (Lisp_Object map, Lisp_Object prefix,
|
|||
|
||||
if (vect[i].shadowed)
|
||||
{
|
||||
SET_PT (PT - 1);
|
||||
ptrdiff_t pt = max (PT - 1, BEG);
|
||||
|
||||
SET_PT (pt);
|
||||
insert_string ("\n (that binding is currently shadowed by another mode)");
|
||||
SET_PT (PT + 1);
|
||||
pt = min (PT + 1, Z);
|
||||
SET_PT (pt);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue