emacs-diffs
[Top][All Lists]
Advanced

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

[Emacs-diffs] master 5e3e14f: Minor lread.c tweaks


From: Paul Eggert
Subject: [Emacs-diffs] master 5e3e14f: Minor lread.c tweaks
Date: Fri, 19 Apr 2019 15:08:59 -0400 (EDT)

branch: master
commit 5e3e14f6e96fd99ac763bedccb0539551dcb1d29
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Minor lread.c tweaks
    
    * src/lread.c (load_warn_unescaped_character_literals):
    Use AUTO_STRING to help the GC.
    (Fload): Use bool for boolean.
---
 src/lread.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/src/lread.c b/src/lread.c
index 8b38cac..f83db2a 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -1034,12 +1034,12 @@ load_error_old_style_backquotes (void)
 static void
 load_warn_unescaped_character_literals (Lisp_Object file)
 {
-  Lisp_Object warning
-    = call0 (Qbyte_run_unescaped_character_literals_warning);
-  if (NILP (warning))
-    return;
-  Lisp_Object format = build_string ("Loading `%s': %s");
-  CALLN (Fmessage, format, file, warning);
+  Lisp_Object warning = call0 (Qbyte_run_unescaped_character_literals_warning);
+  if (!NILP (warning))
+    {
+      AUTO_STRING (format, "Loading `%s': %s");
+      CALLN (Fmessage, format, file, warning);
+    }
 }
 
 DEFUN ("get-load-suffixes", Fget_load_suffixes, Sget_load_suffixes, 0, 0, 0,
@@ -1301,8 +1301,8 @@ Return t if the file exists and loads successfully.  */)
   specbind (Qlread_unescaped_character_literals, Qnil);
   record_unwind_protect (load_warn_unescaped_character_literals, file);
 
-  int is_elc;
-  if ((is_elc = suffix_p (found, ".elc")) != 0
+  bool is_elc = suffix_p (found, ".elc");
+  if (is_elc
       /* version = 1 means the file is empty, in which case we can
         treat it as not byte-compiled.  */
       || (fd >= 0 && (version = safe_to_load_version (fd)) > 1))



reply via email to

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