elisp: call command on current file

Я хочу установить ключ в emacs для выполнения команды оболочки для файла в буфере, и восстановить буфер без запроса. Команда оболочки: p4 edit 'currentfilename.ext'

(global-set-key [\C-E] (funcall 'revert-buffer 1 1 1)) 
;; my attempt above to call revert-buffer with a non-nil 
;; argument (ignoring the shell command for now) -- get an init error:
;; Error in init file: error: "Buffer does not seem to be associated with any file"

Совершенно новая для elisp. Из руководства emacs , вот определение revert-buffer:

Command: revert-buffer &optional ignore-auto noconfirm preserve-modes

Спасибо!

10
задан Yasir Arsanukaev 15 January 2011 в 01:31
поделиться