From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.bugs Subject: bug#21033: 25.0.50; `local-map' property inside `:eval' sexp in mode-line Date: Fri, 10 Jul 2015 14:01:26 -0700 (PDT) Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1436562143 3634 80.91.229.3 (10 Jul 2015 21:02:23 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 10 Jul 2015 21:02:23 +0000 (UTC) To: 21033@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Jul 10 23:02:09 2015 Return-path: Envelope-to: geb-bug-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 1ZDfQv-0003Ya-B1 for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Jul 2015 23:02:09 +0200 Original-Received: from localhost ([::1]:46064 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDfQu-0003bL-JT for geb-bug-gnu-emacs@m.gmane.org; Fri, 10 Jul 2015 17:02:08 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDfQr-0003bG-FQ for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2015 17:02:06 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDfQo-00086T-7f for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2015 17:02:05 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:45023) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDfQo-00086J-4I for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2015 17:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1ZDfQn-0007tn-Pq for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2015 17:02:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Drew Adams Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 10 Jul 2015 21:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 21033 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.143656210530323 (code B ref -1); Fri, 10 Jul 2015 21:02:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 10 Jul 2015 21:01:45 +0000 Original-Received: from localhost ([127.0.0.1]:46469 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZDfQW-0007t0-GO for submit@debbugs.gnu.org; Fri, 10 Jul 2015 17:01:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:50520) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1ZDfQR-0007sY-5F for submit@debbugs.gnu.org; Fri, 10 Jul 2015 17:01:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDfQK-0007sP-TB for submit@debbugs.gnu.org; Fri, 10 Jul 2015 17:01:33 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:44620) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDfQK-0007sJ-Q7 for submit@debbugs.gnu.org; Fri, 10 Jul 2015 17:01:32 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35794) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDfQJ-0003Zq-HL for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2015 17:01:32 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZDfQG-0007qk-CB for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2015 17:01:31 -0400 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:22258) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZDfQG-0007qJ-60 for bug-gnu-emacs@gnu.org; Fri, 10 Jul 2015 17:01:28 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by aserp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id t6AL1Q4d012247 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK) for ; Fri, 10 Jul 2015 21:01:27 GMT Original-Received: from aserv0121.oracle.com (aserv0121.oracle.com [141.146.126.235]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id t6AL1Qeo022752 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL) for ; Fri, 10 Jul 2015 21:01:26 GMT Original-Received: from abhmp0007.oracle.com (abhmp0007.oracle.com [141.146.116.13]) by aserv0121.oracle.com (8.13.8/8.13.8) with ESMTP id t6AL1QYc007110 for ; Fri, 10 Jul 2015 21:01:26 GMT X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6691.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:104903 Archived-At: This might not be a bug, but I cannot seem to figure it out. If it is not, please let me know what I'm missing. This code puts string "abcdefg" in the mode-line with text property `local-map', which has a single key binding to command `foo' for `mouse-2'. (setq global-mode-string '(:eval (let* ((map (make-sparse-keymap)) =09=09 (str "abcdefg")) =09=09(define-key map [mouse-2] 'foo) =09=09(add-text-properties 0 (1- (length str)) =09=09=09=09 `(local-map ,map) str) =09=09str))) (defun foo (ev) (interactive "e") (message "@@@@@@@@@@@@@")) I've fiddled with umpteen variations, but I cannot seem to get the `local-map' property (or the `keymap' property) to have any effect within an `:eval' form. It is perhaps the case that this is simply not supported? I don't see anything in the doc saying that. I'm hoping that I'm just missing something, and there is a simple way to accomplish this. In GNU Emacs 25.0.50.1 (i686-pc-mingw32) of 2015-07-03 on LEG570 Repository revision: 2b848fadd51e805b2f46da64c5958ea7f009048a Windowing system distributor `Microsoft Corp.', version 6.1.7601 Configured using: `configure --host=3Di686-pc-mingw32 --enable-checking=3Dyes,glyphs' Configured features: XPM JPEG TIFF GIF PNG RSVG SOUND NOTIFY ACL GNUTLS LIBXML2 ZLIB TOOLKIT_SCROLL_BARS Important settings: value of $LANG: ENU locale-coding-system: cp1252