1、首先是定义一个函数。看不懂,从网上抄袭过来的。
(defun insert-current-time ()
"Insert the current time"
(interactive "*")
(defun insert-current-time ()
"Insert the current time"
(interactive "*")
(insert (current-time-string)))
2、之后定义这个函数对应的快捷键
(global-set-key "\C-xt" 'insert-current-time)
注意:;; 后面可以写注释