emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

feature/native-comp a06fe08: Clean-up some now unnecessary diff against


From: Andrea Corallo
Subject: feature/native-comp a06fe08: Clean-up some now unnecessary diff against master
Date: Tue, 29 Sep 2020 04:06:25 -0400 (EDT)

branch: feature/native-comp
commit a06fe08e8e8177ae3ccd6e2677b40237cd86ae9d
Author: Andrea Corallo <akrl@sdf.org>
Commit: Andrea Corallo <akrl@sdf.org>

    Clean-up some now unnecessary diff against master
    
        * lisp/emacs-lisp/autoload.el (update-directory-autoloads):
        .eln files have been moved so remove the '.eln' match.
    
        * lisp/emacs-lisp/bytecomp.el (byte-compile-refresh-preloaded):
        Likewise.
    
        * lisp/emacs-lisp/find-func.el (find-library-suffixes): Clean-up
        as '.eln' is no more in `load-suffixes'.
    
        * lisp/help-fns.el (find-lisp-object-file-name): Clean-up as
        `symbol-file' will return the '.elc' file.
    
        * src/lread.c (Fget_load_suffixes): Remove logic as '.eln' is not
        anymore in load-suffixes.
        (openp): Two spaces.
---
 lisp/emacs-lisp/autoload.el  |  2 +-
 lisp/emacs-lisp/bytecomp.el  |  3 +--
 lisp/emacs-lisp/find-func.el |  3 +--
 lisp/help-fns.el             | 11 +++--------
 src/lread.c                  | 23 +++--------------------
 5 files changed, 9 insertions(+), 33 deletions(-)

diff --git a/lisp/emacs-lisp/autoload.el b/lisp/emacs-lisp/autoload.el
index 4bdbc95..5ee0a14 100644
--- a/lisp/emacs-lisp/autoload.el
+++ b/lisp/emacs-lisp/autoload.el
@@ -1047,7 +1047,7 @@ write its autoloads into the specified file instead."
                        ;; we don't want to depend on whether Emacs was
                        ;; built with or without modules support, nor
                        ;; what is the suffix for the underlying OS.
-                      (unless (string-match "\\.\\(elc\\|eln\\|so\\|dll\\)" 
suf)
+                      (unless (string-match "\\.\\(elc\\|so\\|dll\\)" suf)
                          (push suf tmp)))
                      (concat "\\`[^=.].*" (regexp-opt tmp t) "\\'")))
         (files (apply #'nconc
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el
index 4a2a8c6..b0e3158 100644
--- a/lisp/emacs-lisp/bytecomp.el
+++ b/lisp/emacs-lisp/bytecomp.el
@@ -5180,8 +5180,7 @@ Use with caution."
         (message "Can't find %s to refresh preloaded Lisp files" argv0)
       (dolist (f (reverse load-history))
         (setq f (car f))
-        (when (string-match "el[cn]\\'" f)
-          (setq f (substring f 0 -1)))
+        (if (string-match "elc\\'" f) (setq f (substring f 0 -1)))
         (when (and (file-readable-p f)
                    (file-newer-than-file-p f emacs-file)
                    ;; Don't reload the source version of the files below
diff --git a/lisp/emacs-lisp/find-func.el b/lisp/emacs-lisp/find-func.el
index a4577a5..9e4d8cf 100644
--- a/lisp/emacs-lisp/find-func.el
+++ b/lisp/emacs-lisp/find-func.el
@@ -167,8 +167,7 @@ See the functions `find-function' and `find-variable'."
 (defun find-library-suffixes ()
   (let ((suffixes nil))
     (dolist (suffix (get-load-suffixes) (nreverse suffixes))
-      (unless (string-match "el[cn]" suffix)
-        (push suffix suffixes)))))
+      (unless (string-match "elc" suffix) (push suffix suffixes)))))
 
 (defun find-library--load-name (library)
   (let ((name library))
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index 88984ec..9fee156 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -323,17 +323,12 @@ found via `load-path'.  The return value can also be 
`C-source', which
 means that OBJECT is a function or variable defined in C.  If no
 suitable file is found, return nil."
   (let* ((autoloaded (autoloadp type))
-        (true-name (or (and autoloaded (nth 1 type))
+        (file-name (or (and autoloaded (nth 1 type))
                        (symbol-file
                          ;; FIXME: Why do we have this weird "If TYPE is the
                          ;; value returned by `symbol-function' for a function
                          ;; symbol" exception?
-                        object (or (if (symbolp type) type) 'defun))))
-         (file-name (if (and true-name
-                             (string-match "[.]eln\\'" true-name))
-                        (gethash (file-name-nondirectory true-name)
-                                 comp-eln-to-el-h)
-                     true-name)))
+                        object (or (if (symbolp type) type) 'defun)))))
     (cond
      (autoloaded
       ;; An autoloaded function: Locate the file since `symbol-function'
@@ -392,7 +387,7 @@ suitable file is found, return nil."
      ((let ((lib-name
             (if (string-match "[.]elc\\'" file-name)
                 (substring-no-properties file-name 0 -1)
-               file-name)))
+              file-name)))
        (or (and (file-readable-p lib-name) lib-name)
            ;; The library might be compressed.
            (and (file-readable-p (concat lib-name ".gz")) lib-name))))
diff --git a/src/lread.c b/src/lread.c
index d32f575..ea31131 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1056,25 +1056,8 @@ This uses the variables `load-suffixes' and 
`load-file-rep-suffixes'.  */)
     {
       Lisp_Object exts = Vload_file_rep_suffixes;
       Lisp_Object suffix = XCAR (suffixes);
-      bool native_code_suffix =
-       NATIVE_COMP_FLAG
-        && strcmp (NATIVE_ELISP_SUFFIX, SSDATA (suffix)) == 0;
-
-#ifdef HAVE_MODULES
-      native_code_suffix =
-       native_code_suffix || strcmp (MODULES_SUFFIX, SSDATA (suffix)) == 0;
-#ifdef MODULES_SECONDARY_SUFFIX
-      native_code_suffix =
-       native_code_suffix
-       || strcmp (MODULES_SECONDARY_SUFFIX, SSDATA (suffix)) == 0;
-#endif
-#endif
-
-      if (native_code_suffix)
-       lst = Fcons (suffix, lst);
-      else
-        FOR_EACH_TAIL (exts)
-          lst = Fcons (concat2 (suffix, XCAR (exts)), lst);
+      FOR_EACH_TAIL (exts)
+       lst = Fcons (concat2 (suffix, XCAR (exts)), lst);
     }
   return Fnreverse (lst);
 }
@@ -1698,6 +1681,7 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object 
suffixes,
   int last_errno = ENOENT;
   int save_fd = -1;
   USE_SAFE_ALLOCA;
+
   /* The last-modified time of the newest matching file found.
      Initialize it to something less than all valid timestamps.  */
   struct timespec save_mtime = make_timespec (TYPE_MINIMUM (time_t), -1);
@@ -1898,7 +1882,6 @@ openp (Lisp_Object path, Lisp_Object str, Lisp_Object 
suffixes,
                    /* We succeeded; return this descriptor and filename.  */
                    if (storeptr)
                      *storeptr = string;
-
                    SAFE_FREE ();
                    return fd;
                  }



reply via email to

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