mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-02-16 17:24:23 +00:00
Set marker insertion type for Imenu markers
* lisp/imenu.el (imenu-default-create-index-function) (imenu--generic-function): Configure Imenu markers to advance their position when characters are inserted at the marker position. (Bug#75072)
This commit is contained in:
parent
6412a5503c
commit
dc4b8d198b
1 changed files with 4 additions and 2 deletions
|
|
@ -583,7 +583,9 @@ The alternate method, which is the one most often used, is to call
|
|||
(and (stringp name)
|
||||
;; [ydi] Updated for imenu-use-markers.
|
||||
(push (cons name
|
||||
(if imenu-use-markers (point-marker) (point)))
|
||||
(if imenu-use-markers
|
||||
(copy-marker (point) t)
|
||||
(point)))
|
||||
index-alist)))
|
||||
index-alist))
|
||||
;; Use generic expression if possible.
|
||||
|
|
@ -688,7 +690,7 @@ depending on PATTERNS."
|
|||
(unless (assoc menu-title index-alist)
|
||||
(push (list menu-title) index-alist))
|
||||
(if imenu-use-markers
|
||||
(setq beg (copy-marker beg)))
|
||||
(setq beg (copy-marker beg t)))
|
||||
(let ((item
|
||||
(if function
|
||||
(nconc (list (match-string-no-properties index)
|
||||
|
|
|
|||
Loading…
Reference in a new issue