[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] trunk r115119: Fix bug #15907 with crashes due to after-ch
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] trunk r115119: Fix bug #15907 with crashes due to after-change-functions. |
Date: |
Sat, 16 Nov 2013 09:28:36 +0000 |
User-agent: |
Bazaar (2.6b2) |
------------------------------------------------------------
revno: 115119
revision-id: address@hidden
parent: address@hidden
fixes bug: http://debbugs.gnu.org/15907
committer: Eli Zaretskii <address@hidden>
branch nick: trunk
timestamp: Sat 2013-11-16 11:27:19 +0200
message:
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.
modified:
src/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1438
src/keymap.c keymap.c-20091113204419-o5vbwnq5f7feedwu-219
=== modified file 'src/ChangeLog'
--- a/src/ChangeLog 2013-11-15 18:01:04 +0000
+++ b/src/ChangeLog 2013-11-16 09:27:19 +0000
@@ -1,3 +1,8 @@
+2013-11-16 Eli Zaretskii <address@hidden>
+
+ * 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 <address@hidden>
* data.c: Work around bogus GCC diagnostic about shift count.
=== modified file 'src/keymap.c'
--- a/src/keymap.c 2013-08-11 01:30:20 +0000
+++ b/src/keymap.c 2013-11-16 09:27:19 +0000
@@ -3383,9 +3383,12 @@
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);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] trunk r115119: Fix bug #15907 with crashes due to after-change-functions.,
Eli Zaretskii <=