[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] emacs/src lread.c
From: |
Eli Zaretskii |
Subject: |
[Emacs-diffs] emacs/src lread.c |
Date: |
Sat, 25 Jul 2009 08:50:17 +0000 |
CVSROOT: /cvsroot/emacs
Module name: emacs
Changes by: Eli Zaretskii <eliz> 09/07/25 08:50:17
Modified files:
src : lread.c
Log message:
(syms_of_lread) <force_load_messages>: New variable.
(Fload): Use it to force load messages, even if NOMESSAGES is non-nil.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/emacs/src/lread.c?cvsroot=emacs&r1=1.408&r2=1.409
Patches:
Index: lread.c
===================================================================
RCS file: /cvsroot/emacs/emacs/src/lread.c,v
retrieving revision 1.408
retrieving revision 1.409
diff -u -b -r1.408 -r1.409
--- lread.c 25 Jul 2009 07:36:19 -0000 1.408
+++ lread.c 25 Jul 2009 08:50:17 -0000 1.409
@@ -214,6 +214,10 @@
int load_dangerous_libraries;
+/* Non-zero means force printing messages when loading Lisp files. */
+
+int force_load_messages;
+
/* A regular expression used to detect files compiled with Emacs. */
static Lisp_Object Vbytecomp_version_regexp;
@@ -970,7 +974,8 @@
If optional second arg NOERROR is non-nil,
report no error if FILE doesn't exist.
Print messages at start and end of loading unless
-optional third arg NOMESSAGE is non-nil.
+optional third arg NOMESSAGE is non-nil (but `force-load-messages'
+overrides that).
If optional fourth arg NOSUFFIX is non-nil, don't try adding
suffixes `.elc' or `.el' to the specified name FILE.
If optional fifth arg MUST-SUFFIX is non-nil, insist on
@@ -1164,7 +1169,7 @@
error ("File `%s' was not compiled in Emacs",
SDATA (found));
}
- else if (!NILP (nomessage))
+ else if (!NILP (nomessage) && !force_load_messages)
message_with_string ("File `%s' not compiled in Emacs", found,
1);
}
@@ -1186,7 +1191,7 @@
newer = 1;
/* If we won't print another message, mention this anyway. */
- if (!NILP (nomessage))
+ if (!NILP (nomessage) && !force_load_messages)
{
Lisp_Object msg_file;
msg_file = Fsubstring (found, make_number (0), make_number
(-1));
@@ -1208,7 +1213,7 @@
emacs_close (fd);
val = call4 (Vload_source_file_function, found, hist_file_name,
NILP (noerror) ? Qnil : Qt,
- NILP (nomessage) ? Qnil : Qt);
+ (NILP (nomessage) || force_load_messages) ? Qnil : Qt);
return unbind_to (count, val);
}
}
@@ -1231,7 +1236,7 @@
if (! NILP (Vpurify_flag))
Vpreloaded_file_list = Fcons (file, Vpreloaded_file_list);
- if (NILP (nomessage))
+ if (NILP (nomessage) || force_load_messages)
{
if (!safe_p)
message_with_string ("Loading %s (compiled; note unsafe, not compiled
in Emacs)...",
@@ -1280,7 +1285,7 @@
prev_saved_doc_string = 0;
prev_saved_doc_string_size = 0;
- if (!noninteractive && NILP (nomessage))
+ if (!noninteractive && (NILP (nomessage) || force_load_messages))
{
if (!safe_p)
message_with_string ("Loading %s (compiled; note unsafe, not compiled
in Emacs)...done",
@@ -4354,6 +4359,11 @@
them. */);
load_dangerous_libraries = 0;
+ DEFVAR_BOOL ("force-load-messages", &force_load_messages,
+ doc: /* Non-nil means force printing messages when loading Lisp
files.
+This overrides the value of the NOMESSAGE argument to `load'. */);
+ force_load_messages = 0;
+
DEFVAR_LISP ("bytecomp-version-regexp", &Vbytecomp_version_regexp,
doc: /* Regular expression matching safe to load compiled Lisp
files.
When Emacs loads a compiled Lisp file, it reads the first 512 bytes