雖然有個 (show-paren-mode 1) ,不過只有光標在()上纔有效。
嘗試寫了個函數,C-0 將光標所在的語句刪除,再按一次恢復.
(defun kill-paren ()
"kill matched paren in elisp, repeat undo the kill"
(interactive "*")
(if (eq last-command 'kill-paren)
(undo)
(let (start end)
(save-excursion
(re-search-backward "//s/(")
(setq start (point))
(forward-list)
(setq end (point))
(kill-region start end)
(setq this-command 'kill-paren)))))
(global-set-key [(control ?0)] 'kill-paren)