From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Jay Belanger Newsgroups: gmane.emacs.help Subject: Re: calc-embedded-activate Date: Wed, 14 Jan 2004 12:40:20 -0600 Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Message-ID: <87u12ybch7.fsf@truman.edu> References: <87smij32wn.fsf@truman.edu> Reply-To: belanger@truman.edu NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: sea.gmane.org 1074106180 17432 80.91.224.253 (14 Jan 2004 18:49:40 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Wed, 14 Jan 2004 18:49:40 +0000 (UTC) Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Jan 14 19:49:33 2004 Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1Agq56-00055w-00 for ; Wed, 14 Jan 2004 19:49:33 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.24) id 1Agq23-0002cE-Bg for geh-help-gnu-emacs@m.gmane.org; Wed, 14 Jan 2004 13:46:23 -0500 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!newsfeed.berkeley.edu!ucberkeley!newspeer.monmouth.com!nntp.newsfirst.net!newshub.more.net!news.more.net!53ab2750!not-for-mail Original-Newsgroups: gnu.emacs.help User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) Cancel-Lock: sha1:kgdXtq5W+jdU2dFc/GhBkwIew70= Original-Lines: 25 Original-NNTP-Posting-Host: 150.243.170.122 Original-X-Trace: news.more.net 1074105618 150.243.170.122 (Wed, 14 Jan 2004 12:40:18 CST) Original-NNTP-Posting-Date: Wed, 14 Jan 2004 12:40:18 CST Original-Xref: shelby.stanford.edu gnu.emacs.help:120098 Original-To: help-gnu-emacs@gnu.org X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.2 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 Xref: main.gmane.org gmane.emacs.help:16041 X-Report-Spam: http://spam.gmane.org/gmane.emacs.help:16041 Jay Belanger writes: ... > The problem is, if the match is := or => then the parenthesized > expression wasn't matched, and so (match-end 1) returns nil. > The crucial loop begins at line 343 in calc-embed.el, and looks like > (while (re-search-forward pat nil t) > (if (looking-at calc-embedded-open-formula) > (goto-char (match-end 1))) > (setq info (calc-embedded-make-info (point) cbuf nil)) > (or (eq (car-safe (aref info 8)) 'error) > (goto-char (aref info 5)))) > I don't see what the > (if (looking-at calc-embedded-open-formula) > (goto-char (match-end 1))) > is doing there at all. If the parenthesized part of the pattern is > matched, then (match-end 1) will be the point and nothing happens, if > the parenthesized part is not matched, this gives an error. Okay, I was stupid here. The `looking-at' will give new `match-end' data. (Although calc-embedded-open-formula doesn't have any parenthesized expressions, so the (goto-char (match-end 1)) still gives the error. And I still don't see what the `if' is doing there.) Jay