]> git.eshelyaron.com Git - emacs.git/commitdiff
Assume ‘emacs’ is defined in Emacs-only code
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 17 Dec 2018 17:31:08 +0000 (09:31 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 17 Dec 2018 17:31:53 +0000 (09:31 -0800)
* src/charset.c, src/coding.c, src/coding.h, src/gmalloc.c:
* src/ralloc.c, src/regex-emacs.c: Simplify slightly by
assuming that ‘emacs’ is defined.  These modules have long
been specific to Emacs, and are not used elsewhere.

src/charset.c
src/coding.c
src/coding.h
src/gmalloc.c
src/ralloc.c
src/regex-emacs.c

index 83f4de7ed249b1d16b2cfddc326b82812cd0242e..8508b80677f283b585769671dd2ee6b392d2dbf0 100644 (file)
@@ -2328,8 +2328,6 @@ init_charset_once (void)
   charset_ksc5601 = -1;
 }
 
-#ifdef emacs
-
 /* Allocate an initial charset table that is large enough to handle
    Emacs while it is bootstrapping.  As of September 2011, the size
    needs to be at least 166; make it a bit bigger to allow for future
@@ -2430,5 +2428,3 @@ the value may be a list of mnemonics.  */);
                               MAX_5_BYTE_CHAR + 1);
   charset_unibyte = charset_iso_8859_1;
 }
-
-#endif /* emacs */
index c2945707e23010991f505c1a93b211a0c003c32e..ba060878c7d542ff894c4fbd2b1d3977f8d3a2fd 100644 (file)
@@ -307,16 +307,12 @@ Lisp_Object Vcoding_system_hash_table;
    file and process), not for in-buffer or Lisp string encoding.  */
 static Lisp_Object system_eol_type;
 
-#ifdef emacs
-
 /* Coding-systems are handed between Emacs Lisp programs and C internal
    routines by the following three variables.  */
 /* Coding system to be used to encode text for terminal display when
    terminal coding system is nil.  */
 struct coding_system safe_terminal_coding;
 
-#endif /* emacs */
-
 /* Two special coding systems.  */
 static Lisp_Object Vsjis_coding_system;
 static Lisp_Object Vbig5_coding_system;
@@ -8478,7 +8474,6 @@ to_unicode (Lisp_Object str, Lisp_Object *buf)
 #endif /* WINDOWSNT || CYGWIN */
 
 \f
-#ifdef emacs
 /*** 8. Emacs Lisp library functions ***/
 
 DEFUN ("coding-system-p", Fcoding_system_p, Scoding_system_p, 1, 1, 0,
@@ -10732,8 +10727,6 @@ coding system whose eol-type is N.  */)
   return make_fixnum (n);
 }
 
-#endif /* emacs */
-
 \f
 /*** 9. Post-amble ***/
 
@@ -10777,8 +10770,6 @@ init_coding_once (void)
   emacs_mule_bytes[EMACS_MULE_LEADING_CODE_PRIVATE_22] = 4;
 }
 
-#ifdef emacs
-
 void
 syms_of_coding (void)
 {
@@ -11321,4 +11312,3 @@ internal character representation.  */);
 #endif
   staticpro (&system_eol_type);
 }
-#endif /* emacs */
index d2cf4d8a7ba5fb6ddc958ec32cf7433eabdb499e..e984375bcc7d793e77445334415ac6cea29bb18a 100644 (file)
@@ -762,15 +762,10 @@ surrogates_to_codepoint (int low, int high)
 
 extern Lisp_Object preferred_coding_system (void);
 
-
-#ifdef emacs
-
 /* Coding system to be used to encode text for terminal display when
    terminal coding system is nil.  */
 extern struct coding_system safe_terminal_coding;
 
-#endif
-
 extern char emacs_mule_bytes[256];
 
 INLINE_HEADER_END
index ebba789f610dece7f2bdec161d1dc7812179e9c7..c07ead741e6839ece1f1b5a2f64c5f3c9e57460c 100644 (file)
@@ -36,9 +36,7 @@ License along with this library.  If not, see <https://www.gnu.org/licenses/>.
 #include <pthread.h>
 #endif
 
-#ifdef emacs
-# include "lisp.h"
-#endif
+#include "lisp.h"
 
 #include "ptr-bounds.h"
 
@@ -2022,11 +2020,7 @@ mabort (enum mcheck_status status)
 #else
   fprintf (stderr, "mcheck: %s\n", msg);
   fflush (stderr);
-# ifdef emacs
   emacs_abort ();
-# else
-  abort ();
-# endif
 #endif
 }
 
index 046d5507342fe87e248a989c354bbe4bf8f51813..4dc9fe348b038b88ef2c8386d07891d7e7fbd599 100644 (file)
@@ -26,11 +26,9 @@ along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
 
 #include <stddef.h>
 
-#ifdef emacs
-# include "lisp.h"
-# include "blockinput.h"
-# include <unistd.h>
-#endif
+#include "lisp.h"
+#include "blockinput.h"
+#include <unistd.h>
 
 #include "getpagesize.h"
 
@@ -924,9 +922,7 @@ r_alloc_free (void **ptr)
   free_bloc (dead_bloc);
   *ptr = 0;
 
-#ifdef emacs
   refill_memory_reserve ();
-#endif
 }
 
 /* Given a pointer at address PTR to relocatable data, resize it to SIZE.
@@ -1000,7 +996,7 @@ r_re_alloc (void **ptr, size_t size)
 }
 
 
-#if defined (emacs) && defined (DOUG_LEA_MALLOC)
+#ifdef DOUG_LEA_MALLOC
 
 /* Reinitialize the morecore hook variables after restarting a dumped
    Emacs.  This is needed when using Doug Lea's malloc from GNU libc.  */
index d19838a876e63f92d74ee78f38a14716df05a708..5cb7bba158ef118b1bb33b77c933c6e59dbb2aa1 100644 (file)
@@ -698,7 +698,6 @@ print_partial_compiled_pattern (re_char *start, re_char *end)
          fprintf (stderr, "/%d", mcnt);
          break;
 
-# ifdef emacs
        case at_dot:
          fprintf (stderr, "/at_dot");
          break;
@@ -714,7 +713,6 @@ print_partial_compiled_pattern (re_char *start, re_char *end)
          mcnt = *p++;
          fprintf (stderr, "/%d", mcnt);
          break;
-# endif /* emacs */
 
        case begbuf:
          fprintf (stderr, "/begbuf");
@@ -753,9 +751,6 @@ print_compiled_pattern (struct re_pattern_buffer *bufp)
   printf ("re_nsub: %zu\t", bufp->re_nsub);
   printf ("regs_alloc: %d\t", bufp->regs_allocated);
   printf ("can_be_null: %d\t", bufp->can_be_null);
-#ifndef emacs
-  printf ("syntax: %lx\n", bufp->syntax);
-#endif
   fflush (stdout);
   /* Perhaps we should print the translate table?  */
 }