These are some good ideas.
Semantic does try to recycle some existing infrastructure.
When available, semantic-ia-fast-jump will call 'push-tag-mark', which
means you can then use pop-tag-mark (M-*) to do this.
Emacs, unfortunately, doesn't have this. However, push-mark is used,
so you can use pop-global-mark to go backward up the mark hierarchy.
That is bound to C-x C-SPC.
I've often thought that some keys that zoom through the stored locations
from semantic-mrub would be cool, but there isn't such a thing.
The simplest solution might be to figure out how to write
'push-tag-mark' so that semantic and other tools can just use it.
On 04/26/2011 03:27 PM, Darren Hoo wrote:
> Mitchel Humpherys<mitch.special@...> writes:
>> Is there a way to drill down and then pop back up?
> just wrapping something around semantic-ia-fast-jump seems trivial
> here's my settings:
> (defvar semantic-tags-location-ring (make-ring 20))
> (defun semantic-goto-definition (point)
> "Goto definition using semantic-ia-fast-jump
> save the pointer marker if tag is found"
> (interactive "d")
> (condition-case err
> (ring-insert semantic-tags-location-ring (point-marker))
> (semantic-ia-fast-jump point))
> ;;if not found remove the tag saved in the ring
> (set-marker (ring-remove semantic-tags-location-ring 0) nil nil)
> (signal (car err) (cdr err)))))
> (defun semantic-pop-tag-mark ()
> "popup the tag save by semantic-goto-definition"
> (if (ring-empty-p semantic-tags-location-ring)
> (message "%s" "No more tags available")
> (let* ((marker (ring-remove semantic-tags-location-ring 0))
> (buff (marker-buffer marker))
> (pos (marker-position marker)))
> (if (not buff)
> (message "Buffer has been deleted")
> (switch-to-buffer buff)
> (goto-char pos))
> (set-marker marker nil nil))))
> and I use the following key-binding to replace the original find-tag
> and pop-tag-mark
> (global-set-key (kbd "M-.") 'semantic-goto-definition)
> (global-set-key (kbd "M-*") 'semantic-pop-tag-mark)
> Hope it helps.
> WhatsUp Gold - Download Free Network Management Software
> The most intuitive, comprehensive, and cost-effective network
> management toolset available today. Delivers lowest initial
> acquisition cost and overall TCO of any competing solution.
> Cedet-devel mailing list