unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Simplify init_lread() branch and fix comments
@ 2016-12-28  3:01 Chris Gregory
  2016-12-28  8:52 ` Andreas Schwab
  0 siblings, 1 reply; 3+ messages in thread
From: Chris Gregory @ 2016-12-28  3:01 UTC (permalink / raw)
  To: emacs-devel

This patch moves the comments before the branch in init_lread() to the
correct locations, and simplifies the branch because (true && a) == a.
-- 
Chris Gregory

Diff:

diff --git a/src/lread.c b/src/lread.c
index 35348f1..23ebc8f 100644
--- a/src/lread.c
+++ b/src/lread.c
@@ -4430,17 +4430,13 @@ load_path_default (void)
 void
 init_lread (void)
 {
-  /* First, set Vload_path.  */
-
-  /* Ignore EMACSLOADPATH when dumping.  */
-#ifdef CANNOT_DUMP
-  bool use_loadpath = true;
-#else
-  bool use_loadpath = NILP (Vpurify_flag);
-#endif
-
-  if (use_loadpath && egetenv ("EMACSLOADPATH"))
+  if (
+#ifndef CANNOT_DUMP
+      NILP (Vpurify_flag) &&
+#endif
+      egetenv ("EMACSLOADPATH"))
     {
+      /* First, set Vload_path.  */
       Vload_path = decode_env_path ("EMACSLOADPATH", 0, 1);
 
       /* Check (non-nil) user-supplied elements.  */
@@ -4479,6 +4475,7 @@ init_lread (void)
     }
   else
     {
+      /* Ignore EMACSLOADPATH when dumping.  */
       Vload_path = load_path_default ();
 
       /* Check before adding site-lisp directories.



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-12-28 15:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-12-28  3:01 Simplify init_lread() branch and fix comments Chris Gregory
2016-12-28  8:52 ` Andreas Schwab
2016-12-28 15:46   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).