unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Cocoa port: hyperlink fix in help-mode
@ 2008-07-28 10:20 Seiji Zenitani
  2008-07-28 13:20 ` Adrian Robert
  0 siblings, 1 reply; 3+ messages in thread
From: Seiji Zenitani @ 2008-07-28 10:20 UTC (permalink / raw)
  To: emacs-devel emacs-devel

[-- Attachment #1: Type: text/plain, Size: 263 bytes --]

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


[-- Attachment #2: help.diff --]
[-- Type: application/octet-stream, Size: 1628 bytes --]

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))))

[-- Attachment #3: Type: text/plain, Size: 193 bytes --]




2008-07-28  Seiji Zenitani  <zenitani@mac.com>

	* 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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2008-07-29  3:50 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-28 10:20 Cocoa port: hyperlink fix in help-mode Seiji Zenitani
2008-07-28 13:20 ` Adrian Robert
2008-07-29  3:50   ` T. V. Raman

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).