summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kanis <ivan@kanis.fr>2015-08-09 10:27:38 +0100
committerIvan Kanis <ivan.kanis@myscript.com>2015-08-09 11:27:38 +0200
commit9596accf506e66153d9a24828d530543edd8f4b8 (patch)
treef012df0b3118cc68e638dde90ddf923521140706
parenta5bdb872edb9f031fe041faf9a8c0be432e5f64c (diff)
downloademacs-9596accf506e66153d9a24828d530543edd8f4b8.tar.gz
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.
-rw-r--r--lisp/help-fns.el14
1 files changed, 1 insertions, 13 deletions
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 1c7a68abdec..0836c7f6710 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)