aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGlenn Morris2012-03-25 17:37:04 -0700
committerGlenn Morris2012-03-25 17:37:04 -0700
commit33da7b164bf352bdef4a8b0cf91a353f99a1c9ff (patch)
treec09b4ad679685dc1567034479e61026dd00461a1
parentf514f6f0e3f8bbeb5212d0337e5bda5a9a4eaeb5 (diff)
downloademacs-33da7b164bf352bdef4a8b0cf91a353f99a1c9ff.tar.gz
emacs-33da7b164bf352bdef4a8b0cf91a353f99a1c9ff.zip
Small edits for lispref/os.texi
* doc/lispref/os.texi (Startup Summary): Copyedits. Fix startup screen logic. (Init File): Copyedits. (Command-Line Arguments): Copyedits. Do not mention argv alias. * lisp/startup.el (normal-top-level, command-line, command-line-1): Give them doc strings.
-rw-r--r--doc/lispref/ChangeLog6
-rw-r--r--doc/lispref/os.texi103
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/startup.el9
4 files changed, 71 insertions, 52 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog
index 5477da38abe..ce532c27f4d 100644
--- a/doc/lispref/ChangeLog
+++ b/doc/lispref/ChangeLog
@@ -1,3 +1,9 @@
12012-03-26 Glenn Morris <rgm@gnu.org>
2
3 * os.texi (Startup Summary): Copyedits. Fix startup screen logic.
4 (Init File): Copyedits.
5 (Command-Line Arguments): Copyedits. Do not mention argv alias.
6
12012-03-25 Chong Yidong <cyd@gnu.org> 72012-03-25 Chong Yidong <cyd@gnu.org>
2 8
3 * display.texi (Fringes): Note that fringes are shown on graphical 9 * display.texi (Fringes): Note that fringes are shown on graphical
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi
index 2563bc57aef..2571c7b2539 100644
--- a/doc/lispref/os.texi
+++ b/doc/lispref/os.texi
@@ -110,8 +110,8 @@ compiled into the Emacs executable when it was built.
110It runs the normal hook @code{before-init-hook}. 110It runs the normal hook @code{before-init-hook}.
111 111
112@item 112@item
113If appropriate (e.g., not in batch mode or started as a daemon), it 113If appropriate, it creates a graphical frame. This is not done if the
114creates a graphical frame. 114options @samp{--batch} or @samp{--daemon} were specified.
115 115
116@item 116@item
117It initializes the initial frame's faces, and sets up the menu bar 117It initializes the initial frame's faces, and sets up the menu bar
@@ -195,7 +195,7 @@ It now exits if the option @code{--batch} was specified.
195 195
196@item 196@item
197If @code{initial-buffer-choice} is a string, it visits the file with 197If @code{initial-buffer-choice} is a string, it visits the file with
198that name. Furthermore, if the @samp{*scratch*} buffer exists and is 198that name. If the @samp{*scratch*} buffer exists and is
199empty, it inserts @code{initial-scratch-message} into that buffer. 199empty, it inserts @code{initial-scratch-message} into that buffer.
200 200
201@c To make things nice and confusing, the next three items can be 201@c To make things nice and confusing, the next three items can be
@@ -221,9 +221,9 @@ It runs @code{window-setup-hook}. @xref{Window Systems}.
221@item 221@item
222It displays the @dfn{startup screen}, which is a special buffer that 222It displays the @dfn{startup screen}, which is a special buffer that
223contains information about copyleft and basic Emacs usage. This is 223contains information about copyleft and basic Emacs usage. This is
224not done if @code{initial-buffer-choice} or 224not done if @code{inhibit-startup-screen} or @code{initial-buffer-choice}
225@code{inhibit-startup-screen} are @code{nil}, nor if the 225are non-@code{nil}, or if the @samp{--no-splash} or @samp{-Q} command-line
226@samp{--no-splash} or @samp{-Q} command-line options were specified. 226options were specified.
227 227
228@c End of command-line-1. 228@c End of command-line-1.
229 229
@@ -267,15 +267,14 @@ aliases for this variable.
267@end defopt 267@end defopt
268 268
269@defopt initial-buffer-choice 269@defopt initial-buffer-choice
270This variable, if non-@code{nil}, determines a file or buffer for 270If non-@code{nil}, this variable is a string that specifies a file or
271Emacs to display after starting up, instead of the startup screen. 271directory for Emacs to display after starting up, instead of the
272startup screen.
272@ignore 273@ignore
273@c I do not think this should be mentioned. AFAICS it is just a dodge 274@c I do not think this should be mentioned. AFAICS it is just a dodge
274@c around inhibit-startup-screen not being settable on a site-wide basis. 275@c around inhibit-startup-screen not being settable on a site-wide basis.
275If its value is @code{t}, Emacs displays the @samp{*scratch*} buffer. 276If its value is @code{t}, Emacs displays the @samp{*scratch*} buffer.
276@end ignore 277@end ignore
277If its value is a string, that specifies the name of a file for Emacs to
278visit.
279@end defopt 278@end defopt
280 279
281@defopt inhibit-startup-echo-area-message 280@defopt inhibit-startup-echo-area-message
@@ -365,11 +364,12 @@ Lisp library named @file{default.el}. Emacs finds this file through
365the standard search path for libraries (@pxref{How Programs Do 364the standard search path for libraries (@pxref{How Programs Do
366Loading}). The Emacs distribution does not come with this file; it is 365Loading}). The Emacs distribution does not come with this file; it is
367intended for local customizations. If the default init file exists, 366intended for local customizations. If the default init file exists,
368it is loaded whenever you start Emacs, except in batch mode or if 367it is loaded whenever you start Emacs. But your own personal init
369@samp{-q} (or @samp{-Q}) is specified. But your own personal init
370file, if any, is loaded first; if it sets @code{inhibit-default-init} 368file, if any, is loaded first; if it sets @code{inhibit-default-init}
371to a non-@code{nil} value, then Emacs does not subsequently load the 369to a non-@code{nil} value, then Emacs does not subsequently load the
372@file{default.el} file. 370@file{default.el} file. In batch mode, or if you specify @samp{-q}
371(or @samp{-Q}), Emacs loads neither your personal init file nor
372the default init file.
373 373
374 Another file for site-customization is @file{site-start.el}. Emacs 374 Another file for site-customization is @file{site-start.el}. Emacs
375loads this @emph{before} the user's init file. You can inhibit the 375loads this @emph{before} the user's init file. You can inhibit the
@@ -380,6 +380,7 @@ This variable specifies the site-customization file to load before the
380user's init file. Its normal value is @code{"site-start"}. The only 380user's init file. Its normal value is @code{"site-start"}. The only
381way you can change it with real effect is to do so before dumping 381way you can change it with real effect is to do so before dumping
382Emacs. 382Emacs.
383@c So why even mention it here. I imagine it is almost never changed.
383@end defopt 384@end defopt
384 385
385 @xref{Init Examples,, Init File Examples, emacs, The GNU Emacs Manual}, for 386 @xref{Init Examples,, Init File Examples, emacs, The GNU Emacs Manual}, for
@@ -387,28 +388,27 @@ examples of how to make various commonly desired customizations in your
387@file{.emacs} file. 388@file{.emacs} file.
388 389
389@defopt inhibit-default-init 390@defopt inhibit-default-init
390This variable prevents Emacs from loading the default initialization 391If this variable is non-@code{nil}, it prevents Emacs from loading the
391library file for your session of Emacs. If its value is non-@code{nil}, 392default initialization library file. The default value is @code{nil}.
392then the default library is not loaded. The default value is
393@code{nil}.
394@end defopt 393@end defopt
395 394
396@defvar before-init-hook 395@defvar before-init-hook
397This normal hook is run, once, just before loading all the init files 396This normal hook is run, once, just before loading all the init files
398(the user's init file, @file{default.el}, and/or @file{site-start.el}). 397(@file{site-start.el}, your init file, and @file{default.el}).
399(The only way to change it with real effect is before dumping Emacs.) 398(The only way to change it with real effect is before dumping Emacs.)
400@end defvar 399@end defvar
401 400
402@defvar after-init-hook 401@defvar after-init-hook
403This normal hook is run, once, just after loading all the init files 402This normal hook is run, once, just after loading all the init files
404(the user's init file, @file{default.el}, and/or @file{site-start.el}), 403(@file{site-start.el}, your init file, and @file{default.el}),
405before loading the terminal-specific library and processing the 404before loading the terminal-specific library (if started on a text
406command-line action arguments. 405terminal) and processing the command-line action arguments.
407@end defvar 406@end defvar
408 407
409@defvar emacs-startup-hook 408@defvar emacs-startup-hook
410This normal hook is run, once, just after handling the command line 409This normal hook is run, once, just after handling the command line
411arguments, just before @code{term-setup-hook}. 410arguments, just before @code{term-setup-hook}. In batch mode, Emacs
411does not run either of these hooks.
412@end defvar 412@end defvar
413 413
414@defvar user-init-file 414@defvar user-init-file
@@ -419,7 +419,7 @@ the value refers to the corresponding source file.
419 419
420@defvar user-emacs-directory 420@defvar user-emacs-directory
421This variable holds the name of the @file{.emacs.d} directory. It is 421This variable holds the name of the @file{.emacs.d} directory. It is
422ordinarily @file{~/.emacs.d}, but differs on some platforms. 422@file{~/.emacs.d} on all platforms but MS-DOS.
423@end defvar 423@end defvar
424 424
425@node Terminal-Specific 425@node Terminal-Specific
@@ -442,12 +442,12 @@ set or add to @code{input-decode-map} if the Termcap or Terminfo entry
442does not specify all the terminal's function keys. @xref{Terminal 442does not specify all the terminal's function keys. @xref{Terminal
443Input}. 443Input}.
444 444
445 When the name of the terminal type contains a hyphen, and no library 445 When the name of the terminal type contains a hyphen or underscore, and no library
446is found whose name is identical to the terminal's name, Emacs strips 446is found whose name is identical to the terminal's name, Emacs strips
447from the terminal's name the last hyphen and everything that follows 447from the terminal's name the last hyphen or underscore and everything that follows
448it, and tries again. This process is repeated until Emacs finds a 448it, and tries again. This process is repeated until Emacs finds a
449matching library, or until there are no more hyphens in the name 449matching library, or until there are no more hyphens or underscores in the name
450(i.g.@: there is no terminal-specific library). For example, if the 450(i.e.@: there is no terminal-specific library). For example, if the
451terminal name is @samp{xterm-256color} and there is no 451terminal name is @samp{xterm-256color} and there is no
452@file{term/xterm-256color.el} library, Emacs tries to load 452@file{term/xterm-256color.el} library, Emacs tries to load
453@file{term/xterm.el}. If necessary, the terminal library can evaluate 453@file{term/xterm.el}. If necessary, the terminal library can evaluate
@@ -460,10 +460,10 @@ experimenting with your own peculiar customizations.
460 460
461 You can also arrange to override some of the actions of the 461 You can also arrange to override some of the actions of the
462terminal-specific library by setting the variable 462terminal-specific library by setting the variable
463@code{term-setup-hook}. This is a normal hook which Emacs runs using 463@code{term-setup-hook}. This is a normal hook that Emacs runs
464@code{run-hooks} at the end of Emacs initialization, after loading both 464at the end its initialization, after loading both
465your init file and any terminal-specific libraries. You can 465your init file and any terminal-specific libraries. You could
466use this variable to define initializations for terminals that do not 466use this hook to define initializations for terminals that do not
467have their own libraries. @xref{Hooks}. 467have their own libraries. @xref{Hooks}.
468 468
469@defvar term-file-prefix 469@defvar term-file-prefix
@@ -478,11 +478,9 @@ terminal-specific initialization file as follows:
478@noindent 478@noindent
479You may set the @code{term-file-prefix} variable to @code{nil} in your 479You may set the @code{term-file-prefix} variable to @code{nil} in your
480init file if you do not wish to load the 480init file if you do not wish to load the
481terminal-initialization file. To do this, put the following in 481terminal-initialization file.
482your init file: @code{(setq term-file-prefix nil)}.
483 482
484On MS-DOS, if the environment variable @code{TERM} is not set, Emacs 483On MS-DOS, Emacs sets the @code{TERM} environment variable to @samp{internal}.
485uses @samp{internal} as the terminal type.
486@end defvar 484@end defvar
487 485
488@defvar term-setup-hook 486@defvar term-setup-hook
@@ -492,28 +490,27 @@ terminal-specific Lisp file.
492 490
493You can use @code{term-setup-hook} to override the definitions made by a 491You can use @code{term-setup-hook} to override the definitions made by a
494terminal-specific file. 492terminal-specific file.
495@end defvar
496 493
497 See @code{window-setup-hook} in @ref{Window Systems}, for a related 494For a related feature, @pxref{Window Systems, window-setup-hook}.
498feature. 495@end defvar
499 496
500@node Command-Line Arguments 497@node Command-Line Arguments
501@subsection Command-Line Arguments 498@subsection Command-Line Arguments
502@cindex command-line arguments 499@cindex command-line arguments
503 500
504 You can use command-line arguments to request various actions when 501 You can use command-line arguments to request various actions when
505you start Emacs. Command-line arguments should not be commonly used, 502you start Emacs. Note that the recommended way of using Emacs is to
506since the recommended way of using Emacs is to start it just once, 503start it just once, after logging in, and then do all editing in the same
507after logging in, and do all editing in the same Emacs session 504Emacs session (@pxref{Entering Emacs,,, emacs, The GNU Emacs Manual}).
508(@pxref{Entering Emacs,,, emacs, The GNU Emacs Manual}); nonetheless, 505For this reason, you might not use command-line arguments very often;
509they can be useful when invoking Emacs from session scripts or 506nonetheless, they can be useful when invoking Emacs from session
510debugging Emacs itself. This section describes how Emacs processes 507scripts or debugging Emacs. This section describes how Emacs
511command-line arguments. 508processes command-line arguments.
512 509
513@defun command-line 510@defun command-line
514This function parses the command line that Emacs was called with, 511This function parses the command line that Emacs was called with,
515processes it, loads the user's init file and displays the 512processes it, and (amongst other things) loads the user's init file and
516startup messages. 513displays the startup messages.
517@end defun 514@end defun
518 515
519@defvar command-line-processed 516@defvar command-line-processed
@@ -529,9 +526,9 @@ to process its new command-line arguments.
529@cindex switches on command line 526@cindex switches on command line
530@cindex options on command line 527@cindex options on command line
531@cindex command-line options 528@cindex command-line options
532The value of this variable is an alist of user-defined command-line 529This variable is an alist of user-defined command-line options and
533options and associated handler functions. This variable exists so you 530associated handler functions. By default it is empty, but you can
534can add elements to it. 531add elements if you wish.
535 532
536A @dfn{command-line option} is an argument on the command line, which 533A @dfn{command-line option} is an argument on the command line, which
537has the form: 534has the form:
@@ -571,7 +568,9 @@ to Emacs.
571@defvar command-line-args-left 568@defvar command-line-args-left
572@vindex argv 569@vindex argv
573The value of this variable is the list of command-line arguments that 570The value of this variable is the list of command-line arguments that
574have not yet been processed. @code{argv} is an alias for this. 571have not yet been processed.
572@c Don't mention this, since it is a "bad name for a dynamically bound variable"
573@c @code{argv} is an alias for this.
575@end defvar 574@end defvar
576 575
577@defvar command-line-functions 576@defvar command-line-functions
@@ -592,7 +591,7 @@ should return a non-@code{nil} value to say it has dealt with that
592argument. If it has also dealt with some of the following arguments, it 591argument. If it has also dealt with some of the following arguments, it
593can indicate that by deleting them from @code{command-line-args-left}. 592can indicate that by deleting them from @code{command-line-args-left}.
594 593
595If all of these functions return @code{nil}, then the argument is used 594If all of these functions return @code{nil}, then the argument is treated
596as a file name to visit. 595as a file name to visit.
597@end defvar 596@end defvar
598 597
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 5a0c33da3c8..0903c2c2fd5 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12012-03-26 Glenn Morris <rgm@gnu.org>
2
3 * startup.el (normal-top-level, command-line, command-line-1):
4 Give them doc strings.
5
12012-03-25 Eli Zaretskii <eliz@gnu.org> 62012-03-25 Eli Zaretskii <eliz@gnu.org>
2 7
3 * makefile.w32-in (install): Use $(DIRNAME)_same-dir.tst instead 8 * makefile.w32-in (install): Use $(DIRNAME)_same-dir.tst instead
diff --git a/lisp/startup.el b/lisp/startup.el
index 41056f3907e..57d7a74e5ec 100644
--- a/lisp/startup.el
+++ b/lisp/startup.el
@@ -65,6 +65,8 @@ once you are familiar with the contents of the startup screen."
65 65
66(defvar startup-screen-inhibit-startup-screen nil) 66(defvar startup-screen-inhibit-startup-screen nil)
67 67
68;; FIXME? Why does this get such weirdly extreme treatment, when the
69;; more important inhibit-startup-screen does not.
68(defcustom inhibit-startup-echo-area-message nil 70(defcustom inhibit-startup-echo-area-message nil
69 "Non-nil inhibits the initial startup echo area message. 71 "Non-nil inhibits the initial startup echo area message.
70Setting this variable takes effect 72Setting this variable takes effect
@@ -464,6 +466,10 @@ DIRS are relative."
464 (setcdr tail (append (mapcar 'expand-file-name dirs) (cdr tail)))))) 466 (setcdr tail (append (mapcar 'expand-file-name dirs) (cdr tail))))))
465 467
466(defun normal-top-level () 468(defun normal-top-level ()
469 "Emacs calls this function when it first starts up.
470It sets `command-line-processed', processes the command-line,
471reads the initialization files, etc.
472It is the default value of the variable `top-level'."
467 (if command-line-processed 473 (if command-line-processed
468 (message "Back to top level.") 474 (message "Back to top level.")
469 (setq command-line-processed t) 475 (setq command-line-processed t)
@@ -701,6 +707,8 @@ opening the first frame (e.g. open a connection to an X server).")
701(defvar server-process) 707(defvar server-process)
702 708
703(defun command-line () 709(defun command-line ()
710 "A subroutine of `normal-top-level'.
711Amongst another things, it parses the command-line arguments."
704 (setq before-init-time (current-time) 712 (setq before-init-time (current-time)
705 after-init-time nil 713 after-init-time nil
706 command-line-default-directory default-directory) 714 command-line-default-directory default-directory)
@@ -2076,6 +2084,7 @@ A fancy display is used on graphic displays, normal otherwise."
2076(defalias 'display-splash-screen 'display-startup-screen) 2084(defalias 'display-splash-screen 'display-startup-screen)
2077 2085
2078(defun command-line-1 (args-left) 2086(defun command-line-1 (args-left)
2087 "A subroutine of `command-line'."
2079 (display-startup-echo-area-message) 2088 (display-startup-echo-area-message)
2080 (when (and pure-space-overflow 2089 (when (and pure-space-overflow
2081 (not noninteractive)) 2090 (not noninteractive))