From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Artur Malabarba Newsgroups: gmane.emacs.devel Subject: Re: Package initialization Date: Sun, 19 Jul 2015 13:33:37 +0100 Message-ID: References: <87twt1dmxu.fsf@uwakimon.sk.tsukuba.ac.jp> <87oaj8s9ho.fsf@fencepost.gnu.org> <87fv4ks60h.fsf@fencepost.gnu.org> Reply-To: bruce.connor.am@gmail.com NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: ger.gmane.org 1437309235 25996 80.91.229.3 (19 Jul 2015 12:33:55 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 19 Jul 2015 12:33:55 +0000 (UTC) Cc: "Stephen J. Turnbull" , Helmut Eller , emacs-devel To: David Kastrup Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jul 19 14:33:55 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 1ZGnn0-0000K7-6N for ged-emacs-devel@m.gmane.org; Sun, 19 Jul 2015 14:33:54 +0200 Original-Received: from localhost ([::1]:51419 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGnmy-0000fF-Qx for ged-emacs-devel@m.gmane.org; Sun, 19 Jul 2015 08:33:52 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55780) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGnmn-0000ew-3n for emacs-devel@gnu.org; Sun, 19 Jul 2015 08:33:41 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZGnmm-0006wD-AK for emacs-devel@gnu.org; Sun, 19 Jul 2015 08:33:41 -0400 Original-Received: from mail-la0-x22e.google.com ([2a00:1450:4010:c03::22e]:33624) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZGnmk-0006vZ-Sj; Sun, 19 Jul 2015 08:33:39 -0400 Original-Received: by laem6 with SMTP id m6so83234928lae.0; Sun, 19 Jul 2015 05:33:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:reply-to:sender:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; bh=Y/XxqmfkXVT8jKYwUCRtE9la38HZswTYDSeIraTJGZk=; b=azZAWI6Mm6CMUQ71vnMKPjN/avG47mGIEIdTumAY5OBAjSw/ovtUiZkQYp/1PlLDeJ 5p2PARO2pm8EaUEVzv9VTKhkSL2puh66TaKE/zm+77+VyMtP+5+fNjVcxFxHo9jnAVZW c+U+uT7gnCyx9+NoOskQ1jrcYNRlScAn9v3kKHej95gJt++RERx3isSFggeDc1ErlLJ9 I5OSngZ17t78pzXjFo5e+Jukh84m3C8wRObPy5eUBiFgxvVJyJujca31DmTITTaJ0dn2 9/ZFgBaunm6hravoon8QwN2hJvYn10BsF1ZQZN4NL248uH4JZ9V0bvWovPeqNlMWTi5f LJ6A== X-Received: by 10.112.138.199 with SMTP id qs7mr23039004lbb.21.1437309217991; Sun, 19 Jul 2015 05:33:37 -0700 (PDT) Original-Received: by 10.25.134.139 with HTTP; Sun, 19 Jul 2015 05:33:37 -0700 (PDT) In-Reply-To: <87fv4ks60h.fsf@fencepost.gnu.org> X-Google-Sender-Auth: roq7G83QKaqrllQlXwI58kiuEYU X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::22e 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:187989 Archived-At: >>> Any personal keybinding would override an autoloaded keymap entry anyway >> >> I think that depends on which code runs first. > > Autoloads don't overwrite already loaded proper code. They only > overwrite previous autoloads. That depends on what's autoloaded. Autoloads don't overwrite function or prefix keymap definitions. But if the package developer autoloads an arbitrary code snippet (like say, `(define-key some-map "k" #'some-func)'), then that code will be run as is. > So you would have to both > a) define your own bindings with an autoloading keymap (why would you do > that?) > b) load libraries with autoloads _after_ defining your own autoloads > (why would you do that?) If a library autoloads a call to `define-key', that code will be executed at the end of emacs initialization (by default). Then, if the user has a call to `define-key' in his init file for the same key and keymap, that will get overwriten by the autoload (by no fault of the user).