Commit f532f010 authored by David Byers's avatar David Byers
Browse files

Make lyskom-with-external-functions work when not compiled.

Detailed changes:
> 	* macros.el (lyskom-with-external-functions): Work even if
> 	byte-compile-unresolved-functions is not bound (e.g. in
> 	check-strings.el and when not compiled).
>
parent 6cfd9707
2003-08-17 David Byers <byers@lysator.liu.se>
* macros.el (lyskom-with-external-functions): Work even if
byte-compile-unresolved-functions is not bound (e.g. in
check-strings.el and when not compiled).
Make initial value for reading confs more configurable:
* filter.el (kom-filter-author): Simplified. Initial values are
now computed in completing-read.el, not here.
......
......@@ -218,20 +218,22 @@ All the forms in BIND-LIST are evaluated before any symbols are bound."
(defmacro lyskom-with-external-functions (fns &rest body)
"Ignore warnings about unresolved functions FNS when compiling BODY."
`(progn (eval-when-compile
(setq lyskom-expected-unresolved-functions-temp
(cons (delq nil
(mapcar (lambda (fn)
(if (assq fn byte-compile-unresolved-functions)
nil
fn))
',fns))
lyskom-expected-unresolved-functions-temp)))
(and (boundp 'byte-compile-unresolved-functions)
(setq lyskom-expected-unresolved-functions-temp
(cons (delq nil
(mapcar (lambda (fn)
(if (assq fn byte-compile-unresolved-functions)
nil
fn))
',fns))
lyskom-expected-unresolved-functions-temp))))
,@body
(eval-when-compile
(mapcar (lambda (fn) (and fn (setq byte-compile-unresolved-functions
(delq (assq fn byte-compile-unresolved-functions)
byte-compile-unresolved-functions))))
(car lyskom-expected-unresolved-functions-temp))
(and (boundp 'byte-compile-unresolved-functions)
(mapcar (lambda (fn) (and fn (setq byte-compile-unresolved-functions
(delq (assq fn byte-compile-unresolved-functions)
byte-compile-unresolved-functions))))
(car lyskom-expected-unresolved-functions-temp)))
(setq lyskom-expected-unresolved-functions-temp
(cdr lyskom-expected-unresolved-functions-temp)))))
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment