From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andrey Tykhonov Newsgroups: gmane.emacs.help Subject: set-temporary-overlay-map doesn't work for me Date: Wed, 27 Nov 2013 23:37:07 +0200 Message-ID: <87y549y1g6.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1385589230 32241 80.91.229.3 (27 Nov 2013 21:53:50 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 27 Nov 2013 21:53:50 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Nov 27 22:53:55 2013 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 1Vln3S-0003sN-4e for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Nov 2013 22:53:54 +0100 Original-Received: from localhost ([::1]:37964 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vln3R-0008NZ-Fg for geh-help-gnu-emacs@m.gmane.org; Wed, 27 Nov 2013 16:53:53 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47376) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vlmys-0007R6-QF for help-gnu-emacs@gnu.org; Wed, 27 Nov 2013 16:49:18 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Vlmyl-0004uf-Fd for help-gnu-emacs@gnu.org; Wed, 27 Nov 2013 16:49:10 -0500 Original-Received: from mail-lb0-f181.google.com ([209.85.217.181]:54059) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Vlmyl-0004uZ-8U for help-gnu-emacs@gnu.org; Wed, 27 Nov 2013 16:49:03 -0500 Original-Received: by mail-lb0-f181.google.com with SMTP id q8so5617790lbi.40 for ; Wed, 27 Nov 2013 13:48:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:subject:date:message-id:user-agent:mime-version :content-type; bh=mcw0PLo2MSdOsEpQ18UEy7lTQDuOqjt6kWOxkw3C300=; b=kWCIr8IZoCq4ynCPy+xeVsiP/boedFXOyK0Euk2OVW4m0i2Kp2qvvTpITBeAQsHPnr PFJTViAWP4oCGnjwp0Xv+5E0JPlriKYMghuE0TfEfeWz771V1QApeOxuRGvYESiA48NB G90XTpuQsQ3pAFw8XAl+z/Bs30E0Jr6ahFlYM4HLbqtgmLKkgb4jMYRF79fq+DH4uqPZ NK+kXVdUYlS+AdnpZoIbaIEV7BOQ3F/3QNlZvhyw0fl1VtxDWwpo8BZFO8yZF1J42nSo /gKyJg8LfFXF/MfMzrtmJfHQzuQ3zSuJ29VT0+g6HD02jLuED9NSlVVeVFwJxFHjwcYI CkAg== X-Received: by 10.112.173.137 with SMTP id bk9mr524776lbc.48.1385588938893; Wed, 27 Nov 2013 13:48:58 -0800 (PST) Original-Received: from demi.gmail ([193.84.22.38]) by mx.google.com with ESMTPSA id qj3sm47111892lbb.1.2013.11.27.13.48.56 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 27 Nov 2013 13:48:56 -0800 (PST) User-agent: mu4e 0.9.9; emacs 24.3.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.85.217.181 X-Mailman-Approved-At: Wed, 27 Nov 2013 16:53:43 -0500 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:94683 Archived-At: Hi all, I have two quite simple functions: (defun my-temp () (interactive) (set-temporary-overlay-map (let ((map (make-sparse-keymap))) (define-key map [mouse-1] 'my-mouse-down) map))) (defun my-mouse-down () (interactive) (message "Word is: %s " (thing-at-point 'word))) I evaluate them, then M-x my-temp RET, then mouse click (left button) on "interactive" world and I'm expecting to see "Word is "interactive"" message in the minibuffer. But no messages appear! I cannot figure out why this code behaves in such way... By the way I have tried (global-set-key [mouse-1] 'my-mouse-down) and this works and I see the message. Also I've tried: (define-key map (kbd "C-c C-c") 'my-mouse-down) and this code also works well. But I need mouse click to be processed and to be processed only once! What trouble with these two functions? P.S.: Values of `overriding-terminal-local-map` and `overriding-local-map` variables are nil. Best regards, Andrey