aboutsummaryrefslogtreecommitdiffstats
path: root/src/emacs.c
diff options
context:
space:
mode:
authorStefan Monnier2010-12-10 19:13:08 -0500
committerStefan Monnier2010-12-10 19:13:08 -0500
commit2c302df3a13236bfbf8ea1b771d13618fcda8d71 (patch)
treef26dc9f22861dc37610de319d05255de058c221b /src/emacs.c
parent0c747cb143fa227e78f350ac353d703f489209df (diff)
parent175069efeb080517afefdd44a06f7a779ea8c25c (diff)
downloademacs-2c302df3a13236bfbf8ea1b771d13618fcda8d71.tar.gz
emacs-2c302df3a13236bfbf8ea1b771d13618fcda8d71.zip
Merge from trunk
Diffstat (limited to 'src/emacs.c')
-rw-r--r--src/emacs.c73
1 files changed, 28 insertions, 45 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 70a0fae4ebf..49716c7eb4a 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -1,7 +1,8 @@
1/* Fully extensible Emacs, running on Unix, intended for GNU. 1/* Fully extensible Emacs, running on Unix, intended for GNU.
2 Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1998, 1999, 2
3 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 3Copyright (C) 1985, 1986, 1987, 1993, 1994, 1995, 1997, 1998, 1999,
4 2010 Free Software Foundation, Inc. 4 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
5 Free Software Foundation, Inc.
5 6
6This file is part of GNU Emacs. 7This file is part of GNU Emacs.
7 8
@@ -99,27 +100,27 @@ static const char emacs_version[] = "24.0.50";
99/* Make these values available in GDB, which doesn't see macros. */ 100/* Make these values available in GDB, which doesn't see macros. */
100 101
101#ifdef USE_LSB_TAG 102#ifdef USE_LSB_TAG
102int gdb_use_lsb = 1; 103int gdb_use_lsb EXTERNALLY_VISIBLE = 1;
103#else 104#else
104int gdb_use_lsb = 0; 105int gdb_use_lsb EXTERNALLY_VISIBLE = 0;
105#endif 106#endif
106#ifndef USE_LISP_UNION_TYPE 107#ifndef USE_LISP_UNION_TYPE
107int gdb_use_union = 0; 108int gdb_use_union EXTERNALLY_VISIBLE = 0;
108#else 109#else
109int gdb_use_union = 1; 110int gdb_use_union EXTERNALLY_VISIBLE = 1;
110#endif 111#endif
111EMACS_INT gdb_valbits = VALBITS; 112EMACS_INT gdb_valbits EXTERNALLY_VISIBLE = VALBITS;
112EMACS_INT gdb_gctypebits = GCTYPEBITS; 113EMACS_INT gdb_gctypebits EXTERNALLY_VISIBLE = GCTYPEBITS;
113#if defined (DATA_SEG_BITS) && ! defined (USE_LSB_TAG) 114#if defined (DATA_SEG_BITS) && ! defined (USE_LSB_TAG)
114EMACS_INT gdb_data_seg_bits = DATA_SEG_BITS; 115EMACS_INT gdb_data_seg_bits EXTERNALLY_VISIBLE = DATA_SEG_BITS;
115#else 116#else
116EMACS_INT gdb_data_seg_bits = 0; 117EMACS_INT gdb_data_seg_bits EXTERNALLY_VISIBLE = 0;
117#endif 118#endif
118EMACS_INT PVEC_FLAG = PSEUDOVECTOR_FLAG; 119EMACS_INT PVEC_FLAG EXTERNALLY_VISIBLE = PSEUDOVECTOR_FLAG;
119EMACS_INT gdb_array_mark_flag = ARRAY_MARK_FLAG; 120EMACS_INT gdb_array_mark_flag EXTERNALLY_VISIBLE = ARRAY_MARK_FLAG;
120/* GDB might say "No enum type named pvec_type" if we don't have at 121/* GDB might say "No enum type named pvec_type" if we don't have at
121 least one symbol with that type, and then xbacktrace could fail. */ 122 least one symbol with that type, and then xbacktrace could fail. */
122enum pvec_type gdb_pvec_type = PVEC_TYPE_MASK; 123enum pvec_type gdb_pvec_type EXTERNALLY_VISIBLE = PVEC_TYPE_MASK;
123 124
124/* Command line args from shell, as list of strings. */ 125/* Command line args from shell, as list of strings. */
125Lisp_Object Vcommand_line_args; 126Lisp_Object Vcommand_line_args;
@@ -194,11 +195,6 @@ Lisp_Object Vdynamic_library_alist;
194 but instead should use the virtual terminal under which it was started. */ 195 but instead should use the virtual terminal under which it was started. */
195int inhibit_window_system; 196int inhibit_window_system;
196 197
197/* If nonzero, set Emacs to run at this priority. This is also used
198 in child_setup and sys_suspend to make sure subshells run at normal
199 priority; those functions have their own extern declaration. */
200EMACS_INT emacs_priority;
201
202/* If non-zero, a filter or a sentinel is running. Tested to save the match 198/* If non-zero, a filter or a sentinel is running. Tested to save the match
203 data on the first attempt to change it inside asynchronous code. */ 199 data on the first attempt to change it inside asynchronous code. */
204int running_asynch_code; 200int running_asynch_code;
@@ -829,13 +825,14 @@ main (int argc, char **argv)
829 printf ("see the file named COPYING.\n"); 825 printf ("see the file named COPYING.\n");
830 exit (0); 826 exit (0);
831 } 827 }
832 if (argmatch (argv, argc, "-chdir", "--chdir", 2, &ch_to_dir, &skip_args)) 828
833 if (chdir (ch_to_dir) == -1) 829 if (argmatch (argv, argc, "-chdir", "--chdir", 4, &ch_to_dir, &skip_args))
834 { 830 if (chdir (ch_to_dir) == -1)
835 fprintf (stderr, "%s: Can't chdir to %s: %s\n", 831 {
836 argv[0], ch_to_dir, strerror (errno)); 832 fprintf (stderr, "%s: Can't chdir to %s: %s\n",
837 exit (1); 833 argv[0], ch_to_dir, strerror (errno));
838 } 834 exit (1);
835 }
839 836
840 837
841#ifdef HAVE_PERSONALITY_LINUX32 838#ifdef HAVE_PERSONALITY_LINUX32
@@ -1508,9 +1505,7 @@ main (int argc, char **argv)
1508 syms_of_doc (); 1505 syms_of_doc ();
1509 syms_of_editfns (); 1506 syms_of_editfns ();
1510 syms_of_emacs (); 1507 syms_of_emacs ();
1511#ifdef CLASH_DETECTION
1512 syms_of_filelock (); 1508 syms_of_filelock ();
1513#endif /* CLASH_DETECTION */
1514 syms_of_indent (); 1509 syms_of_indent ();
1515 syms_of_insdel (); 1510 syms_of_insdel ();
1516 /* syms_of_keymap (); */ 1511 /* syms_of_keymap (); */
@@ -2053,10 +2048,8 @@ shut_down_emacs (int sig, int no_x, Lisp_Object stuff)
2053#ifndef DOS_NT 2048#ifndef DOS_NT
2054 { 2049 {
2055 int pgrp = EMACS_GETPGRP (0); 2050 int pgrp = EMACS_GETPGRP (0);
2056 2051 int tpgrp = tcgetpgrp (0);
2057 int tpgrp; 2052 if ((tpgrp != -1) && tpgrp == pgrp)
2058 if (EMACS_GET_TTY_PGRP (0, &tpgrp) != -1
2059 && tpgrp == pgrp)
2060 { 2053 {
2061 reset_all_sys_modes (); 2054 reset_all_sys_modes ();
2062 if (sig && sig != SIGTERM) 2055 if (sig && sig != SIGTERM)
@@ -2412,9 +2405,10 @@ Special values:
2412 `ms-dos' compiled as an MS-DOS application. 2405 `ms-dos' compiled as an MS-DOS application.
2413 `windows-nt' compiled as a native W32 application. 2406 `windows-nt' compiled as a native W32 application.
2414 `cygwin' compiled using the Cygwin library. 2407 `cygwin' compiled using the Cygwin library.
2415Anything else (in Emacs 23.1, the possibilities are: aix, berkeley-unix, 2408Anything else (in Emacs 24.1, the possibilities are: aix, berkeley-unix,
2416hpux, irix, lynxos 3.0.1, usg-unix-v) indicates some sort of Unix system. */); 2409hpux, irix, usg-unix-v) indicates some sort of Unix system. */);
2417 Vsystem_type = intern_c_string (SYSTEM_TYPE); 2410 Vsystem_type = intern_c_string (SYSTEM_TYPE);
2411 /* Above values are from SYSTEM_TYPE in src/s/*.h. */
2418 2412
2419 DEFVAR_LISP ("system-configuration", &Vsystem_configuration, 2413 DEFVAR_LISP ("system-configuration", &Vsystem_configuration,
2420 doc: /* Value is string indicating configuration Emacs was built for. 2414 doc: /* Value is string indicating configuration Emacs was built for.
@@ -2440,15 +2434,6 @@ Before Emacs 24.1, the hook was not run in batch mode, i.e., if
2440`noninteractive' was non-nil. */); 2434`noninteractive' was non-nil. */);
2441 Vkill_emacs_hook = Qnil; 2435 Vkill_emacs_hook = Qnil;
2442 2436
2443 DEFVAR_INT ("emacs-priority", &emacs_priority,
2444 doc: /* Priority for Emacs to run at.
2445This value is effective only if set before Emacs is dumped,
2446and only if the Emacs executable is installed with setuid to permit
2447it to change priority. (Emacs sets its uid back to the real uid.)
2448Currently, you need to define SET_EMACS_PRIORITY in `config.h'
2449before you compile Emacs, to enable the code for this feature. */);
2450 emacs_priority = 0;
2451
2452 DEFVAR_LISP ("path-separator", &Vpath_separator, 2437 DEFVAR_LISP ("path-separator", &Vpath_separator,
2453 doc: /* String containing the character that separates directories in 2438 doc: /* String containing the character that separates directories in
2454search paths, such as PATH and other similar environment variables. */); 2439search paths, such as PATH and other similar environment variables. */);
@@ -2532,5 +2517,3 @@ libraries; only those already known by Emacs will be loaded. */);
2532 daemon_pipe[1] = 0; 2517 daemon_pipe[1] = 0;
2533} 2518}
2534 2519
2535/* arch-tag: 7bfd356a-c720-4612-8ab6-aa4222931c2e
2536 (do not change this comment) */