diff options
| author | Chong Yidong | 2006-10-13 01:45:37 +0000 |
|---|---|---|
| committer | Chong Yidong | 2006-10-13 01:45:37 +0000 |
| commit | eae637ecd36a501b16886434f1a40ac6b3b384c1 (patch) | |
| tree | d887405806c9ceaff7b854eb6262ed914e76796e /src | |
| parent | d81608e0842c2d1646e9b5407c2a308b624da251 (diff) | |
| download | emacs-eae637ecd36a501b16886434f1a40ac6b3b384c1.tar.gz emacs-eae637ecd36a501b16886434f1a40ac6b3b384c1.zip | |
* keymap.c (Fkey_binding): Check Lisp_Object types before doing
XCAR and XINT.
Diffstat (limited to 'src')
| -rw-r--r-- | src/ChangeLog | 5 | ||||
| -rw-r--r-- | src/keymap.c | 16 |
2 files changed, 13 insertions, 8 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 495b55ce41f..30cae45ba84 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2006-10-12 Chong Yidong <cyd@stupidchicken.com> | ||
| 2 | |||
| 3 | * keymap.c (Fkey_binding): Check Lisp_Object types before doing | ||
| 4 | XCAR and XINT. | ||
| 5 | |||
| 1 | 2006-10-12 Romain Francoise <romain@orebokech.com> | 6 | 2006-10-12 Romain Francoise <romain@orebokech.com> |
| 2 | 7 | ||
| 3 | * image.c (xbm_read_bitmap_data): Delete extra semicolon. | 8 | * image.c (xbm_read_bitmap_data): Delete extra semicolon. |
diff --git a/src/keymap.c b/src/keymap.c index 1476859ccd5..11e3e348da5 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -1610,13 +1610,12 @@ specified buffer position instead of point are used. | |||
| 1610 | 1610 | ||
| 1611 | /* We are not interested in locations without event data */ | 1611 | /* We are not interested in locations without event data */ |
| 1612 | 1612 | ||
| 1613 | if (EVENT_HAS_PARAMETERS (event)) { | 1613 | if (EVENT_HAS_PARAMETERS (event)) |
| 1614 | Lisp_Object kind; | 1614 | { |
| 1615 | 1615 | Lisp_Object kind = EVENT_HEAD_KIND (EVENT_HEAD (event)); | |
| 1616 | kind = EVENT_HEAD_KIND (EVENT_HEAD (event)); | 1616 | if (CONSP (XCDR (event)) && EQ (kind, Qmouse_click)) |
| 1617 | if (EQ (kind, Qmouse_click)) | 1617 | position = EVENT_START (event); |
| 1618 | position = EVENT_START (event); | 1618 | } |
| 1619 | } | ||
| 1620 | } | 1619 | } |
| 1621 | 1620 | ||
| 1622 | /* Key sequences beginning with mouse clicks | 1621 | /* Key sequences beginning with mouse clicks |
| @@ -1709,7 +1708,8 @@ specified buffer position instead of point are used. | |||
| 1709 | 1708 | ||
| 1710 | pos = XCDR (string); | 1709 | pos = XCDR (string); |
| 1711 | string = XCAR (string); | 1710 | string = XCAR (string); |
| 1712 | if (XINT (pos) >= 0 | 1711 | if (INTEGERP (pos) |
| 1712 | && XINT (pos) >= 0 | ||
| 1713 | && XINT (pos) < SCHARS (string)) | 1713 | && XINT (pos) < SCHARS (string)) |
| 1714 | { | 1714 | { |
| 1715 | map = Fget_text_property (pos, Qlocal_map, string); | 1715 | map = Fget_text_property (pos, Qlocal_map, string); |