GNU bug report logs - #14052
24.3; [PATCH] Cleanup for register.el

Previous Next

Package: emacs;

Reported by: Leo Liu <sdl.web <at> gmail.com>

Date: Mon, 25 Mar 2013 15:44:02 UTC

Severity: normal

Tags: patch

Found in version 24.3

Done: Leo Liu <sdl.web <at> gmail.com>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 14052 in the body.
You can then email your comments to 14052 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to deng <at> randomsample.de, bug-gnu-emacs <at> gnu.org:
bug#14052; Package emacs. (Mon, 25 Mar 2013 15:44:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Leo Liu <sdl.web <at> gmail.com>:
New bug report received and forwarded. Copy sent to deng <at> randomsample.de, bug-gnu-emacs <at> gnu.org. (Mon, 25 Mar 2013 15:44:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Leo Liu <sdl.web <at> gmail.com>
To: bug-gnu-emacs <at> gnu.org
Subject: 24.3; [PATCH] Cleanup for register.el
Date: Mon, 25 Mar 2013 23:41:09 +0800
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)))




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14052; Package emacs. (Mon, 25 Mar 2013 19:07:01 GMT) Full text and rfc822 format available.

Message #8 received at 14052 <at> debbugs.gnu.org (full text, mbox):

From: Stefan Monnier <monnier <at> iro.umontreal.ca>
To: Leo Liu <sdl.web <at> gmail.com>
Cc: 14052 <at> debbugs.gnu.org, David Engster <deng <at> randomsample.de>
Subject: Re: bug#14052: 24.3; [PATCH] Cleanup for register.el
Date: Mon, 25 Mar 2013 15:04:31 -0400
> I would like to install the following cleanup for register.el.

Looks good to me, thank you (assuming the CEDET guys can deal with the
compatibility issues).


        Stefan




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14052; Package emacs. (Mon, 25 Mar 2013 21:19:01 GMT) Full text and rfc822 format available.

Message #11 received at 14052 <at> debbugs.gnu.org (full text, mbox):

From: David Engster <deng <at> randomsample.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 14052 <at> debbugs.gnu.org, Leo Liu <sdl.web <at> gmail.com>
Subject: Re: bug#14052: 24.3; [PATCH] Cleanup for register.el
Date: Mon, 25 Mar 2013 22:15:51 +0100
Stefan Monnier writes:
>> I would like to install the following cleanup for register.el.
>
> Looks good to me, thank you (assuming the CEDET guys can deal with the
> compatibility issues).

Since which version is registerv-make supported? I couldn't find
anything in NEWS.

Well, I guess we would have to advice jump-to-register and
insert-register on older Emacsen... But I can understand why you want to
get rid of those Semantic things in register.el, so go ahead and thanks
for the heads up.

-David




Information forwarded to bug-gnu-emacs <at> gnu.org:
bug#14052; Package emacs. (Mon, 25 Mar 2013 21:33:02 GMT) Full text and rfc822 format available.

Message #14 received at 14052 <at> debbugs.gnu.org (full text, mbox):

From: David Engster <deng <at> randomsample.de>
To: Stefan Monnier <monnier <at> iro.umontreal.ca>
Cc: 14052 <at> debbugs.gnu.org, Leo Liu <sdl.web <at> gmail.com>
Subject: Re: bug#14052: 24.3; [PATCH] Cleanup for register.el
Date: Mon, 25 Mar 2013 22:30:34 +0100
David Engster writes:
> Well, I guess we would have to advice jump-to-register and
> insert-register on older Emacsen...

Sorry, I was confused. We won't have to advice anything, of course, so
please go ahead and install it.

-David




Reply sent to Leo Liu <sdl.web <at> gmail.com>:
You have taken responsibility. (Tue, 26 Mar 2013 02:57:02 GMT) Full text and rfc822 format available.

Notification sent to Leo Liu <sdl.web <at> gmail.com>:
bug acknowledged by developer. (Tue, 26 Mar 2013 02:57:03 GMT) Full text and rfc822 format available.

Message #19 received at 14052-done <at> debbugs.gnu.org (full text, mbox):

From: Leo Liu <sdl.web <at> gmail.com>
To: David Engster <deng <at> randomsample.de>
Cc: Stefan Monnier <monnier <at> iro.umontreal.ca>, 14052-done <at> debbugs.gnu.org
Subject: Re: bug#14052: 24.3; [PATCH] Cleanup for register.el
Date: Tue, 26 Mar 2013 10:54:01 +0800
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




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 23 Apr 2013 11:24:03 GMT) Full text and rfc822 format available.

This bug report was last modified 11 years and 26 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.