From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuta Yamada Newsgroups: gmane.emacs.devel Subject: Re: mykie.el Date: Sun, 12 Jan 2014 13:32:54 -0500 (EST) Message-ID: <20140112.133254.850101285968458569.cokesboy@gmail.com> References: <20140111.152304.360452170500751637.cokesboy@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1389551587 12607 80.91.229.3 (12 Jan 2014 18:33:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 12 Jan 2014 18:33:07 +0000 (UTC) Cc: tzz@lifelogs.com, emacs-devel@gnu.org To: monnier@iro.umontreal.ca Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 12 19:33:14 2014 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 1W2PqS-0001MV-Pw for ged-emacs-devel@m.gmane.org; Sun, 12 Jan 2014 19:33:12 +0100 Original-Received: from localhost ([::1]:38984 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2PqS-0005NQ-DE for ged-emacs-devel@m.gmane.org; Sun, 12 Jan 2014 13:33:12 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33048) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2PqK-0005NG-KB for emacs-devel@gnu.org; Sun, 12 Jan 2014 13:33:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1W2PqE-0004G1-Qz for emacs-devel@gnu.org; Sun, 12 Jan 2014 13:33:04 -0500 Original-Received: from mail-ie0-x229.google.com ([2607:f8b0:4001:c03::229]:47931) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1W2PqE-0004Fx-JJ for emacs-devel@gnu.org; Sun, 12 Jan 2014 13:32:58 -0500 Original-Received: by mail-ie0-f169.google.com with SMTP id e14so7286812iej.28 for ; Sun, 12 Jan 2014 10:32:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:message-id:to:cc:subject:from:in-reply-to:references :mime-version:content-type:content-transfer-encoding; bh=0B/W30GORUmZeddxcNASddmMdwV1H0ZFIfQ8FhmZ9Jg=; b=u3eJW88Ou5Xm4ifCAGE03hlGJbnc/KD3+N9Lrglqymi/Da7/8MUZ6NzGx0sQHOkLEv 0QNVr0Wz7QhfyWeHIHSIkCZZ1ZTOCKB8wZ4Gk+7RMdX6WubABQKA8afsOrIZbWtyp7qH uc29nF7dEYPE+231rZoUurFug8M//ne52f0NHGVhti2asLkUlf+fVEu6mi1REtEEokpV 0OLDki9nwazBDtbrN3aoRTZMD470fPTVGekpDVFXu8+PKFRaDqUt04wZJXWf630UeK2k hVzhhhopqID0m6xekrRh3w0LyvYAVfem76YJVvcu8qD2V87gprW8Pk9hysaFNYmZdG7Q 1Row== X-Received: by 10.50.60.4 with SMTP id d4mr15183801igr.14.1389551577378; Sun, 12 Jan 2014 10:32:57 -0800 (PST) Original-Received: from localhost (CPE7cb21bcc146d-CM7cb21bcc146a.cpe.net.cable.rogers.com. [99.231.90.84]) by mx.google.com with ESMTPSA id ml2sm14208781igb.10.2014.01.12.10.32.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 12 Jan 2014 10:32:56 -0800 (PST) In-Reply-To: X-Mailer: Mew version 6.5 on Emacs 24.3 / Mule 6.0 (HANACHIRUSATO) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:4001:c03::229 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:168214 Archived-At: > > (mykie:define-key* global-map "C-j" > Why this instead of > (define-key global-map "C-j" (mykie There is a problem. Mew.el that is Emacs mailer check function name whether the name contain self-insert-command.(http://www.mew.org/en/) (I don't know how many program does check global map's function-name.) If we set keybind to self-insert-command like [a-z], then Mew occur an error. To solve this problem, mykie create function name automatically. But to create function name, use keymap name and key name. If I create the solving function. setting is like this? (define-key global-map (kbd "a") (mykie:combined-command global-map "a" :default self-insert-command :C-u (message "C-u + a"))) User needs extra argument... Or use `advice' to global-set-key, define-key? I might can write more simply. But if nobody care function name, then I could write: (defmacro mykie:combined-command (&rest args) `(lambda () (interactive) (mykei:core (quote ,args)))) (global-set-key (kbd "C-0") (mykie:combined-command :default (message "foo"))) Using anonymous function or named function, which is recommending? I think we might create function to lookup the keybind information if we choose named function. Yuta