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)
注意:;; 后面可以写注释
本文介绍如何在Emacs编辑器中定义一个函数用于插入当前时间,并设置对应的快捷键。
1546

被折叠的 条评论
为什么被折叠?



