aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1996-06-12 21:47:59 +0000
committerRichard M. Stallman1996-06-12 21:47:59 +0000
commit2a5af1cf4fe26c2f7518e2be34380c7439dc5ca3 (patch)
treefb1e8f853f7b222656453799c57b075a6067b62d /src
parentb64d74423e8b9c7e680adb88f4325b66f48c5b0c (diff)
downloademacs-2a5af1cf4fe26c2f7518e2be34380c7439dc5ca3.tar.gz
emacs-2a5af1cf4fe26c2f7518e2be34380c7439dc5ca3.zip
(Fset_keymap_parent): Return early if KEYMAP already has the proper parent.
Diffstat (limited to 'src')
-rw-r--r--src/keymap.c5
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 }