emacs-devel
[Top][All Lists]
Advanced

[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: Thu, 16 Jul 2015 14:09:58 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux)

Hi Stefan,

July, 15 at 17:26 Stefan wrote:

>> -            (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))))
>
> This code indeed looks weird.  Apparently it comes from elsewhere, so it
> might need fixing elsewhere as well.

I confirm it's dead code.

The information it needs used to be in byte-compile-insert-header. Glenn
removed it with good reasons I think.

commit a6d63d97cd7f213a87630ab86119b469a89caeeb
Author: Glenn Morris <address@hidden>
Date:   Sat Apr 20 12:48:04 2013 -0700

    No longer include timestamp in header of .elc files
    
    This removes needless differences between files compiled at different
    times or by different people, or from sources in different locations.
    Ref: http://lists.gnu.org/archive/html/emacs-devel/2013-03/msg00187.html
    
    * lisp/emacs-lisp/bytecomp.el (byte-compile-insert-header):
    No longer include timestamp etc information.
    
    * etc/NEWS: Mention this.

diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 5db1793..755d5f7 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -1997,11 +1997,7 @@ Call from the source buffer."
       ;; >4    byte            x               version %d
       (insert
        ";ELC" 23 "\000\000\000\n"
-       ";;; Compiled by "
-       (or (and (boundp 'user-mail-address) user-mail-address)
-          (concat (user-login-name) "@" (system-name)))
-       " on " (current-time-string) "\n"
-       ";;; from file " filename "\n"
+       ";;; Compiled\n"
        ";;; in Emacs version " emacs-version "\n"
        ";;; with"
        (cond

>
>> +            (src-file (locate-library file-name load-path nil 'readable)))
>
> Hmm... I don't understand why you pass `load-path' as the
> `nosuffix' argument.

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.

Ivan

-- 
It is easier to act yourself into a better way of feeling than to
feel yourself into a better way of action.
    -- O.H. Mowrer



reply via email to

[Prev in Thread] Current Thread [Next in Thread]