From 08bb5ee241848b0bd9297274f1e76aaaae3245de Mon Sep 17 00:00:00 2001 From: Leo Liu Date: Tue, 26 Mar 2013 10:49:05 +0800 Subject: [PATCH] * lisp/register.el: Move semantic tag handling back to cedet/semantic/senator.el. * lisp/cedet/semantic/senator.el (senator-copy-tag-to-register): Move register handling logic from register.el. (Bug#14052) --- lisp/ChangeLog | 5 +++++ lisp/cedet/ChangeLog | 5 +++++ lisp/cedet/semantic/senator.el | 8 +++++++- lisp/register.el | 13 ------------- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index b6ec0480a2c..3f7e3efa424 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,8 @@ +2013-03-26 Leo Liu + + * register.el: Move semantic tag handling back to + cedet/semantic/senator.el. (Bug#14052) + 2013-03-26 Stefan Monnier * eshell/em-prompt.el (eshell-emit-prompt): Make sure we can't insert diff --git a/lisp/cedet/ChangeLog b/lisp/cedet/ChangeLog index 3991a98d3f4..8b914e8843e 100644 --- a/lisp/cedet/ChangeLog +++ b/lisp/cedet/ChangeLog @@ -1,3 +1,8 @@ +2013-03-26 Leo Liu + + * semantic/senator.el (senator-copy-tag-to-register): Move + register handling logic from register.el. (Bug#14052) + 2013-03-21 Eric Ludlam * semantic.el (navigate-menu): Yank Tag :enable. Make sure diff --git a/lisp/cedet/semantic/senator.el b/lisp/cedet/semantic/senator.el index a79e70a7f61..157223ff192 100644 --- a/lisp/cedet/semantic/senator.el +++ b/lisp/cedet/semantic/senator.el @@ -727,7 +727,13 @@ kill ring." (semantic-fetch-tags) (let ((ft (semantic-obtain-foreign-tag))) (when ft - (set-register register ft) + (set-register + register (registerv-make + ft + :insert-func #'semantic-insert-foreign-tag + :jump-func (lambda (v) + (switch-to-buffer (semantic-tag-buffer v)) + (goto-char (semantic-tag-start v))))) (if kill-flag (kill-region (semantic-tag-start ft) (semantic-tag-end ft)))))) diff --git a/lisp/register.el b/lisp/register.el index ae2f7cf3e2a..4876c614642 100644 --- a/lisp/register.el +++ b/lisp/register.el @@ -31,10 +31,6 @@ (eval-when-compile (require 'cl-lib)) -(declare-function semantic-insert-foreign-tag "semantic/tag" (foreign-tag)) -(declare-function semantic-tag-buffer "semantic/tag" (tag)) -(declare-function semantic-tag-start "semantic/tag" (tag)) - ;;; Code: (cl-defstruct @@ -174,11 +170,6 @@ delete any existing frames that the frame configuration doesn't mention. (error "Register access aborted")) (find-file (nth 1 val)) (goto-char (nth 2 val))) - ((and (fboundp 'semantic-foreign-tag-p) - semantic-mode - (semantic-foreign-tag-p val)) - (switch-to-buffer (semantic-tag-buffer val)) - (goto-char (semantic-tag-start val))) (t (error "Register doesn't contain a buffer position or configuration"))))) @@ -349,10 +340,6 @@ Interactively, second arg is non-nil if prefix arg is supplied." (princ val (current-buffer))) ((and (markerp val) (marker-position val)) (princ (marker-position val) (current-buffer))) - ((and (fboundp 'semantic-foreign-tag-p) - semantic-mode - (semantic-foreign-tag-p val)) - (semantic-insert-foreign-tag val)) (t (error "Register does not contain text")))) (if (not arg) (exchange-point-and-mark))) -- 2.39.2