I have the following piece of Lisp to change the line ending of a given file.
(defun change-eol (fPath, sysName)
(let (myBuffer)
(setq myBuffer (find-file fPath))
(set-buffer-file-coding-system sysName)
(save-buffer)
(kill-buffer myBuffer)
)
)
(change-eol "/home/user/foo.txt" 'mac)
When I execute it, I keep getting this error:
Symbol's value as variable is void: fPath
Could anyone tell me what I did wrong here?
Thanks
函数change-oel的fPath参数后面有一个逗号,请将其删除,函数将按预期工作。
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.