From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Dmitry Bogatov <KAction@gnu.org> Newsgroups: gmane.emacs.help Subject: Writing wrapper for defun/cl-defun Date: Fri, 24 Jan 2014 23:30:08 +0400 Organization: Church of GNU Message-ID: <20140124193008.GA31877@localhost> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1390592289 20926 80.91.229.3 (24 Jan 2014 19:38:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 24 Jan 2014 19:38:09 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Fri Jan 24 20:38:16 2014 Return-path: <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org> Envelope-to: geh-help-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 <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>) id 1W6ma0-0000xj-Go for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Jan 2014 20:38:16 +0100 Original-Received: from localhost ([::1]:48654 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org>) id 1W6ma0-00042j-5q for geh-help-gnu-emacs@m.gmane.org; Fri, 24 Jan 2014 14:38:16 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57692) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from <KAction@gnu.org>) id 1W6mWe-0002dl-OZ for help-gnu-emacs@gnu.org; Fri, 24 Jan 2014 14:34:53 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from <KAction@gnu.org>) id 1W6mWW-0002Mm-Gp for help-gnu-emacs@gnu.org; Fri, 24 Jan 2014 14:34:48 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:58062) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from <KAction@gnu.org>) id 1W6mWW-0002Mf-DV for help-gnu-emacs@gnu.org; Fri, 24 Jan 2014 14:34:40 -0500 Original-Received: from [94.76.97.73] (port=43095 helo=localhost) by fencepost.gnu.org with esmtpsa (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from <KAction@gnu.org>) id 1W6mWV-0006yU-NR for help-gnu-emacs@gnu.org; Fri, 24 Jan 2014 14:34:40 -0500 Content-Disposition: inline X-Haskell-Quote: IO String contains a String in the same way that /bin/ls contains a list of files X-Perfect-World: There should be one -- and preferably only one -- obvious way to do it. User-Agent: Mutt/1.5.22 (2013-10-16) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-Mailman-Approved-At: Fri, 24 Jan 2014 14:38:05 -0500 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor <help-gnu-emacs.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/help-gnu-emacs>, <mailto:help-gnu-emacs-request@gnu.org?subject=unsubscribe> List-Archive: <http://lists.gnu.org/archive/html/help-gnu-emacs> List-Post: <mailto:help-gnu-emacs@gnu.org> List-Help: <mailto:help-gnu-emacs-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/help-gnu-emacs>, <mailto:help-gnu-emacs-request@gnu.org?subject=subscribe> Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:95631 Archived-At: <http://permalink.gmane.org/gmane.emacs.help/95631> Hello! Currently, cl-defun allows keywords only after positional arguments. I would like to generalize it. I managed to solve this following way: 1. put to value-slot of symbol actual function definition via (cl-function) 2. define function-slot as macro, that rearranges arguments and `funcall` them to value-slot. Problem is that, for defmacro not to stay on my way, I have to define it (defmacro ,name (&rest args)). So in documentation (C-h f)<describe-function> I lose signature information. Is it any way restore it or more intellegent way to archive the same, something like Python __doc__ attribute? PS. Please, keep me in CC, I am not subscribed. -- Best regards, Dmitry Bogatov <KAction@gnu.org>, Free Software supporter, esperantisto and netiquette guardian. git://kaction.name/rc-files.git GPG: 54B7F00D