[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
next-property-change error
From: |
Xavier Sanchez |
Subject: |
next-property-change error |
Date: |
Fri, 21 Aug 2009 07:58:03 -0700 (PDT) |
User-agent: |
G2/1.0 |
Hello all,
I'm writing an html to LaTeX program in elisp that includes the
following function:
(defun xhtlatex-href ()
(re-search-forward "=[\"'\n]*" nil t)
(let ((url (buffer-substring (point) (next-property-change
(point)))))
(sgml-skip-tag-forward 1)
(insert "}")
(sgml-skip-tag-backward 1)
(sgml-delete-tag 1)
(insert (concat "\\href{" url "}{"))))
There's another function that finds the "<a", then calls the above
function if "href" follows.
When I load the file and run the program the first time it stops at
the "<a" and gives the error:
let: Wrong type argument: integer-or-marker-p, nil
This only happens once; subsequent runs work as expected.
For what it's worth, I've found that doing a minibuffer evaluation of
(next-property-change (point)) at some point in the buffer before the
first run of the program enables execution up to that point.
I haven't made sense of this yet, can anyone else?
Thanks
- next-property-change error,
Xavier Sanchez <=