From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: "spamfilteraccount@gmail.com" Newsgroups: gmane.emacs.help Subject: set-match-data needs match-data Date: Mon, 16 Jul 2007 12:38:53 -0700 Organization: http://groups.google.com Message-ID: <1184614733.340103.3340@o61g2000hsh.googlegroups.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" X-Trace: sea.gmane.org 1184614869 18437 80.91.229.12 (16 Jul 2007 19:41:09 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 16 Jul 2007 19:41:09 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Mon Jul 16 21:41:07 2007 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IAWRO-0003W0-3Q for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Jul 2007 21:41:06 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IAWRN-0001Vy-LU for geh-help-gnu-emacs@m.gmane.org; Mon, 16 Jul 2007 15:41:05 -0400 Original-Path: shelby.stanford.edu!newsfeed.stanford.edu!postnews.google.com!o61g2000hsh.googlegroups.com!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 25 Original-NNTP-Posting-Host: 81.183.146.161 Original-X-Trace: posting.google.com 1184614733 15404 127.0.0.1 (16 Jul 2007 19:38:53 GMT) Original-X-Complaints-To: groups-abuse@google.com Original-NNTP-Posting-Date: Mon, 16 Jul 2007 19:38:53 +0000 (UTC) User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.4) Gecko/20070515 Firefox/2.0.0.4,gzip(gfe),gzip(gfe) Complaints-To: groups-abuse@google.com Injection-Info: o61g2000hsh.googlegroups.com; posting-host=81.183.146.161; posting-account=ps2QrAMAAAA6_jCuRt2JEIpn5Otqf_w0 Original-Xref: shelby.stanford.edu gnu.emacs.help:150153 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:45738 Archived-At: In this font lock function the match data is set properly only if (match-data) is called afterwards. Anyone knows why calling match-data after set-match-data is necessary here? Emacs 22. (defun ipa-font-lock-pos-info (limit) (re-search-forward "^(") (beginning-of-line) (let ((sexp-start (point-marker)) sexp-end colon-end) (forward-sexp) (setq sexp-end (point-marker)) (forward-char) (setq colon-end (point-marker)) (set-match-data (list sexp-start ;; whole colon-end sexp-start ;; sexp sexp-end sexp-end ;; colon colon-end))) (match-data)) http://www.emacswiki.org/cgi-bin/emacs/ipa.el