简体   繁体   中英

How to call a function in an elisp program, and follow the interactive path?

If I call ispell-check-version interactively (through Mx ) it got this answer:

@(#) International Ispell Version 3.3.02 12 Jun 2005, ispell.el 3.6 - 7-Jan-2003

Fine. Now let's say I want to call it from a program. I expect to get the same result. But the function behaves differently when not call interactively. Its documentation tells so, and indeed it does. Let's try in the *scratch* buffer (evaluated with Cu Cx Ce ):

(ispell-check-version)

returns me : "/opt/local/lib" !! Not exepected.. How can I make the function behaves and the return the same result now that I call it "programatically" as when I was calling it "interactively" please?

call-interactively是您正在寻找的。

(call-interactively 'ispell-check-version)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM