From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: poppyer Newsgroups: gmane.emacs.help Subject: lisp lexical-let related Date: 19 May 2007 05:06:24 +0100 Organization: University Of Oxford, England Message-ID: <1yd50xv4n3.fsf@clpc78.comlab> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1179549642 23091 80.91.229.12 (19 May 2007 04:40:42 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 19 May 2007 04:40:42 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Sat May 19 06:40:41 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1HpGkD-0001W4-5g for geh-help-gnu-emacs@m.gmane.org; Sat, 19 May 2007 06:40:41 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1HpGkB-0004rH-Uv for geh-help-gnu-emacs@m.gmane.org; Sat, 19 May 2007 00:40:39 -0400 Original-Path: shelby.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!feeder.news-service.com!newsfeed.freenet.de!news-in.ntli.net!newsrout1-win.ntli.net!ntli.net!news.highwinds-media.com!xara.net!gxn.net!feed4.jnfs.ja.net!jnfs.ja.net!feeds.news.ox.ac.uk!news.ox.ac.uk!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 21 Original-NNTP-Posting-Host: clpc78.comlab.ox.ac.uk Original-X-Trace: frank-exchange-of-views.oucs.ox.ac.uk 1179547584 13449 163.1.27.212 (19 May 2007 04:06:24 GMT) Original-X-Complaints-To: newsmaster@ox.ac.uk Original-NNTP-Posting-Date: Sat, 19 May 2007 04:06:24 +0000 (UTC) User-Agent: Emacs Gnus Original-Xref: shelby.stanford.edu gnu.emacs.help:148573 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:44165 Archived-At: Hi, all, I try to re-bind TAB key to call (tab) or (m-tab), according to weather it stops at the end of a word. But the following lisp code not working as expected. Any idea? ========== (lexical-let ((tab (key-binding (kbd "TAB"))) (mtab (key-binding (kbd "M-TAB")))) (local-set-key (kbd "TAB") (lambda() (interactive) (if (looking-at "\\>") mtab tab ) ) ) ) ========== --