aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorRichard M. Stallman1992-09-14 22:11:23 +0000
committerRichard M. Stallman1992-09-14 22:11:23 +0000
commit3005da00b926340ae41df29ce170f5b331d0a6c4 (patch)
treed62b71130dd74139fbc1c1d2ce4978617f28e1bb /src
parent72cea080f2fc1a97763272f1f044b240e6e65161 (diff)
downloademacs-3005da00b926340ae41df29ce170f5b331d0a6c4.tar.gz
emacs-3005da00b926340ae41df29ce170f5b331d0a6c4.zip
(main): Use X menu code if HAVE_X_WINDOWS and not NO_X_MENU.
Eliminate HIGHPRI as compilation option. (emacs_priority): New C variable, also Lisp variable. (main): Set the priority iff emacs_priority is nonzero.
Diffstat (limited to 'src')
-rw-r--r--src/emacs.c21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/emacs.c b/src/emacs.c
index 38ef932946b..b5b88f74cbb 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -74,6 +74,9 @@ Lisp_Object Vsystem_type;
74 but instead should use the virtual terminal under which it was started */ 74 but instead should use the virtual terminal under which it was started */
75int inhibit_window_system; 75int inhibit_window_system;
76 76
77/* If nonzero, set Emacs to run at this priority. */
78int emacs_priority;
79
77#ifdef HAVE_X_WINDOWS 80#ifdef HAVE_X_WINDOWS
78/* If non-zero, -d was specified, meaning we're using some window system. */ 81/* If non-zero, -d was specified, meaning we're using some window system. */
79int display_arg; 82int display_arg;
@@ -298,10 +301,11 @@ main (argc, argv, envp)
298 malloc_init (0, malloc_warning); 301 malloc_init (0, malloc_warning);
299#endif /* not SYSTEM_MALLOC */ 302#endif /* not SYSTEM_MALLOC */
300 303
301#ifdef HIGHPRI 304#ifdef PRIO_PROCESS
302 setpriority (PRIO_PROCESS, getpid (), HIGHPRI); 305 if (emacs_priority)
306 setpriority (PRIO_PROCESS, getpid (), emacs_priority);
303 setuid (getuid ()); 307 setuid (getuid ());
304#endif /* HIGHPRI */ 308#endif /* PRIO_PROCESS */
305 309
306#ifdef BSD 310#ifdef BSD
307 /* interrupt_input has trouble if we aren't in a separate process group. */ 311 /* interrupt_input has trouble if we aren't in a separate process group. */
@@ -521,8 +525,10 @@ main (argc, argv, envp)
521#ifdef HAVE_X11 525#ifdef HAVE_X11
522 syms_of_xselect (); 526 syms_of_xselect ();
523#endif 527#endif
524#ifdef HAVE_X_MENU 528#ifdef HAVE_X_WINDOW
529#ifndef NO_X_MENU
525 syms_of_xmenu (); 530 syms_of_xmenu ();
531#endif /* not NO_X_MENU */
526#endif /* HAVE_X_MENU */ 532#endif /* HAVE_X_MENU */
527#endif /* HAVE_X_WINDOWS */ 533#endif /* HAVE_X_WINDOWS */
528 534
@@ -791,4 +797,11 @@ Since kill-emacs may be invoked when the terminal is disconnected (or\n\
791in other similar situations), functions placed on this hook should not\n\ 797in other similar situations), functions placed on this hook should not\n\
792not expect to be able to interact with the user."); 798not expect to be able to interact with the user.");
793 Vkill_emacs_hook = Qnil; 799 Vkill_emacs_hook = Qnil;
800
801 DEFVAR_INT ("emacs-priority", &emacs_priority,
802 "Priority for Emacs to run at.\n\
803This value is effective only if set before Emacs is dumped,\n\
804and only if the Emacs executable is installed with setuid to permit\n\
805it to change priority. (Emacs sets its uid back to the real uid.)");
806 emacs_priority = 0;
794} 807}