help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

set-match-data needs match-data


From: address@hidden
Subject: set-match-data needs match-data
Date: Mon, 16 Jul 2007 12:38:53 -0700
User-agent: G2/1.0

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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]