Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
3015eec0
Commit
3015eec0
authored
Sep 08, 2000
by
Gerd Moellmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(Fset_keymap_parent): Check for cycles in keymap
inheritance.
parent
018fc000
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
1 deletion
+16
-1
src/ChangeLog
src/ChangeLog
+3
-0
src/keymap.c
src/keymap.c
+13
-1
No files found.
src/ChangeLog
View file @
3015eec0
2000-09-08 Gerd Moellmann <gerd@gnu.org>
* keymap.c (Fset_keymap_parent): Check for cycles in keymap
inheritance.
* xdisp.c (try_window_id): When trying to locate cursor in
unchanged rows at the top, handle the case that we can't find it.
...
...
src/keymap.c
View file @
3015eec0
...
...
@@ -307,6 +307,7 @@ DEFUN ("keymap-parent", Fkeymap_parent, Skeymap_parent, 1, 1, 0,
return
Qnil
;
}
/* Set the parent keymap of MAP to PARENT. */
DEFUN
(
"set-keymap-parent"
,
Fset_keymap_parent
,
Sset_keymap_parent
,
2
,
2
,
0
,
...
...
@@ -323,7 +324,18 @@ PARENT should be nil or another keymap.")
GCPRO1
(
keymap
);
if
(
!
NILP
(
parent
))
parent
=
get_keymap_1
(
parent
,
1
,
1
);
{
Lisp_Object
k
;
parent
=
get_keymap_1
(
parent
,
1
,
1
);
/* Check for cycles. */
k
=
parent
;
while
(
KEYMAPP
(
k
)
&&
!
EQ
(
keymap
,
k
))
k
=
Fkeymap_parent
(
k
);
if
(
EQ
(
keymap
,
k
))
error
(
"Cyclic keymap inheritance"
);
}
/* Skip past the initial element `keymap'. */
prev
=
keymap
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment