unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jay Belanger <belanger@truman.edu>
Subject: Re: calc-embedded-activate
Date: Wed, 14 Jan 2004 12:40:20 -0600	[thread overview]
Message-ID: <87u12ybch7.fsf@truman.edu> (raw)
In-Reply-To: 87smij32wn.fsf@truman.edu


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

  parent reply	other threads:[~2004-01-14 18:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.557.1074026001.928.help-gnu-emacs@gnu.org>
2004-01-13 22:22 ` calc-embedded-activate Jay Belanger
2004-01-14 11:20   ` calc-embedded-activate Roger Mason
     [not found]   ` <mailman.618.1074079249.928.help-gnu-emacs@gnu.org>
2004-01-14 18:27     ` calc-embedded-activate Jay Belanger
2004-01-14 18:40   ` Jay Belanger [this message]
2004-01-13 16:33 calc-embedded-activate Roger Mason

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87u12ybch7.fsf@truman.edu \
    --to=belanger@truman.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).