From: Richard M. Stallman Date: Thu, 19 Sep 1996 04:25:40 +0000 (+0000) Subject: (imenu--generic-function): Use markers for positions. X-Git-Tag: emacs-20.1~3700 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=cbcf50d2c2d65a55396ab0fc1501588738ccd31c;p=emacs.git (imenu--generic-function): Use markers for positions. --- diff --git a/lisp/imenu.el b/lisp/imenu.el index 323a279efef..876f6f2f061 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -640,8 +640,9 @@ pattern. (index (caddr pat))) (if (and (not found) ; Only allow one entry; (looking-at regexp)) - (let ((beg (match-beginning index)) + (let ((beg (make-marker)) (end (match-end index))) + (set-marker beg (match-beginning index)) (setq found t) (push (cons (buffer-substring-no-properties beg end) beg)