<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Thanks!  Here's what I'm using now:<div><br></div><div><div><font class="Apple-style-span" face="'Courier New'" size="4"><span class="Apple-style-span" style="font-size: 14px;">; bind Command-Shift-7 to execute PetesLookup and feed it the highlighted string</span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="4"><span class="Apple-style-span" style="font-size: 14px;">(define-key osx-key-mode-map (kbd "A-&")</span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="4"><span class="Apple-style-span" style="font-size: 14px;">  (defun execute-PetesLookup ()</span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="4"><span class="Apple-style-span" style="font-size: 14px;">    "Execute PetesLookup, feeding it the current selected region as a command-line argument."</span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="4"><span class="Apple-style-span" style="font-size: 14px;">    (interactive)</span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="4"><span class="Apple-style-span" style="font-size: 14px;">    (call-process "/Users/siemsen/Applications/PetesLookup.app/Contents/MacOS/PetesLookup" nil nil nil</span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="4"><span class="Apple-style-span" style="font-size: 14px;">                  (buffer-substring (point) (mark)))</span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="4"><span class="Apple-style-span" style="font-size: 14px;">    )</span></font></div><div><font class="Apple-style-span" face="'Courier New'" size="4"><span class="Apple-style-span" style="font-size: 14px;">  )</span></font></div><div><br></div><div>This works and is clearly better, but it smells funny to define a named function when the name is never referenced.  Is there a way to just invoke call-process, without a defun?</div><div><br></div><div>-- Pete</div><div><br></div><div><br></div><div><div>On May 5, 2010, at 7:17 AM, David Reitter wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>On May 5, 2010, at 8:38 AM, Jean-Christophe Helary wrote:<br><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">(define-key osx-key-mode-map (kbd "A-&")<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">       </span>(defun call-PetesLookup ()<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><span class="Apple-tab-span" style="white-space:pre">  </span><span class="Apple-tab-span" style="white-space:pre">    </span>...))<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">but most people don't do that. <br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">But isn't it more lispy than other ways ?<br></blockquote><br>It is!<br><br>In fact I'd prefer it if people used this style for hook functions, rather than lambda terms - because lambda terms are hard if not impossible to remove from a hook variable, while named functions can be removed easily by removing the name with `remove-hook'.<br><br><br>--<br><a href="http://aquamacs.org">http://aquamacs.org</a> -- Aquamacs: Emacs on Mac OS X<br><a href="http://aquamacs.org/donate">http://aquamacs.org/donate</a> -- Could we help you? Return the favor and support the Aquamacs Project!_____________________________________________________________<br>MacOSX-Emacs mailing list<br><a href="mailto:MacOSX-Emacs@email.esm.psu.edu">MacOSX-Emacs@email.esm.psu.edu</a><br>http://email.esm.psu.edu/mailman/listinfo/macosx-emacs<br>List Archives: http://dir.gmane.org/gmane.emacs.macintosh.osx<br></div></blockquote></div><br></div></body></html>