diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/keymap.c | 7 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index f92eb7b85fc..696475c17e5 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2013-11-16 Eli Zaretskii <eliz@gnu.org> | ||
| 2 | |||
| 3 | * keymap.c (describe_map): Don't crash if PT is 1 both before and | ||
| 4 | after inserting the description string. (Bug#15907) | ||
| 5 | |||
| 1 | 2013-11-15 Paul Eggert <eggert@cs.ucla.edu> | 6 | 2013-11-15 Paul Eggert <eggert@cs.ucla.edu> |
| 2 | 7 | ||
| 3 | * data.c: Work around bogus GCC diagnostic about shift count. | 8 | * data.c: Work around bogus GCC diagnostic about shift count. |
diff --git a/src/keymap.c b/src/keymap.c index 7a18cd5d983..562787ee8a5 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -3383,9 +3383,12 @@ describe_map (Lisp_Object map, Lisp_Object prefix, | |||
| 3383 | 3383 | ||
| 3384 | if (vect[i].shadowed) | 3384 | if (vect[i].shadowed) |
| 3385 | { | 3385 | { |
| 3386 | SET_PT (PT - 1); | 3386 | ptrdiff_t pt = max (PT - 1, BEG); |
| 3387 | |||
| 3388 | SET_PT (pt); | ||
| 3387 | insert_string ("\n (that binding is currently shadowed by another mode)"); | 3389 | insert_string ("\n (that binding is currently shadowed by another mode)"); |
| 3388 | SET_PT (PT + 1); | 3390 | pt = min (PT + 1, Z); |
| 3391 | SET_PT (pt); | ||
| 3389 | } | 3392 | } |
| 3390 | } | 3393 | } |
| 3391 | 3394 | ||