跟着 https://learnxinyminutes.com/docs/zh-cn/elisp-cn/ 学lisp 输入下面这段代码
(defun hello(name)
(insert (format "Hello %s!\n"name)))
(hello"you")
(setq list-of-names '("Sarah""Chloe""Mathilde"))
(car list-of-names)
(cdr list-of-names)
(push "Stephanie" list-of-names)
(defun hello-to-bonjour()
(switch-to-buffer-other-window "*test*")
(erase-buffer)
(mapcar 'hello list-of-names)
(goto-char (point-min))
(while (search-forward "Hello" nil t)
(replace-match "Bonjour")
(other-window 1)))
(hello-to-bonjour)
运行后在另一个window得到:
Bonjour Stephanie!
Hello Sarah!
Hello Chloe!
Hello Mathilde!
为什么没有像教程里那样把每个"Hello"都转成"Bonjour"呢? 我问题出在哪?