[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

need help on hobby project

From: Hugh Lawson
Subject: need help on hobby project
Date: Fri, 16 Jan 2015 14:29:13 -0500
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux)

To improve my scanty knowledge of elisp, I want to rewrite a macro as a
function. I can't get to first base on this.  I think I can do this if
given links or keywords for the self-instruction of a noob.

For example I can't make out this:  

(shell-command COMMAND &optional OUTPUT-BUFFER ERROR-BUFFER)

I can't find a reference on how to read this line.

The function  should do this:

I put point  on a word in text buffer.  Then I hit a command
key, say C-l.

2.command key calls function that does this:

          reads word into an accessible place as a string

          shell-command "whitaker <put word string here>"

          latin calls my latin-english dictionary

          the output appears in the shell command buffer

3.  I accomplised this with this  keyboard macro:


;;look up latin words
(fset 'whitaker
   [?\M-x ?c ?o ?p ?y ?- ?w ?o tab return ?\M-x ?s ?h ?e ?l tab ?- ?c ?o ?m ?m 
tab return ?l ?a ?t ?i ?n ?  ?\C-y return])

(global-set-key (kbd "C-l") 'whitaker)

The macro uses the function copy-word, borrowed from here:


reply via email to

[Prev in Thread] Current Thread [Next in Thread]