【发布时间】:2014-02-27 05:00:37
【问题描述】:
我正在使用 emacs 在 windows 上尝试一些东西。就我而言,我需要从 elisp 返回带有反斜杠的文件路径。但是elisp总是用斜杠等返回路径。
(expand-file-name "text.log" "d:\\ProgramData\\temp")
=> d:/ProgramData/temp/text.log
我的要求:
(expand-file-name "text.log" "d:\\ProgramData\\temp")
=> d:\ProgramData\temp\text.log
可以用正则表达式完成,但我需要更简单的方法。
【问题讨论】: