Elisp 函数

elisp 中定义一个函数:

(defun function-name (arguments-list)
  "document string"
  body)

(defun hello-world (name)
  "Say hello to user whose name is NAME."
  (message "Hello, %s" name))

使用 C-h f 可以查看函数的文档。

运行上面这个 hello-world 函数:

(hello-world "Emacser")               ; => "Hello, Emacser"