From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: michael@cadilhac.name (=?iso-8859-1?Q?Micha=EBl?= Cadilhac) Newsgroups: gmane.emacs.devel Subject: Re: Interactive specs of C functions. Date: Sat, 08 Sep 2007 11:06:10 +0200 Organization: Epita/LRDE Message-ID: <87ps0tttkt.fsf@cadilhac.name> References: <87sl5qr093.fsf@cadilhac.name> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============1788015820==" X-Trace: sea.gmane.org 1189242517 16317 80.91.229.12 (8 Sep 2007 09:08:37 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Sat, 8 Sep 2007 09:08:37 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Sep 08 11:08:37 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1ITwIs-00080q-CJ for ged-emacs-devel@m.gmane.org; Sat, 08 Sep 2007 11:08:34 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ITwIq-0000jZ-8J for ged-emacs-devel@m.gmane.org; Sat, 08 Sep 2007 05:08:32 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1ITwIi-0000jJ-Fl for emacs-devel@gnu.org; Sat, 08 Sep 2007 05:08:24 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1ITwIf-0000io-Qk for emacs-devel@gnu.org; Sat, 08 Sep 2007 05:08:23 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1ITwIf-0000il-IO for emacs-devel@gnu.org; Sat, 08 Sep 2007 05:08:21 -0400 Original-Received: from smtp3-g19.free.fr ([212.27.42.29]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1ITwIb-00061t-Sz; Sat, 08 Sep 2007 05:08:18 -0400 Original-Received: from smtp3-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp3-g19.free.fr (Postfix) with ESMTP id 157A55A175; Sat, 8 Sep 2007 11:08:17 +0200 (CEST) Original-Received: from localhost (ivr94-6-82-230-255-91.fbx.proxad.net [82.230.255.91]) by smtp3-g19.free.fr (Postfix) with ESMTP id A90335A173; Sat, 8 Sep 2007 11:08:16 +0200 (CEST) X-Website: http://michael.cadilhac.name Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAElBMVEVWPh+Tai+5r5YKBAEU CQQzGAtiq7gjAAACR0lEQVQ4jW2UzW7lIAyFzVW8BzTZX5DmCZLuU2H2pMXv/ypzbK7aSh2kRCRf /HNsE0q7Sg+RQ7JFKaqtrRNAl5AIIKe6D5DBqgbmUAe5hBI1wIRFAHjeM0RKtZi7XVVEpb0BSNfA IddChChT5DildSLWOWhY5IEItMnncZgFcUAc/5jjwCMsDosRNdfKPDTFEdVBW8C+RebDb4N5Orio RhM1+11IJyx0ng2+LryFHBMPDQDYHrY6IfGuU3ouiXTQNE8LIJDKOWpNxERTFrggQwRPd7USUsTW fJ0XbR3bdj5KgBYy4SACpxDeUYEUAzLmtJ1iIrD2gczPq8Qomjhsh/RjGIgKIO8p7NITjwlx7WID nsnQe5NeuTvoBpi8LX6vLLOh5icjOHqBypgnuSp7M+RE1agbQKHQr5E2z1WObhYW4gMqeGQL7joM jCf2DxSk5ApADSYHfFF4igNfJZL1z0GKP0FN02s4XiDXr7V5P94W6I9v8MfBOQDmfwAaVYt+x8Da v4DJvX8BAdin3Knm5yMZYAO4ABDkDniZLLfi4P40gP1F0TPGZOu0CGwA1lcowxwlGy6A9705mD0V jHCxwVZT/hYdRJVUGZNlx6l7ScQBTluof6Wj6bsPYlvpwoTvXFD9gHPn2TZPF3ntI2ecxVrW5MrV XiCie5EeNa7BlWu/HNSkprDUva163PHxAv5jyGV7gVzyAghSKOTnat85UIYFICXbD2NV9rRiv0BS tKQsg6OHH4A15F1WW+UHKHHa32h6aPnAm3/pUcWp+WYnTQAAAABJRU5ErkJggg== In-Reply-To: (Richard Stallman's message of "Sat, 08 Sep 2007 03:01:04 -0400") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1.50 (gnu/linux) X-Detected-Kernel: Linux 2.4-2.6 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:78247 Archived-At: --===============1788015820== Content-Type: multipart/signed; boundary="==-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" --==-=-= Content-Type: multipart/mixed; boundary="=-=-=" --=-=-= Richard Stallman writes: > An idea that occurs to me: if the interactive string of a subr starts > with `(', read it to get a sexp and then eval that sexp. This would be cool indeed! Something like that? (fileio.c is changed for the example) --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=c-interactive.patch Content-Transfer-Encoding: quoted-printable ? keyboard.c.M-o Index: callint.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/src/callint.c,v retrieving revision 1.153 diff -c -B -w -r1.153 callint.c *** callint.c 26 Jul 2007 05:27:48 -0000 1.153 =2D-- callint.c 8 Sep 2007 09:05:34 -0000 *************** *** 340,345 **** =2D-- 340,353 ---- lose: wrong_type_argument (Qcommandp, function); } + /* The function has an interactive spec to evaluate. */ + if (*string =3D=3D '(') + { + specs =3D + Fcar (Fread_from_string (make_string (string, strlen (string)), + Qnil, Qnil)); + string =3D 0; + } } else if (COMPILEDP (fun)) { Index: fileio.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D RCS file: /sources/emacs/emacs/src/fileio.c,v retrieving revision 1.588 diff -c -B -w -r1.588 fileio.c *** fileio.c 13 Aug 2007 13:41:17 -0000 1.588 =2D-- fileio.c 8 Sep 2007 09:05:36 -0000 *************** *** 3433,3439 **** return make_number (st.st_mode & 07777); } =20=20 ! DEFUN ("set-file-modes", Fset_file_modes, Sset_file_modes, 2, 2, 0, doc: /* Set mode bits of file named FILENAME to MODE (an integer). Only the 12 low bits of MODE are used. */) (filename, mode) =2D-- 3433,3441 ---- return make_number (st.st_mode & 07777); } =20=20 ! DEFUN ("set-file-modes", Fset_file_modes, Sset_file_modes, 2, 2, ! "(list (read-file-name \"File: \") \ ! (read-number \"Modes: \"))", doc: /* Set mode bits of file named FILENAME to MODE (an integer). Only the 12 low bits of MODE are used. */) (filename, mode) --=-=-= Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable =2D-=20 | Micha=EBl `Micha' Cadilhac | I cannot reproduce this bug, = | | http://michael.cadilhac.name | but I have installed a change = | | JID/MSN: | which I think will fix it. = | `---- michael.cadilhac@gmail.com | -- Kim F. Storm - = --' --=-=-=-- --==-=-= Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.2 (GNU/Linux) iD8DBQFG4mYFUJhDmOfFA3URAlNZAKCDDPOC/HPzXrhBRylJB29sLzAkPQCcCjTf WBnWG8bd1rdlBGMS8k+Xs6o= =zxmU -----END PGP SIGNATURE----- --==-=-=-- --===============1788015820== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Emacs-devel mailing list Emacs-devel@gnu.org http://lists.gnu.org/mailman/listinfo/emacs-devel --===============1788015820==--