From db5cae4b2d64e5ee3499a4d430816df3d0f0e2a2 Mon Sep 17 00:00:00 2001 From: Simon Marshall Date: Thu, 23 Oct 1997 14:58:25 +0000 Subject: [PATCH] Indicate in messages if source code is being loaded. --- lisp/international/mule.el | 22 ++++++++++++++-------- src/lread.c | 16 ++++++++-------- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/lisp/international/mule.el b/lisp/international/mule.el index 5111840a0c7..15cfe9f58c9 100644 --- a/lisp/international/mule.el +++ b/lisp/international/mule.el @@ -49,10 +49,14 @@ Return t if file exists." ;; We can't use `generate-new-buffer' because files.el ;; is not yet loaded. (get-buffer-create (generate-new-buffer-name " *load*")))) - (load-in-progress t)) - (or nomessage (message "Loading %s..." file)) - (if purify-flag - (setq preloaded-file-list (cons file preloaded-file-list))) + (load-in-progress t) + (source (save-match-data (string-match "\\.el\\'" fullname)))) + (unless nomessage + (if source + (message "Loading %s (source)..." file) + (message "Loading %s..." file))) + (when purify-flag + (setq preloaded-file-list (cons file preloaded-file-list))) (unwind-protect (let ((load-file-name fullname) (inhibit-file-name-operation nil)) @@ -68,10 +72,12 @@ Return t if file exists." (let (kill-buffer-hook kill-buffer-query-functions) (kill-buffer buffer))) (let ((hook (assoc file after-load-alist))) - (if hook - (mapcar (function eval) (cdr hook)))) - (or nomessage noninteractive - (message "Loading %s...done" file)) + (when hook + (mapcar (function eval) (cdr hook)))) + (unless (or nomessage noninteractive) + (if source + (message "Loading %s (source)...done" file) + (message "Loading %s...done" file))) t))) ;; API (Application Program Interface) for charsets. diff --git a/src/lread.c b/src/lread.c index 62886190fb2..725ebef4a0b 100644 --- a/src/lread.c +++ b/src/lread.c @@ -534,12 +534,12 @@ Return t if file exists.") if (NILP (nomessage)) { - if (newer) + if (!compiled) + message ("Loading %s (source)...", XSTRING (file)->data); + else if (newer) message ("Loading %s (compiled; note, source file is newer)...", XSTRING (file)->data); - else if (compiled) - message ("Loading %s (compiled)...", XSTRING (file)->data); - else + else /* The typical case; compiled file newer than source file. */ message ("Loading %s...", XSTRING (file)->data); } @@ -570,12 +570,12 @@ Return t if file exists.") if (!noninteractive && NILP (nomessage)) { - if (newer) + if (!compiled) + message ("Loading %s (source)...done", XSTRING (file)->data); + else if (newer) message ("Loading %s (compiled; note, source file is newer)...done", XSTRING (file)->data); - else if (compiled) - message ("Loading %s (compiled)...done", XSTRING (file)->data); - else + else /* The typical case; compiled file newer than source file. */ message ("Loading %s...done", XSTRING (file)->data); } return Qt; -- 2.39.2