From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Drew Adams Newsgroups: gmane.emacs.devel Subject: RE: bug#23873: Emacs 24.0.94: With function argdesc bitstring, Elisp manual does not say how to get arg list Date: Fri, 1 Jul 2016 07:01:34 -0700 (PDT) Message-ID: <4c0a59d3-5158-40ae-9357-a1a4e5c8fe74@default> References: <871t3edfd9.fsf@gmx.net> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1467381779 8824 80.91.229.3 (1 Jul 2016 14:02:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 1 Jul 2016 14:02:59 +0000 (UTC) Cc: 23873@debbugs.gnu.org, emacs-devel To: rswgnu@gmail.com, Richard Stallman Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Fri Jul 01 16:02:47 2016 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 1bIz1p-0008L6-Vv for ged-emacs-devel@m.gmane.org; Fri, 01 Jul 2016 16:02:46 +0200 Original-Received: from localhost ([::1]:33702 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIz1l-0001aE-Iz for ged-emacs-devel@m.gmane.org; Fri, 01 Jul 2016 10:02:41 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35645) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIz0x-0001a6-8i for emacs-devel@gnu.org; Fri, 01 Jul 2016 10:01:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bIz0u-0002Q6-4x for emacs-devel@gnu.org; Fri, 01 Jul 2016 10:01:51 -0400 Original-Received: from userp1040.oracle.com ([156.151.31.81]:43945) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bIz0t-0002PX-R5; Fri, 01 Jul 2016 10:01:48 -0400 Original-Received: from aserv0021.oracle.com (aserv0021.oracle.com [141.146.126.233]) by userp1040.oracle.com (Sentrion-MTA-4.3.2/Sentrion-MTA-4.3.2) with ESMTP id u61E1bVS022858 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 1 Jul 2016 14:01:38 GMT Original-Received: from userv0122.oracle.com (userv0122.oracle.com [156.151.31.75]) by aserv0021.oracle.com (8.13.8/8.13.8) with ESMTP id u61E1buq024428 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Fri, 1 Jul 2016 14:01:37 GMT Original-Received: from abhmp0013.oracle.com (abhmp0013.oracle.com [141.146.116.19]) by userv0122.oracle.com (8.14.4/8.14.4) with ESMTP id u61E1aWR005914; Fri, 1 Jul 2016 14:01:36 GMT In-Reply-To: X-Priority: 3 X-Mailer: Oracle Beehive Extensions for Outlook 2.0.1.9 (901082) [OL 12.0.6744.5000 (x86)] X-Source-IP: aserv0021.oracle.com [141.146.126.233] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic] X-Received-From: 156.151.31.81 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:205039 Archived-At: > In a few places, Hyperbole uses its own function to overload existing > functions with its own and needs access to the function's argument > signature to do this. For reasons of backward compatibility, > Hyperbole has not used defadvice. In another case, we want to know if > a function's signature has changed for a conditional dispatch. Not a general solution, but this approach often works if the signature changed: (condition-case nil ; Emacs 22+ accepts a default. (read-face-name "Face: " default-face) (wrong-number-of-arguments (read-face-name "Face: "))) Or this: (condition-case nil (funcall cmd arg) ; Try to use string candidate `arg'. ;; If that didn't work, use a symbol or number candidate. (wrong-type-argument (funcall cmd (car (read-from-string arg)))) (wrong-number-of-arguments (funcall #'icicle-help-on-candidate))) ; Punt