如何在使用cscope之后返回以前的代码,比如在Emacs中查找函数的定义?

时间:2012-08-03 14:52:33

标签: emacs cscope

如何在使用cscope后返回上一个位置,比如在Emacs中查找函数的定义?因为我想在了解一些函数的定义后继续阅读以下代码。

1 个答案:

答案 0 :(得分:1)

在调用cscope之前,您可能需要:(环形插入标记标记环(点标记))。

我有这个:

(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)