unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Ivan Kanis <ivan@kanis.fr>
To: Emacs Development List <emacs-devel@gnu.org>
Subject: Source file not shown in help next to symbol
Date: Tue, 14 Jul 2015 17:12:04 +0200	[thread overview]
Message-ID: <87egkaojsr.fsf@kanis.fr> (raw)

Hi,

I have noticed this problem 2 years ago. When I C-h f on one of my
compiled function I do not get a link to the source code anymore.

My emacs compiled file are not on the same directory as my source file.
I do this so that I can run different version of emacs.

find-lisp-object-file-name is now returning nil. In the function the
variable file-name is correct.

The last condition is looking in the compiled file for the source file.
I haven't seen anything in the byte compiler that generates the string
";;; from file" that it uses to indicate the source. It seems like dead
code to me.

I just removed the last bit so that it works for me.

Let me know if you want me to commit this to master.

Ivan

diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 1c7a68a..c1bcab6 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -275,19 +275,7 @@ suitable file is found, return nil."
                    lib-name)
                file-name))
             ;; The next three forms are from `find-source-lisp-file'.
-            (elc-file (locate-file
-                       (concat file-name
-                               (if (string-match "\\.el\\'" file-name)
-                                   "c"
-                                 ".elc"))
-                       load-path nil 'readable))
-            (str (when elc-file
-                   (with-temp-buffer
-                     (insert-file-contents-literally elc-file nil 0 256)
-                     (buffer-string))))
-            (src-file (and str
-                           (string-match ";;; from file \\(.*\\.el\\)" str)
-                           (match-string 1 str))))
+            (src-file (locate-library file-name load-path nil 'readable)))
        (and src-file (file-readable-p src-file) src-file))))))
 
 (defun help-fns--key-bindings (function)



             reply	other threads:[~2015-07-14 15:12 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-14 15:12 Ivan Kanis [this message]
2015-07-15 21:26 ` Source file not shown in help next to symbol Stefan Monnier
2015-07-16 12:09   ` Ivan Kanis
2015-08-06 22:40     ` Stefan Monnier
2015-08-08  9:27       ` Ivan Kanis
2015-08-08 20:54         ` Stefan Monnier
2015-08-09  9:37           ` Ivan Kanis
2015-08-09 15:07             ` Eli Zaretskii
2015-08-10 12:50               ` Ivan Kanis

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=87egkaojsr.fsf@kanis.fr \
    --to=ivan@kanis.fr \
    --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).