From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: use-package.el -> Emacs core Date: Tue, 10 Nov 2015 08:23:13 -0800 (PST) Message-ID: <98daaa4b-ed25-4748-b570-507c7dbfdece@default> References: <564136F7.2020404@yandex.ru> <877flqe1a4.fsf@gmail.com> <87twoucaxz.fsf@gmail.com> <877flqc9jh.fsf@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1447172645 19630 80.91.229.3 (10 Nov 2015 16:24:05 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 10 Nov 2015 16:24:05 +0000 (UTC) Cc: Emacs developers , Oleh Krehel , Dmitry Gutov To: John Wiegley , Juanma Barranquero Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Nov 10 17:23:53 2015 Return-path: Envelope-to: ged-emacs-devel@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 1ZwBhs-0001Hx-1w for ged-emacs-devel@m.gmane.org; Tue, 10 Nov 2015 17:23:40 +0100 Original-Received: from localhost ([::1]:33875 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwBhr-0002DZ-9r for ged-emacs-devel@m.gmane.org; Tue, 10 Nov 2015 11:23:39 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwBhc-0002DR-LK for emacs-devel@gnu.org; Tue, 10 Nov 2015 11:23:25 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZwBhX-0002Rx-Ks for emacs-devel@gnu.org; Tue, 10 Nov 2015 11:23:24 -0500 Original-Received: from aserp1040.oracle.com ([141.146.126.69]:47161) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZwBhX-0002Rg-EK for emacs-devel@gnu.org; Tue, 10 Nov 2015 11:23:19 -0500 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 tAAGNH9A004349 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Tue, 10 Nov 2015 16:23:17 GMT Original-Received: from userv0121.oracle.com (userv0121.oracle.com [156.151.31.72]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id tAAGNGkx032511 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 10 Nov 2015 16:23:17 GMT Original-Received: from abhmp0014.oracle.com (abhmp0014.oracle.com [141.146.116.20]) by userv0121.oracle.com (8.13.8/8.13.8) with ESMTP id tAAGNEBd013547; Tue, 10 Nov 2015 16:23:15 GMT In-Reply-To: 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-Received-From: 141.146.126.69 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:193880 Archived-At: > package configuration is the one place in Emacs where non-Lisp > programmers (and people who don't want to become programmers) > are forced to use Emacs Lisp to configure Emacs in > ways not allowed by the customization interface. Wrong, in two ways: 1. No one is required to use packages, AFAIK. 2. Binding keys requires Lisp. The Customize UI is not sufficient. (This is unfortunate - there should be a reasonable Customize UI for key bindings.) (Of course, no one is required to bind keys either.) ---- OT ---- FWIW, I use this to let users use Customize to bind keys. I don't claim it is ideal. Just one attempt to provide something. (define-widget 'icicle-key-definition 'lazy "Key definition type for Icicle mode keys. A list of three components: KEY, COMMAND, CONDITION, that represents an `icicle-mode-map' binding of COMMAND according to KEY, if CONDITION evaluates to non-nil. KEY is either a key sequence (string or vector) or a command. COMMAND is a command. CONDITION is a sexp. If KEY is a command, then the binding represented is its remapping to COMMAND." :indent 1 :offset 0 :tag "" :type '(list (choice (key-sequence :tag "Key" :value [ignore]) ;; Use `symbolp' instead of `commandp', in case the ;; library defining the command is not loaded. (restricted-sexp :tag "Command to remap" :match-alternatives (symbolp) :value ignore)) ;; Use `symbolp' instead of `commandp'... (restricted-sexp :tag "Command" :match-alternatives (symbolp) :value ignore) (sexp :tag "Condition"))) Example: (defcustom foo `((,(kbd "C-x m") alpha t) (,(kbd "C-x C-m -") beta t) (,(kbd "C-x C-m +") gamma (require 'toto nil t)) (,(kbd "C-x v -") delta t)) "*List of key bindings for blah..." :type '(repeat icicle-key-definition) :group 'some-group)