Subject: bug#14052: closed (Re: bug#14052: 24.3; [PATCH] Cleanup for register.el)

From: [email-masked] (GNU bug Tracking System)
Date: Tue, 26 Mar 2013 02:57:03 +0000

Your bug report

#14052: 24.3; [PATCH] Cleanup for register.el

which was filed against the emacs package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
14052: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=14052
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: bug#14052: 24.3; [PATCH] Cleanup for register.el
From: Leo Liu <[email-masked]>
To: David Engster <[email-masked]>
Cc: Stefan Monnier <[email-masked]>, [email-masked]
Date: Tue, 26 Mar 2013 10:54:01 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

Fixed in trunk.

On 2013-03-26 05:15 +0800, David Engster wrote:
> Since which version is registerv-make supported? I couldn't find
> anything in NEWS.

It was added on 26 Jun 2011. I am not sure if it is in 23.4 release but
definitely in 24.x releases.

Thanks.
Leo

Subject: 24.3; [PATCH] Cleanup for register.el
From: Leo Liu <[email-masked]>
To: [email-masked]
Date: Mon, 25 Mar 2013 23:41:09 +0800
List-Id: <debbugs-submit.debbugs.gnu.org>

I would like to install the following cleanup for register.el.

David, could you help check the change to senator.el? Thanks.

Leo

diff --git a/lisp/cedet/semantic/senator.el b/lisp/cedet/semantic/senator.el
index a79e70a7..157223ff 100644
--- a/lisp/cedet/semantic/senator.el
+++ b/lisp/cedet/semantic/senator.el
@@ -727,7 +727,13 @@ (defun senator-copy-tag-to-register (register &optional kill-flag)
   (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 ae2f7cf3..4876c614 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 @@ (defun jump-to-register (register &optional delete)
 	  (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 @@ (defun insert-register (register &optional arg)
       (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)))