]> git.eshelyaron.com Git - emacs.git/commitdiff
fix link to source code in help window
authorIvan Kanis <ivan@kanis.fr>
Sun, 9 Aug 2015 09:27:38 +0000 (10:27 +0100)
committerIvan Kanis <ivan.kanis@myscript.com>
Sun, 9 Aug 2015 09:27:38 +0000 (11:27 +0200)
* 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.

lisp/help-fns.el

index 1c7a68abdecd9a511eac391055cce9d16ea0dd3d..0836c7f6710cbea3f2e7f7ab92aab2e83befec2e 100644 (file)
@@ -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)