Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
8932b1c2
Commit
8932b1c2
authored
Jan 01, 2010
by
Chong Yidong
Browse files
* eval.c (run_hook_with_args): Handle the case where the global
value has the obsolete single-function form (Bug#5026).
parent
829f35a5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
26 additions
and
12 deletions
+26
-12
src/ChangeLog
src/ChangeLog
+5
-0
src/eval.c
src/eval.c
+21
-12
No files found.
src/ChangeLog
View file @
8932b1c2
2010-01-01 Chong Yidong <cyd@stupidchicken.com>
* eval.c (run_hook_with_args): Handle the case where the global
value has the obsolete single-function form (Bug#5026).
2009-12-27 Chong Yidong <cyd@stupidchicken.com>
* minibuf.c (Fall_completions): Minor optimization.
...
...
src/eval.c
View file @
8932b1c2
...
...
@@ -2620,7 +2620,6 @@ run_hook_with_args (nargs, args, cond)
enum
run_hooks_condition
cond
;
{
Lisp_Object
sym
,
val
,
ret
;
Lisp_Object
globals
;
struct
gcpro
gcpro1
,
gcpro2
,
gcpro3
;
/* If we are dying or still initializing,
...
...
@@ -2641,7 +2640,7 @@ run_hook_with_args (nargs, args, cond)
}
else
{
globals
=
Qnil
;
Lisp_Object
globals
=
Qnil
;
GCPRO3
(
sym
,
val
,
globals
);
for
(;
...
...
@@ -2654,18 +2653,28 @@ run_hook_with_args (nargs, args, cond)
{
/* t indicates this hook has a local binding;
it means to run the global binding too. */
globals
=
Fdefault_value
(
sym
);
if
(
NILP
(
globals
))
continue
;
for
(
globals
=
Fdefault_value
(
sym
);
CONSP
(
globals
)
&&
((
cond
==
to_completion
)
||
(
cond
==
until_success
?
NILP
(
ret
)
:
!
NILP
(
ret
)));
globals
=
XCDR
(
globals
))
if
(
!
CONSP
(
globals
)
||
EQ
(
XCAR
(
globals
),
Qlambda
))
{
args
[
0
]
=
globals
;
ret
=
Ffuncall
(
nargs
,
args
);
}
else
{
args
[
0
]
=
XCAR
(
globals
);
/* In a global value, t should not occur. If it does, we
must ignore it to avoid an endless loop. */
if
(
!
EQ
(
args
[
0
],
Qt
))
ret
=
Ffuncall
(
nargs
,
args
);
for
(;
CONSP
(
globals
)
&&
((
cond
==
to_completion
)
||
(
cond
==
until_success
?
NILP
(
ret
)
:
!
NILP
(
ret
)));
globals
=
XCDR
(
globals
))
{
args
[
0
]
=
XCAR
(
globals
);
/* In a global value, t should not occur. If it does, we
must ignore it to avoid an endless loop. */
if
(
!
EQ
(
args
[
0
],
Qt
))
ret
=
Ffuncall
(
nargs
,
args
);
}
}
}
else
...
...
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