From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Seiji Zenitani Newsgroups: gmane.emacs.devel Subject: Cocoa port: hyperlink fix in help-mode Date: Mon, 28 Jul 2008 06:20:38 -0400 Message-ID: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="Boundary_(ID_k6UG/yNYr4rYyr0sAanwuA)" X-Trace: ger.gmane.org 1217240467 904 80.91.229.12 (28 Jul 2008 10:21:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 28 Jul 2008 10:21:07 +0000 (UTC) To: emacs-devel emacs-devel Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 28 12:21:56 2008 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1KNPrW-0001Ke-V4 for ged-emacs-devel@m.gmane.org; Mon, 28 Jul 2008 12:21:55 +0200 Original-Received: from localhost ([127.0.0.1]:49783 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KNPqc-0001yb-TY for ged-emacs-devel@m.gmane.org; Mon, 28 Jul 2008 06:20:58 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KNPqV-0001xv-9K for emacs-devel@gnu.org; Mon, 28 Jul 2008 06:20:51 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KNPqR-0001vx-EK for emacs-devel@gnu.org; Mon, 28 Jul 2008 06:20:50 -0400 Original-Received: from [199.232.76.173] (port=50040 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KNPqR-0001vj-5v for emacs-devel@gnu.org; Mon, 28 Jul 2008 06:20:47 -0400 Original-Received: from asmtpout020.mac.com ([17.148.16.95]:48246) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KNPqQ-0007nO-O1 for emacs-devel@gnu.org; Mon, 28 Jul 2008 06:20:46 -0400 Original-Received: from [10.0.1.200] (c-98-218-103-81.hsd1.md.comcast.net [98.218.103.81]) by asmtp020.mac.com (Sun Java(tm) System Messaging Server 6.3-6.03 (built Mar 14 2008; 32bit)) with ESMTPA id <0K4P009UJOQKUU00@asmtp020.mac.com> for emacs-devel@gnu.org; Mon, 28 Jul 2008 03:20:45 -0700 (PDT) X-Mailer: Apple Mail (2.928.1) X-detected-kernel: by monty-python.gnu.org: Solaris 10 (1203?) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:101629 Archived-At: --Boundary_(ID_k6UG/yNYr4rYyr0sAanwuA) Content-type: text/plain; charset=US-ASCII; format=flowed Content-transfer-encoding: 7BIT Hi, On Cocoa port, in help-mode (e.g. M-x describe-function x-popup-menu), the hyperlink to the definition in obj-C file does not work. The attached code fixes this problem. I assume that the namespace ns* (ns*.o or ns*.obj) is only used for Cocoa port. Seiji --Boundary_(ID_k6UG/yNYr4rYyr0sAanwuA) Content-type: application/octet-stream; x-unix-mode=0644; name=help.diff Content-transfer-encoding: 7bit Content-disposition: attachment; filename=help.diff Index: help-fns.el =================================================================== RCS file: /sources/emacs/emacs/lisp/help-fns.el,v retrieving revision 1.122 diff -u -r1.122 help-fns.el --- help-fns.el 6 Jun 2008 20:02:42 -0000 1.122 +++ help-fns.el 28 Jul 2008 10:07:30 -0000 @@ -149,9 +149,11 @@ (if (member file build-files) (throw 'loop file) (goto-char pnt)))))))) - (if (string-match "\\.\\(o\\|obj\\)\\'" file) - (setq file (replace-match ".c" t t file))) - (if (string-match "\\.c\\'" file) + (if (string-match "^ns.*\\(\\.o\\|obj\\)\\'" file) + (setq file (replace-match ".m" t t file 1)) + (if (string-match "\\.\\(o\\|obj\\)\\'" file) + (setq file (replace-match ".c" t t file)))) + (if (string-match "\\.\\(c\\|m\\)\\'" file) (concat "src/" file) file))))) Index: emacs-lisp/find-func.el =================================================================== RCS file: /sources/emacs/emacs/lisp/emacs-lisp/find-func.el,v retrieving revision 1.90 diff -u -r1.90 find-func.el --- emacs-lisp/find-func.el 6 May 2008 03:21:16 -0000 1.90 +++ emacs-lisp/find-func.el 28 Jul 2008 10:07:30 -0000 @@ -239,7 +239,7 @@ ;; that defines something else. (while (and (symbolp symbol) (get symbol 'definition-name)) (setq symbol (get symbol 'definition-name))) - (if (string-match "\\`src/\\(.*\\.c\\)\\'" library) + (if (string-match "\\`src/\\(.*\\.\\(c\\|m\\)\\)\\'" library) (find-function-C-source symbol (match-string 1 library) type) (when (string-match "\\.el\\(c\\)\\'" library) (setq library (substring library 0 (match-beginning 1)))) --Boundary_(ID_k6UG/yNYr4rYyr0sAanwuA) Content-type: text/plain; charset=US-ASCII; format=flowed Content-transfer-encoding: 7BIT 2008-07-28 Seiji Zenitani * help-fns.el (help-C-file-name): Add .m (Obj-C code) for Cocoa port * emacs-lisp/find-func.el (find-function-search-for-symbol): Likewise --Boundary_(ID_k6UG/yNYr4rYyr0sAanwuA)--