From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: James N. V. Cash Newsgroups: gmane.emacs.bugs Subject: bug#42052: 28.0.50; tab-bar-mode should be frame-local Date: Sat, 11 Jul 2020 10:45:35 -0400 Message-ID: <87sgdym7ow.fsf@gmail.com> References: <87zh8qq57v.fsf@gmail.com> <87sgegdqmt.fsf@mail.linkov.net> <871rlzwfm2.fsf@gmail.com> <87wo3rug82.fsf@gmail.com> <87pn9idbj2.fsf@mail.linkov.net> <87pn9ivhsa.fsf@gmail.com> <87zh8liggc.fsf@mail.linkov.net> <874kqgpqhq.fsf@gmail.com> <871rlkckq1.fsf@mail.linkov.net> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36860"; mail-complaints-to="usenet@ciao.gmane.io" Cc: , 42052@debbugs.gnu.org, Stefan Monnier To: Juri Linkov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Jul 11 16:46:11 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1juGlW-0009UZ-GX for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Jul 2020 16:46:10 +0200 Original-Received: from localhost ([::1]:37834 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1juGlV-0007Mz-1z for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 11 Jul 2020 10:46:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:38482) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1juGlO-0007Mt-5k for bug-gnu-emacs@gnu.org; Sat, 11 Jul 2020 10:46:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:33233) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1juGlN-0006AH-SY for bug-gnu-emacs@gnu.org; Sat, 11 Jul 2020 10:46:01 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1juGlN-00062M-Q0 for bug-gnu-emacs@gnu.org; Sat, 11 Jul 2020 10:46:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: James N. V. Cash Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 11 Jul 2020 14:46:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 42052 X-GNU-PR-Package: emacs Original-Received: via spool by 42052-submit@debbugs.gnu.org id=B42052.159447874423180 (code B ref 42052); Sat, 11 Jul 2020 14:46:01 +0000 Original-Received: (at 42052) by debbugs.gnu.org; 11 Jul 2020 14:45:44 +0000 Original-Received: from localhost ([127.0.0.1]:44779 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juGl6-00061o-Ct for submit@debbugs.gnu.org; Sat, 11 Jul 2020 10:45:44 -0400 Original-Received: from mail-qk1-f170.google.com ([209.85.222.170]:39825) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1juGl4-00061c-Dm for 42052@debbugs.gnu.org; Sat, 11 Jul 2020 10:45:43 -0400 Original-Received: by mail-qk1-f170.google.com with SMTP id l6so8160480qkc.6 for <42052@debbugs.gnu.org>; Sat, 11 Jul 2020 07:45:42 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:cc:subject:in-reply-to:references :date:message-id:mime-version; bh=KjIjDI/BX07A60WnuxOFY5va3mUL48Qym+rd1M3tE6U=; b=RKWdL9bTOtdjVlt2LMSsS9deATNIXYexPEkAvBVWa8nZtn++vW652HffQ18bQI5eDm /65eNc39gKEgNlxDDo5NoBlyyz7sK5X1OMvD1WNx0InLi0UjMfHWTtsy+Zj6umJehqbe F7C5EAToNqix4i2p8KzJ97eiOI3Jj453am5pu8wLSdcEgBkVHhGL5ep8qgX904WAkIVd AFc7LOK5ygBllKvg4o4m3JIgPx3RLL2DhhvsmLRfb8uzqKLeZAzlSDb8x4KoT4hMmgWP F1S1EqgAQp6US5mnf4Y5qkojavsdIQ6rzcDH9Sc5o5mdAI2YUyajjKt3tk9+aHolieT/ CsWw== X-Gm-Message-State: AOAM5325n9GZL3RFaYfiNwAtiCu8DOP1ZYHa6CwI6/jCucZ+LLP/dqgX QQvBmfN9vvYYL4OLyXX7iu7zFQyK8l91Fw== X-Google-Smtp-Source: ABdhPJzgZpu9DNuaeo4sjMlbhzlZ+eurmRr41akdHlga6vhrT9g4rzx+4uZzXJXV+HzJjkxTKmT5Ig== X-Received: by 2002:a37:9bc9:: with SMTP id d192mr71950365qke.409.1594478736526; Sat, 11 Jul 2020 07:45:36 -0700 (PDT) Original-Received: from gonk ([2607:f2c0:e360:1126:a0e9:4921:f3ee:b2fb]) by smtp.gmail.com with ESMTPSA id v184sm11787594qki.12.2020.07.11.07.45.35 (version=TLS1_2 cipher=ECDHE-ECDSA-CHACHA20-POLY1305 bits=256/256); Sat, 11 Jul 2020 07:45:35 -0700 (PDT) In-Reply-To: <871rlkckq1.fsf@mail.linkov.net> X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:182919 Archived-At: Juri Linkov writes: >> I've attached another patch that makes the key bindings & xpm icons get >> loaded when tab-bar-show is 1 as well. It doesn't un-load the >> keybindings in the way that globalling toggling tab-bar-mode off, but I >> don't really see a sensible way of doing that frame-locally. > > ... > > If the variable `overriding-terminal-local-map` can't be made frame-local, > then maybe a new rule could be added. Then like `(get-char-property (point) 'keymap)` > gets a keymap at point, a new rule could get a keymap from the frame alist. I can look into that as a generally useful addition. For this particular case though, I don't know if it's completely necessary: The functions that are bound to keys here silently do nothing if there's only one tab and the bindings don't get added if there are other bindings for those keys, so as far as I can tell, it shouldn't really make a difference whether or not the bindings are active when the tab bar isn't visible. It is entirely possible I'm missing something though and it certainly does seem "cleaner" to remove the key bindings when they don't need to be there.