Reputation: 4373
How to return to the previous position after using the cscope to, like, find a definition of a function in Emacs? Since I wanna continue reading the following codes after I get to know the definitions of some functions.
Upvotes: 0
Views: 175
Reputation: 578
maybe you need to: (ring-insert find-tag-marker-ring (point-marker)) before invoking cscope.
I have this:
(defun mmc-find-tag(&optional prefix)
"union of `find-tag' alternatives. decides upon major-mode"
(interactive "P")
(if (and (boundp 'cscope-minor-mode)
cscope-minor-mode)
(progn
(ring-insert find-tag-marker-ring (point-marker))
;; (push-tag-mark)
(setq cscope-display-cscope-buffer prefix)
(call-interactively
(if prefix
'cscope-find-this-symbol
'cscope-find-global-definition-no-prompting
)))
(call-interactively 'find-tag)))
(substitute-key-definition 'find-tag 'mmc-find-tag global-map)
Upvotes: 1