[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: calc-embedded-activate
From: |
Jay Belanger |
Subject: |
Re: calc-embedded-activate |
Date: |
Wed, 14 Jan 2004 12:40:20 -0600 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3.50 (gnu/linux) |
Jay Belanger <belanger@truman.edu> 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