erc-match-message関数erc-modeを上書きし、それを.emacsファイルに入れました。フックにパラメーターを追加しましたが、実行するとこのエラーが発生しました。erc
error in process filter: Wrong number of arguments: (lambda (match-type
nickuserhost msg notification) (interactive) (if (and (eq match-type
(quote current-nick)) (not notification)) (progn (async-exec-command 
"mpg123 -q /home/kuba/Pobrane/beep-8.mp3") (notify "ERC" msg)))), 3
私のフック関数は次のようになります。
(defun mention-notify (match-type nickuserhost msg notification)
  (interactive)
  (if (and (eq match-type 'current-nick)
           (not notification))
      (progn
        (async-exec-command "mpg123 -q /home/kuba/Pobrane/beep-8.mp3")
        (notify "ERC" msg))))
(1つの追加notificationパラメーター)erc-match-messageを使用して定義を評価すると機能しeval-last-sexpます。
私はこれを持っています
(require 'erc)
(defun erc-match-message ()
   ;; my overwritten function that's defined in erc.el
   ...)
(defun mention-notify (match-type nickuserhost msg notification)
   ;; notify hook handler
   ...)
(defun irc ()
  "Connect to the freenode"
  (interactive)
  (erc :server "barjavel.freenode.net"
       :port 6667
       :nick "jcubic"
       :password "<PASS>"))
(global-set-key (kbd "C-c i")  'irc)
.emacsファイルで定義された関数がrequireを使用して追加された外部ファイルで定義された関数を上書きしないのはなぜですか?