From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "Drew Adams" Newsgroups: gmane.emacs.help Subject: RE: [emacs-lisp newbie] print-something() -> clipboard? Date: Sun, 20 May 2012 12:20:09 -0700 Message-ID: References: <4FB74988.9000404@easy-emacs.de> <87r4uhxof8.fsf@pobox.com> <871ume7k9x.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1337541638 25864 80.91.229.3 (20 May 2012 19:20:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Sun, 20 May 2012 19:20:38 +0000 (UTC) To: , "'Tom Roche'" Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sun May 20 21:20:37 2012 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SWBgB-0006LP-AG for geh-help-gnu-emacs@m.gmane.org; Sun, 20 May 2012 21:20:35 +0200 Original-Received: from localhost ([::1]:41686 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWBgA-0004gg-OZ for geh-help-gnu-emacs@m.gmane.org; Sun, 20 May 2012 15:20:34 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:41179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWBg5-0004gZ-7l for help-gnu-emacs@gnu.org; Sun, 20 May 2012 15:20:30 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SWBg3-0002eb-Jv for help-gnu-emacs@gnu.org; Sun, 20 May 2012 15:20:28 -0400 Original-Received: from acsinet15.oracle.com ([141.146.126.227]:23786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SWBg3-0002eM-EK for help-gnu-emacs@gnu.org; Sun, 20 May 2012 15:20:27 -0400 Original-Received: from ucsinet21.oracle.com (ucsinet21.oracle.com [156.151.31.93]) by acsinet15.oracle.com (Sentrion-MTA-4.2.2/Sentrion-MTA-4.2.2) with ESMTP id q4KJKLXZ007211 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Sun, 20 May 2012 19:20:22 GMT Original-Received: from acsmt357.oracle.com (acsmt357.oracle.com [141.146.40.157]) by ucsinet21.oracle.com (8.14.4+Sun/8.14.4) with ESMTP id q4KJKKvu011643 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 20 May 2012 19:20:21 GMT Original-Received: from abhmt117.oracle.com (abhmt117.oracle.com [141.146.116.69]) by acsmt357.oracle.com (8.12.11.20060308/8.12.11) with ESMTP id q4KJKKoL005425; Sun, 20 May 2012 14:20:20 -0500 Original-Received: from dradamslap1 (/10.159.217.115) by default (Oracle Beehive Gateway v4.0) with ESMTP ; Sun, 20 May 2012 12:20:20 -0700 X-Mailer: Microsoft Office Outlook 11 In-Reply-To: <871ume7k9x.fsf@pobox.com> Thread-Index: Ac02uZDPk94q5SViQi2k6RFFDRGi8QAA5daw X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-Source-IP: ucsinet21.oracle.com [156.151.31.93] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 141.146.126.227 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:84905 Archived-At: > if I type [C-p b] > (insert bn) > else if I type [C-u C-p b] > (kill-new bn) > > Can that be done with one {function, keychord} definition? > Or must I have 2, like above? If the latter, how to define > [C-u C-p b]? Bind `C-p b' to `foo': (defun foo (&optional arg) "..." (interactive "P") (let ((bn ...)) (if arg (insert bn) (kill-new bn)))) See the Elisp manual, node `Prefix Command Arguments'.