diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/keymap.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/keymap.c b/src/keymap.c index a0c28bb0782..88f89cdf72b 100644 --- a/src/keymap.c +++ b/src/keymap.c | |||
| @@ -307,6 +307,11 @@ PARENT should be nil or another keymap.") | |||
| 307 | If we came to the end, add the parent in PREV. */ | 307 | If we came to the end, add the parent in PREV. */ |
| 308 | if (! CONSP (list) || EQ (Qkeymap, XCONS (list)->car)) | 308 | if (! CONSP (list) || EQ (Qkeymap, XCONS (list)->car)) |
| 309 | { | 309 | { |
| 310 | /* If we already have the right parent, return now | ||
| 311 | so that we avoid the loops below. */ | ||
| 312 | if (EQ (XCONS (prev)->cdr, parent)) | ||
| 313 | return parent; | ||
| 314 | |||
| 310 | XCONS (prev)->cdr = parent; | 315 | XCONS (prev)->cdr = parent; |
| 311 | break; | 316 | break; |
| 312 | } | 317 | } |