|
From: | Kevin Rodgers |
Subject: | Re: how to store a elisp procedure in a file and recall it typing a key |
Date: | Wed, 03 Sep 2014 23:09:22 -0600 |
User-agent: | Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
On 9/3/14 4:05 AM, renato.pontefice@gmail.com wrote:
Hi, I would store, the piece of code made in elisp, and recall it by pressing a some special key: i.e. my elisp procedure does a control on the file where it is executed, so if I open a text file, I would made that control on that file. How can i recall it? I do not find the way, asking togoogle :-(
Try the Emacs documentation itself first -- in this case, the "Writing Defuns" node of the Emacs Lisp Intro manual seems to be the best place to start. Here's a starting point (in case it's not obvious, you would store this in your ~/.emacs file): (defun my-command () "Does a control on the current buffer." (some-elisp-function) (some-other-elisp-function and-its-argument and-its-other-argument)) (global-set-key "\C-ca" 'my-command) -- Kevin Rodgers Denver, Colorado, USA
[Prev in Thread] | Current Thread | [Next in Thread] |