From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Pontus Michael Newsgroups: gmane.emacs.devel Subject: nadvice.el: making add-function applicable to key-binding / using a function as generalized value Date: Tue, 28 Apr 2015 21:09:01 +0300 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1430244574 7782 80.91.229.3 (28 Apr 2015 18:09:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 28 Apr 2015 18:09:34 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Apr 28 20:09:22 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 1Yn9wa-0000jJ-7w for ged-emacs-devel@m.gmane.org; Tue, 28 Apr 2015 20:09:16 +0200 Original-Received: from localhost ([::1]:35341 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn9wU-00045T-8U for ged-emacs-devel@m.gmane.org; Tue, 28 Apr 2015 14:09:10 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:43179) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn9wQ-00045G-Cv for emacs-devel@gnu.org; Tue, 28 Apr 2015 14:09:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Yn9wM-0003RN-WC for emacs-devel@gnu.org; Tue, 28 Apr 2015 14:09:06 -0400 Original-Received: from mail-la0-x234.google.com ([2a00:1450:4010:c03::234]:33460) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Yn9wM-0003Qi-OW for emacs-devel@gnu.org; Tue, 28 Apr 2015 14:09:02 -0400 Original-Received: by layy10 with SMTP id y10so2295111lay.0 for ; Tue, 28 Apr 2015 11:09:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=Wspun2fjtmPmY8GUSXvw1XrE4ULm4l6HpBV6yxeIDuI=; b=LL/V1LSoYEmf1ISKHzQfaBhFqs89VhACxTV02Sr7l8IHY2Pqy4i7Eh45bpraI6yRt/ Fedmo8ur958wOXzBcCGtvfc26vPgTrSQvcquSrm8NIdUa07qVwYQa+4jWQ3w2qwB0EI7 bdkmcd+zCQQ7Nu3hPEEyIOktvEMC6ecnmKNwJAwXmx67QQFioaSk4QJvQfddp//yJf2N c+jc7RUDsYjovtE2r4aZndsEFIc9wC6lVP6hDr1YR2Q8Cwpd5sWUtmDM2xH5KBMmLVIw 6W8J9wib1iAOzOFbFt823Pu+Z/CWPNvjAVXVNgdVuVf3PEGwV1nSCHGTl5PdzNU40opj 2Yug== X-Received: by 10.152.115.173 with SMTP id jp13mr15415266lab.119.1430244541904; Tue, 28 Apr 2015 11:09:01 -0700 (PDT) Original-Received: by 10.112.137.162 with HTTP; Tue, 28 Apr 2015 11:09:01 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2a00:1450:4010:c03::234 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:185980 Archived-At: First problem that I would like to address with this proposal, is the inconvenience faced by the user attempting to alter default args for existing command. And secondly, wouldn't it be logical to expect following form to work? (add-function :filter-args (key-binding [?\M-\(]) (lambda (args) '(1))) If my understanding of how this kitchen works, it would only require implementing gv api for `key-binding' for this to work and probably `lookup-key' along with it. My knowledge about involved technologies is very superficial, and my hope is that someone capable will also see the benefit in it.