delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2009/07/25/04:55:37

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
X-Recipient: djgpp AT delorie DOT com
Date: Sat, 25 Jul 2009 11:55:05 +0300
From: Eli Zaretskii <eliz AT gnu DOT org>
Subject: Re: Emacs pretest 23.0.96 is available
In-reply-to: <d1e3ff2b0907242318k41c4f6fcsbe8130a78d709529@mail.gmail.com>
To: djgpp AT delorie DOT com
Message-id: <83d47p3zx2.fsf@gnu.org>
MIME-version: 1.0
X-012-Sender: halo1 AT inter DOT net DOT il
References: <83eislssg7 DOT fsf AT gnu DOT org> <h44g99$ofl$1 AT news DOT onet DOT pl> <83bpnd6gvi DOT fsf AT gnu DOT org> <h46dkh$svh$1 AT news DOT onet DOT pl> <831vo8620b DOT fsf AT gnu DOT org> <e7a38c41-004a-40b2-a7b5-6b51acf0e47a AT d4g2000yqa DOT googlegroups DOT com> <83my6v43p3 DOT fsf AT gnu DOT org> <d4a932df-8e49-4550-9857-bbc45cc27f35 AT q11g2000yqi DOT googlegroups DOT com> <h4c5fa$2m2$1 AT news DOT onet DOT pl> <83ljme3wfu DOT fsf AT gnu DOT org> <d1e3ff2b0907242318k41c4f6fcsbe8130a78d709529 AT mail DOT gmail DOT com>
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> From: Laurynas Biveinis <lauras AT licejus DOT lt>
> Date: Sat, 25 Jul 2009 08:18:21 +0200
>=20
> 2009/7/24 Eli Zaretskii <eliz AT gnu DOT org>:
> > In previous versions of Emacs, loading Lisp libraries was always
> > announced in the echo area, so you'd see that and understand the
> > delay. =C2=A0But in Emacs 23, it was decided (against my objectio=
ns, FWIW)
> > to suppress these messages, so now the user has no clue.
>=20
> Is this customizable--is there any way to get those messages back?

Funny you should ask, because I just added a variable to do that.
It's called `force-load-messages'.

It's too late to get this into Emacs 23.1, whose release is expected
next week.  But you can apply the patch below when you build it, and
then you have the feature.

2009-07-25  Eli Zaretskii  <eliz AT gnu DOT org>

=09* lread.c (syms_of_lread) <force_load_messages>: New variable.
=09(Fload): Use it to force load messages, even if NOMESSAGES is
=09non-nil.

Index: src/lread.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D
RCS file: /cvsroot/emacs/emacs/src/lread.c,v
retrieving revision 1.408
retrieving revision 1.409
diff -u -r1.408 -r1.409
--- src/lread.c=0925 Jul 2009 07:36:19 -0000=091.408
+++ src/lread.c=0925 Jul 2009 08:50:17 -0000=091.409
@@ -214,6 +214,10 @@
=20
 int load_dangerous_libraries;
=20
+/* Non-zero means force printing messages when loading Lisp files.  =
*/
+
+int force_load_messages;
+
 /* A regular expression used to detect files compiled with Emacs.  *=
/
=20
 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 @@
 =09=09  error ("File `%s' was not compiled in Emacs",
 =09=09=09 SDATA (found));
 =09=09}
-=09      else if (!NILP (nomessage))
+=09      else if (!NILP (nomessage) && !force_load_messages)
 =09=09message_with_string ("File `%s' not compiled in Emacs", found,=
 1);
 =09    }
=20
@@ -1186,7 +1191,7 @@
 =09      newer =3D 1;
=20
 =09      /* If we won't print another message, mention this anyway. =
 */
-=09      if (!NILP (nomessage))
+=09      if (!NILP (nomessage) && !force_load_messages)
 =09=09{
 =09=09  Lisp_Object msg_file;
 =09=09  msg_file =3D Fsubstring (found, make_number (0), make_number=
 (-1));
@@ -1208,7 +1213,7 @@
 =09    emacs_close (fd);
 =09  val =3D call4 (Vload_source_file_function, found, hist_file_nam=
e,
 =09=09       NILP (noerror) ? Qnil : Qt,
-=09=09       NILP (nomessage) ? Qnil : Qt);
+=09=09       (NILP (nomessage) || force_load_messages) ? Qnil : Qt);
 =09  return unbind_to (count, val);
 =09}
     }
@@ -1231,7 +1236,7 @@
   if (! NILP (Vpurify_flag))
     Vpreloaded_file_list =3D Fcons (file, Vpreloaded_file_list);
=20
-  if (NILP (nomessage))
+  if (NILP (nomessage) || force_load_messages)
     {
       if (!safe_p)
 =09message_with_string ("Loading %s (compiled; note unsafe, not comp=
iled in Emacs)...",
@@ -1280,7 +1285,7 @@
   prev_saved_doc_string =3D 0;
   prev_saved_doc_string_size =3D 0;
=20
-  if (!noninteractive && NILP (nomessage))
+  if (!noninteractive && (NILP (nomessage) || force_load_messages))
     {
       if (!safe_p)
 =09message_with_string ("Loading %s (compiled; note unsafe, not comp=
iled in Emacs)...done",
@@ -4354,6 +4359,11 @@
 them.  */);
   load_dangerous_libraries =3D 0;
=20
+  DEFVAR_BOOL ("force-load-messages", &force_load_messages,
+=09       doc: /* Non-nil means force printing messages when loading=
 Lisp files.
+This overrides the value of the NOMESSAGE argument to `load'.  */);
+  force_load_messages =3D 0;
+
   DEFVAR_LISP ("bytecomp-version-regexp", &Vbytecomp_version_regexp,
 =09       doc: /* Regular expression matching safe to load compiled =
Lisp files.
 When Emacs loads a compiled Lisp file, it reads the first 512 bytes

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019