Fix Emacs in Windows

This commit is contained in:
Roey Darwish Dror
2019-11-18 21:56:57 +02:00
parent 2b63434416
commit eff717e4aa

View File

@@ -41,18 +41,24 @@ impl Emacs {
print_separator("Emacs"); print_separator("Emacs");
// Convert the whitespace in the emacs lisp code to NONBREAKING SPACE. let mut command = run_type.execute(&emacs);
let escaped: String = EMACS_UPGRADE
.chars()
.map(|c| if c.is_whitespace() { '\u{00a0}' } else { c })
.collect();
run_type command
.execute(&emacs) .args(&["--batch", "--debug-init", "-l"])
.args(&["--batch", "-l"])
.arg(init_file) .arg(init_file)
.arg("--eval") .arg("--eval");
.arg(escaped)
.check_run() #[cfg(unix)]
command.arg(
EMACS_UPGRADE
.chars()
.map(|c| if c.is_whitespace() { '\u{00a0}' } else { c })
.collect(),
);
#[cfg(not(unix))]
command.arg(EMACS_UPGRADE);
command.check_run()
} }
} }