Address failure to file of alias definition after it changes
authorNelson Ferreira <nelson.ferreira@ieee.org>
Sat, 18 Apr 2020 15:57:47 +0000 (11:57 -0400)
committerNelson Ferreira <nelson.ferreira@ieee.org>
Sat, 18 Apr 2020 15:57:47 +0000 (11:57 -0400)
If the symbol of an alias changes, describe-function would fail with
   Invalid byte code: "Object file name not stored in doc file"

* help.el (describe-function-1): When trying to find the filename
of an alias find the filename of the symbol-function not the
alias.

Signed-off-by: Nelson Ferreira <nelson.ferreira@ieee.org>
lisp/help.el

index 93564f5..58fa9c2 100644 (file)
@@ -1286,7 +1286,10 @@ part of the documentation of internal subroutines."
             nil)))
     (princ "\n")
     (or file-name
-       (setq file-name (symbol-file function 'defun)))
+       (setq file-name
+             (symbol-file (if aliases
+                              (symbol-function function)
+                            function) 'defun)))
     (when file-name
        (princ "  -- loaded from \"")
        (if (not (bufferp standard-output))