当我在缓冲区上按下C-c c
以下代码时,Emacs 抱怨Invalid function: (select-current-line)
. 为什么?
(defun select-current-line ()
"Select the current line"
(interactive)
(end-of-line) ; move to end of line
(set-mark (line-beginning-position)))
(defun my-isend ()
(interactive)
(if (and transient-mark-mode mark-active)
(isend-send)
((select-current-line)
(isend-send)))
)
(global-set-key (kbd "C-c c") 'my-isend)
这并不重要,但对于那些感兴趣的人,这里定义了isend-send 。