From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Leo Liu Newsgroups: gmane.emacs.bugs Subject: bug#14052: 24.3; [PATCH] Cleanup for register.el Date: Mon, 25 Mar 2013 23:41:09 +0800 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1364226116 19418 80.91.229.3 (25 Mar 2013 15:41:56 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 25 Mar 2013 15:41:56 +0000 (UTC) Cc: David Engster To: 14052@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Mar 25 16:42:20 2013 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UK9XP-00084q-A1 for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Mar 2013 16:42:19 +0100 Original-Received: from localhost ([::1]:34181 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UK9X1-0007wU-J9 for geb-bug-gnu-emacs@m.gmane.org; Mon, 25 Mar 2013 11:41:55 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UK9Wx-0007uK-BP for bug-gnu-emacs@gnu.org; Mon, 25 Mar 2013 11:41:52 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UK9Wv-0007St-L2 for bug-gnu-emacs@gnu.org; Mon, 25 Mar 2013 11:41:51 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:40805) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UK9Wv-0007Sp-IE for bug-gnu-emacs@gnu.org; Mon, 25 Mar 2013 11:41:49 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1UK9Z4-0001DM-DS; Mon, 25 Mar 2013 11:44:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Leo Liu Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: deng@randomsample.de, bug-gnu-emacs@gnu.org Resent-Date: Mon, 25 Mar 2013 15:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 14052 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org X-Debbugs-Original-Xcc: David Engster Original-Received: via spool by submit@debbugs.gnu.org id=B.13642262314636 (code B ref -1); Mon, 25 Mar 2013 15:44:02 +0000 Original-Received: (at submit) by debbugs.gnu.org; 25 Mar 2013 15:43:51 +0000 Original-Received: from localhost ([127.0.0.1]:44912 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UK9Ys-0001Ci-By for submit@debbugs.gnu.org; Mon, 25 Mar 2013 11:43:50 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34907) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1UK9Yp-0001Cb-GL for submit@debbugs.gnu.org; Mon, 25 Mar 2013 11:43:48 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UK9WZ-0007Ps-A8 for submit@debbugs.gnu.org; Mon, 25 Mar 2013 11:41:33 -0400 Original-Received: from lists.gnu.org ([208.118.235.17]:42965) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UK9WZ-0007Po-7W for submit@debbugs.gnu.org; Mon, 25 Mar 2013 11:41:27 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:46232) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UK9WU-0007F3-7S for bug-gnu-emacs@gnu.org; Mon, 25 Mar 2013 11:41:27 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UK9WS-0007OC-Mw for bug-gnu-emacs@gnu.org; Mon, 25 Mar 2013 11:41:22 -0400 Original-Received: from mail-pa0-f46.google.com ([209.85.220.46]:38938) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UK9WS-0007O1-Gd for bug-gnu-emacs@gnu.org; Mon, 25 Mar 2013 11:41:20 -0400 Original-Received: by mail-pa0-f46.google.com with SMTP id wp1so1102191pac.19 for ; Mon, 25 Mar 2013 08:41:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:from:to:subject:x-debbugs-cc:date:message-id :mime-version:content-type; bh=1hOzAyxy+cXGxy0GP5rfHhiHOFpcDSzm5HLFMBOv5T8=; b=vIfOvAZZfHICJXntys1sGiBU8H2Of7Oo6IZwwsoxqyEYFd5W0PT/D5zL6Wsbg6cFTU Axh5pcMgnqu4C5tYrHHxZRGt02g7QT0wzHQTgvOqLJtHlf0OI8edN8MWs8FJDHVWX12E sUGQ1rg/Xjr6SK6BmGxk1dScD3Ki4fS4behSn36gSpJMCTE+4JXP6Tszi0cQ3erZBJtb oHpXgyqnEuixRV1dA4kwSPRh9okUPne2Gpn1M5xsAkRTsl9TZaEBkJAlq9hxFYDz4fAN XwOJqJS/7LIBGLB9lSTLvCmH+8GPXes9dGSsWw3WcXydHJqftblIDTFwJKVM6nljCls1 GqTA== X-Received: by 10.68.189.42 with SMTP id gf10mr18118385pbc.149.1364226079238; Mon, 25 Mar 2013 08:41:19 -0700 (PDT) Original-Received: from Zeuss-MacBook.local ([111.161.47.175]) by mx.google.com with ESMTPS id vd4sm13830793pbc.35.2013.03.25.08.41.15 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 25 Mar 2013 08:41:18 -0700 (PDT) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:72883 Archived-At: 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)))