From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Thien-Thi Nguyen Newsgroups: gmane.emacs.help Subject: Re: first steps in elisp Date: Wed, 21 Dec 2016 18:57:00 +0100 Message-ID: <87a8bptbbn.fsf@zigzag.favinet> References: <271a22de-593b-479d-a3d7-4aecbce934fb@googlegroups.com> Reply-To: help-gnu-emacs@gnu.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha1; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1482352376 3974 195.159.176.226 (21 Dec 2016 20:32:56 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Wed, 21 Dec 2016 20:32:56 +0000 (UTC) User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cc: help-gnu-emacs@gnu.org To: Mark Piffer Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Dec 21 21:32:53 2016 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cJnZ7-0008Bo-S2 for geh-help-gnu-emacs@m.gmane.org; Wed, 21 Dec 2016 21:32:45 +0100 Original-Received: from localhost ([::1]:58887 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJnZC-00044z-Bj for geh-help-gnu-emacs@m.gmane.org; Wed, 21 Dec 2016 15:32:50 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56161) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cJnXB-0001qq-12 for help-gnu-emacs@gnu.org; Wed, 21 Dec 2016 15:30:46 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cJnX7-0007OB-AY for help-gnu-emacs@gnu.org; Wed, 21 Dec 2016 15:30:44 -0500 Original-Received: from mail.agora-net.com ([67.59.132.6]:40454) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cJnX7-0007MR-32 for help-gnu-emacs@gnu.org; Wed, 21 Dec 2016 15:30:41 -0500 Original-Received: from ttn by mail.agora-net.com with local (Exim 4.82) (envelope-from ) id 1cJnX4-0000Ue-PX; Wed, 21 Dec 2016 15:30:38 -0500 Original-Received: from ttn by zigzag.favinet with local (Exim 4.80) (envelope-from ) id 1cJl8b-0005t6-0t; Wed, 21 Dec 2016 18:57:13 +0100 Mail-Followup-To: help-gnu-emacs@gnu.org In-Reply-To: <271a22de-593b-479d-a3d7-4aecbce934fb@googlegroups.com> (Mark Piffer's message of "Thu, 24 Nov 2016 15:00:59 -0800 (PST)") X-SA-Exim-Connect-IP: X-SA-Exim-Mail-From: ttn@gnuvola.org X-SA-Exim-Scanned: No (on mail.agora-net.com); SAEximRunCond expanded to false X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 67.59.132.6 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "help-gnu-emacs" Xref: news.gmane.org gmane.emacs.help:111994 Archived-At: --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable () Mark Piffer () Thu, 24 Nov 2016 15:00:59 -0800 (PST) (defun ignore-multiline-comment (nlines) DOCSTRING (if (zerop nlines) nil (if (looking-at ".*?\\*/") (progn (goto-char (match-end 0)) (ignore-line-comments nlines)) (beginning-of-line 2) (ignore-multiline-comment (1- nlines))))) In addition to suggestions made by others, i would replace the (current) recursion w/ iteration, so as to future-proof against large =E2=80=98nlines=E2=80=99 (maybe the text has short multiline comments= now, but you never know what weirdness may inspire the programmer to wax eloquent in the future :-D). =2D-=20 Thien-Thi Nguyen ----------------------------------------------- (defun responsep (type via) (case type (technical (eq 'mailing-list via)) ...)) 748E A0E8 1CB8 A748 9BFA =2D-------------------------------------- 6CE4 6703 2224 4C80 7502 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iEYEARECAAYFAlhawnIACgkQZwMiJEyAdQICDwCglxzEl8LoYzpBC4Ib8NssO0Yi G8IAnA4Ff7jv3ujm8XG45T8zYCCA+j1r =2Y7+ -----END PGP SIGNATURE----- --=-=-=--