From: Seiji Zenitani <zenitani@mac.com>
To: emacs-devel emacs-devel <emacs-devel@gnu.org>
Subject: Cocoa port: hyperlink fix in help-mode
Date: Mon, 28 Jul 2008 06:20:38 -0400 [thread overview]
Message-ID: <A80C71E2-EF6C-40D9-930E-AD284EA3F53C@mac.com> (raw)
[-- 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
next reply other threads:[~2008-07-28 10:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-28 10:20 Seiji Zenitani [this message]
2008-07-28 13:20 ` Cocoa port: hyperlink fix in help-mode Adrian Robert
2008-07-29 3:50 ` T. V. Raman
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=A80C71E2-EF6C-40D9-930E-AD284EA3F53C@mac.com \
--to=zenitani@mac.com \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).