我想覆盖电动模式的行为,只能制作逗号而不是分号。
我目前有
(defun c-no-hanging-semi ()
;; TODO How do I get information about if comma or semicolon was pressed?
nil)
(add-to-list 'c-hanging-semi&comma-criteria 'c-no-hanging-semi)
如果刚刚按下逗号或分号,我如何登记c-no-hanging-semi
?
答案 0 :(得分:1)
除非我误解了要求(?),否则最简单的事情就是阻止;
致电c-electric-semi&comma
(eval-after-load "cc-mode"
'(define-key c-mode-base-map ";" nil))