;; 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
(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
(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))
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'
((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))))
{
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);
}
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);
/* We succeeded; return this descriptor and filename. */
if (storeptr)
*storeptr = string;
-
SAFE_FREE ();
return fd;
}