Function: semantic-mrub-push

semantic-mrub-push is a byte-compiled function defined in mru-bookmark.el.gz.

Signature

(semantic-mrub-push ARG &rest ARGS)

Implementations

((sbr semantic-bookmark-ring) point &optional reason) in `semantic/mru-bookmark.el'.

Add a bookmark to the ring SBR from POINT. REASON is why it is being pushed. See doc for `semantic-bookmark' for possible reasons. The resulting bookmark is then sorted within the ring.

Source Code

;; Defined in /usr/src/emacs/lisp/cedet/semantic/mru-bookmark.el.gz
(cl-defmethod semantic-mrub-push ((sbr semantic-bookmark-ring) point
			       &optional reason)
  "Add a bookmark to the ring SBR from POINT.
REASON is why it is being pushed.  See doc for `semantic-bookmark'
for possible reasons.
The resulting bookmark is then sorted within the ring."
  (let* ((ring (oref sbr ring))
	 (tag (semantic-mrub-find-nearby-tag (point)))
	 (idx 0))
    (when tag
      (while (and (not (ring-empty-p ring)) (< idx (ring-size ring)))
	(if (semantic-tag-similar-p (oref (ring-ref ring idx) tag)
				    tag)
	    (ring-remove ring idx))
	(setq idx (1+ idx)))
      ;; Create a new mark
      (let ((sbm (semantic-bookmark (semantic-tag-name tag)
				    :tag tag)))
	;; Take the mark, and update it for the current state.
	(ring-insert ring sbm)
	(semantic-mrub-update sbm point reason))
      )))