[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Source file not shown in help next to symbol
From: |
Ivan Kanis |
Subject: |
Source file not shown in help next to symbol |
Date: |
Tue, 14 Jul 2015 17:12:04 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
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)
- Source file not shown in help next to symbol,
Ivan Kanis <=