From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Rasmus Newsgroups: gmane.emacs.bugs Subject: bug#23736: Add companion to apply-partially Date: Thu, 09 Jun 2016 16:01:59 +0200 Message-ID: <87mvmuzciw.fsf@gmx.us> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1465481010 23627 80.91.229.3 (9 Jun 2016 14:03:30 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 9 Jun 2016 14:03:30 +0000 (UTC) To: 23736@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Jun 09 16:03:17 2016 Return-path: Envelope-to: geb-bug-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 1bB0YG-00068o-VN for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Jun 2016 16:03:17 +0200 Original-Received: from localhost ([::1]:34731 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB0YG-0004NX-5p for geb-bug-gnu-emacs@m.gmane.org; Thu, 09 Jun 2016 10:03:16 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58781) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB0Y6-0004LF-2o for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2016 10:03:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bB0Y2-0007GQ-3n for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2016 10:03:06 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:50643) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB0Y2-0007GD-0i for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2016 10:03:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1bB0Y1-00042a-RX for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2016 10:03:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Rasmus Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 09 Jun 2016 14:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 23736 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.146548094615489 (code B ref -1); Thu, 09 Jun 2016 14:03:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 9 Jun 2016 14:02:26 +0000 Original-Received: from localhost ([127.0.0.1]:34747 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bB0XR-00041l-Up for submit@debbugs.gnu.org; Thu, 09 Jun 2016 10:02:26 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:39232) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1bB0XP-00041Y-VM for submit@debbugs.gnu.org; Thu, 09 Jun 2016 10:02:24 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bB0XK-0006uy-1R for submit@debbugs.gnu.org; Thu, 09 Jun 2016 10:02:18 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:55532) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB0XJ-0006ur-UG for submit@debbugs.gnu.org; Thu, 09 Jun 2016 10:02:17 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:58419) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB0XH-00047i-Ne for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2016 10:02:16 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bB0XC-0006sC-O1 for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2016 10:02:14 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:48078) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bB0XC-0006r3-HT for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2016 10:02:10 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1bB0X9-0005Qz-Hg for bug-gnu-emacs@gnu.org; Thu, 09 Jun 2016 16:02:07 +0200 Original-Received: from 46.166.188.199 ([46.166.188.199]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Jun 2016 16:02:07 +0200 Original-Received: from rasmus by 46.166.188.199 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 09 Jun 2016 16:02:07 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 27 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 46.166.188.199 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAAAAAByaaZbAAAAAmJLR0QA/4ePzL8AAAAJcEhZ cwAAAEgAAABIAEbJaz4AAAEySURBVEjH7ZXRbcMwDETNhW4T7sJJuAtH4Tj31w8jEanIkAoU7U+F AGYUvfDuLMuXfHNcvwwA7w8EmOoZgGUyk0wmM+8LRx3ogHE3vAKI7XpaBQ7WN0lBMtxUVTV4X3up zbSRqfJuhleZo2yx6qufiAhGXcoGIO8A7qHji9b5AjijzMSdhoiIrwEwS2NkFgu2ApxaJmy0A9sv o0Ob9Wohsd2tyPGvfgIoR/TB3D8PJTFkS28NgNXCAWAlGDsBovj0A6CpiAPAiwXkHkAWCyeAsVgA ub1xTfUBoCwWRMmHzVctlxX6PiiegEmDsjVcAM4WyxZAdgng0vV0VKLflIXrASTZ9v8N+CNgH6HE UlM/jKene6XpqgJi3rrdVZcU9XgdLezRA8w+EjHXP3+L/gM/BHwBRqZ1peGC4k8AAAAASUVORK5C YII= User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1.50 (gnu/linux) Cancel-Lock: sha1:NcaSTfo9Jj4l/YCNRRtHAACa7Ao= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:119333 Archived-At: Hi, Could we add an ‘apply-rpartially’ or ‘apply-partially-last’ to subr.el? Like ‘apply-partially’, but fixing the last arguments. This is useful for e.g. ‘set-face-attribute’ where one might a common :inherits to many faces, e.g. (mapc (apply-rpartially ’set-face-attribute :inherit ’fixed-pitch) ’(list of faces)) I have used this in my init.el, (defun apply-rpartially (fun &rest args) "Return a function that is a partial application of FUN to ARGS. ARGS is a list of the last N arguments to pass to FUN. The result is a new function which does the same as FUN, except that the last N arguments are fixed at the values with which this function was called." (lambda (&rest args1) (apply fun (append args1 args)))) If that’s good I can prepare a patch that also has documentation. (I couldn’t find past discussions about such a function) Rasmus -- Don't slow down Johnny, leave the Cadillac runnin'