unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Source file not shown in help next to symbol
@ 2015-07-14 15:12 Ivan Kanis
  2015-07-15 21:26 ` Stefan Monnier
  0 siblings, 1 reply; 9+ messages in thread
From: Ivan Kanis @ 2015-07-14 15:12 UTC (permalink / raw)
  To: Emacs Development List

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)



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

end of thread, other threads:[~2015-08-10 12:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-14 15:12 Source file not shown in help next to symbol Ivan Kanis
2015-07-15 21:26 ` 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

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