From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: phillip.lord@russet.org.uk (Phillip Lord) Newsgroups: gmane.emacs.help Subject: Re: use-package: load package on key prefix Date: Tue, 10 May 2016 11:26:00 +0200 Message-ID: <874ma6tgbb.fsf@russet.org.uk> References: <20160507140453.2ccfcc44@gauss> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1462964471 30584 80.91.229.3 (11 May 2016 11:01:11 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 11 May 2016 11:01:11 +0000 (UTC) Cc: Help GNU Emacs To: Joe Riel Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed May 11 13:01:02 2016 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 1b0Rsz-0004Ph-PQ for geh-help-gnu-emacs@m.gmane.org; Wed, 11 May 2016 13:01:01 +0200 Original-Received: from localhost ([::1]:51612 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0Rsz-0000Ep-37 for geh-help-gnu-emacs@m.gmane.org; Wed, 11 May 2016 07:01:01 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0Rru-0007Jb-OL for help-gnu-emacs@gnu.org; Wed, 11 May 2016 06:59:55 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b0Rrm-0000a0-74 for help-gnu-emacs@gnu.org; Wed, 11 May 2016 06:59:53 -0400 Original-Received: from cheviot22.ncl.ac.uk ([128.240.234.22]:43039) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b0Rrm-0000Xc-17 for help-gnu-emacs@gnu.org; Wed, 11 May 2016 06:59:46 -0400 Original-Received: from smtpauth-vm.ncl.ac.uk ([10.8.233.129] helo=smtpauth.ncl.ac.uk) by cheviot22.ncl.ac.uk with esmtp (Exim 4.63) (envelope-from ) id 1b0Rrh-0000JC-E2; Wed, 11 May 2016 11:59:41 +0100 Original-Received: from cable-94-189-138-199.dynamic.sbb.rs ([94.189.138.199] helo=localhost) by smtpauth.ncl.ac.uk with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.63) (envelope-from ) id 1b0Rrh-0002jH-2z; Wed, 11 May 2016 11:59:41 +0100 In-Reply-To: <20160507140453.2ccfcc44@gauss> (Joe Riel's message of "Sat, 7 May 2016 14:04:53 -0700") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.93 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 128.240.234.22 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.help:109928 Archived-At: Joe Riel writes: > I use the p4 (perforce) package which uses C-x p as a prefix for its > bound keys. Can use-package be configured so that it loads the > package (which presumably assigns the key-bindings) when C-x p is pressed? You could bind C-x p to a command that loads p4 when pressed, and then unbinds itself. Something like this (untested!)... (use-package p4 :defer t :ensure t :bind ("C-x p" . my-p4-load)) (defun my-p4-load() (require 'p4) (unbind-keys "C-x p"))