[Emacs] lisp eval defun




Доброго времени суток. В Emacs если открыть lisp файл, появляется меню lisp и в нем есть пункт eval defun, что нужно прописать в .emacs что бы привязать к нему горячие клавиши?


C-h C-h f

global-set-key is an interactive compiled Lisp function.

(global-set-key KEY COMMAND)

Give KEY a global binding as COMMAND. COMMAND is the command definition to use; usually it is a symbol naming an interactively-callable function. KEY is a key sequence; noninteractively, it is a string or vector of characters or event types, and non-ASCII characters with codes above 127 (such as ISO Latin-1) can be included if you use a vector.

Note that if KEY has a local binding in the current buffer, that local binding will continue to shadow any global binding that you make with this function.

C-h C-h k C-M-x

C-M-x runs the command eval-defun, which is an interactive compiled Lisp function.

It is bound to C-M-x.

(eval-defun EDEBUG-IT)

Evaluate the top-level form containing point, or after point.

If the current defun is actually a call to `defvar' or `defcustom', evaluating it this way resets the variable using its initial value expression even if the variable already has some other value. (Normally `defvar' and `defcustom' do not alter the value if there already is one.) In an analogous way, evaluating a `defface' overrides any customizations of the face, so that it becomes defined exactly as the `defface' expression says.

If `eval-expression-debug-on-error' is non-nil, which is the default, this command arranges for all errors to enter the debugger.

With a prefix argument, instrument the code for Edebug.

If acting on a `defun' for FUNCTION, and the function was instrumented, `Edebug: FUNCTION' is printed in the minibuffer. If not instrumented, just FUNCTION is printed.

If not acting on a `defun', the result of evaluation is displayed in the minibuffer. This display is controlled by the variables `eval-expression-print-length' and `eval-expression-print-level', which see.


C-h k (или M-x describe-key)

потом тыкаешь в меню и он тебе опишет, какая функция вызывается и есть ли к ней привязки

lazyklimm ★★★★★
Вы не можете добавлять комментарии в эту тему. Тема перемещена в архив.