[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Source file not shown in help next to symbol
From: |
Ivan Kanis |
Subject: |
Re: Source file not shown in help next to symbol |
Date: |
Sat, 08 Aug 2015 11:27:44 +0200 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) |
August, 06 at 18:40 Stefan wrote:
>> I got the bug by copying the form that computed the elc-file in the
>> original code. I put t instead and it works fine.
>
> Sorry, got side tracked by vacation and am a bit lost. Can you send the
> final patch you think should be applied?
Hi Stefan,
I have this patch running for a while and it seems fine. I made the
commit message today. I can push it if you think it's OK.
commit 3a4acdc5d99843ac883831e40cb1d8020df53d69
Author: Ivan Kanis <address@hidden>
Date: Tue Jul 14 17:04:11 2015 +0200
fix link to source code in help window
* lisp/help-fns.el (find-lisp-object-file-name): remove code that
will never work due to Glenn Morris change a6d63d9 on Apr 20 2013
'No longer include timestamp in header of .elc files'. Add code
that will return .el source file in load-path.
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 1c7a68a..0836c7f 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 t nil 'readable)))
(and src-file (file-readable-p src-file) src-file))))))
(defun help-fns--key-bindings (function)
--
Our whole economy is base on planned obsolescence.
-- Brooks Stevens