0

我的.viper文件中有以下功能和键绑定:

(defun th-change-to-regexp (regexp)
  (interactive "s")
  (kill-region (point) (progn
                         (re-search-forward regexp nil nil 1)
                         (- (point) 1)))
  (backward-char)
  (viper-insert))

(define-key viper-vi-global-user-map "ct" 'th-change-to-regexp)

我在viper-insert我认为的命令上收到以下错误 -

Wrong number of arguments: #[(arg) "Ä \210^H\211^X\204^M^@Å\202(^@^H:\203'@\203^^^@H
@Æ\232\203\"^@Å\202(^@^H@\202(^@^H)^YÇÈ ÉÊ\211\211¯^F!\210Ë=\203S@ \211^[ÌV
\205O^@ÊÍÎ\217\210^KS\211^S\202>^@)\202U^@Ï )\207"  
[arg val viper-intermediate-command count viper-set-complex-command-for-undo 1 (nil) 
viper-set-destructive-command viper-insert 114 ...] 8 ("/contrib/projects/emacs23/32bit
/share/emacs/23.1/lisp/emulation/viper-cmd.elc" . 54774) "P"], 0
4

1 回答 1

2

我不是毒蛇用户,所以我可能完全不关心这个,但viper-insert需要 1 个必需的参数,而且你没有给它任何参数。您可以将当前前缀参数发送给它

(viper-insert current-prefix-arg) 
于 2010-02-26T03:34:27.147 回答