diff options
| author | Joakim Verona | 2012-03-26 23:32:56 +0200 |
|---|---|---|
| committer | Joakim Verona | 2012-03-26 23:32:56 +0200 |
| commit | e28095d4fe09534832c171408fc6520b7d25957b (patch) | |
| tree | 142e748041268ca6d4e7780f69b931528195176f | |
| parent | 75da28a3845b9dfa4e730cfa19c14edc52cbb222 (diff) | |
| parent | f9210e18be29dd83fab9f4e260a29f6e6e5f0c62 (diff) | |
| download | emacs-e28095d4fe09534832c171408fc6520b7d25957b.tar.gz emacs-e28095d4fe09534832c171408fc6520b7d25957b.zip | |
upstream
| -rw-r--r-- | doc/lispref/ChangeLog | 9 | ||||
| -rw-r--r-- | doc/lispref/os.texi | 196 | ||||
| -rw-r--r-- | lisp/ChangeLog | 16 | ||||
| -rw-r--r-- | lisp/emacs-lisp/bytecomp.el | 7 | ||||
| -rw-r--r-- | lisp/files.el | 6 | ||||
| -rw-r--r-- | lisp/startup.el | 9 | ||||
| -rw-r--r-- | lisp/vc/vc-git.el | 19 | ||||
| -rw-r--r-- | src/ChangeLog | 11 | ||||
| -rw-r--r-- | src/dispextern.h | 2 | ||||
| -rw-r--r-- | src/keyboard.c | 15 |
10 files changed, 182 insertions, 108 deletions
diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 5477da38abe..d80732833e8 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog | |||
| @@ -1,3 +1,12 @@ | |||
| 1 | 2012-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 | (Killing Emacs): Copyedits. | ||
| 7 | (Suspending Emacs): Copyedits. Mention not very relevant with GUIs. | ||
| 8 | Shorten the example, use more standard shell prompts. | ||
| 9 | |||
| 1 | 2012-03-25 Chong Yidong <cyd@gnu.org> | 10 | 2012-03-25 Chong Yidong <cyd@gnu.org> |
| 2 | 11 | ||
| 3 | * display.texi (Fringes): Note that fringes are shown on graphical | 12 | * display.texi (Fringes): Note that fringes are shown on graphical |
diff --git a/doc/lispref/os.texi b/doc/lispref/os.texi index 2563bc57aef..7e4cfc0e31f 100644 --- a/doc/lispref/os.texi +++ b/doc/lispref/os.texi | |||
| @@ -110,8 +110,8 @@ compiled into the Emacs executable when it was built. | |||
| 110 | It runs the normal hook @code{before-init-hook}. | 110 | It runs the normal hook @code{before-init-hook}. |
| 111 | 111 | ||
| 112 | @item | 112 | @item |
| 113 | If appropriate (e.g., not in batch mode or started as a daemon), it | 113 | If appropriate, it creates a graphical frame. This is not done if the |
| 114 | creates a graphical frame. | 114 | options @samp{--batch} or @samp{--daemon} were specified. |
| 115 | 115 | ||
| 116 | @item | 116 | @item |
| 117 | It initializes the initial frame's faces, and sets up the menu bar | 117 | It 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 |
| 197 | If @code{initial-buffer-choice} is a string, it visits the file with | 197 | If @code{initial-buffer-choice} is a string, it visits the file with |
| 198 | that name. Furthermore, if the @samp{*scratch*} buffer exists and is | 198 | that name. If the @samp{*scratch*} buffer exists and is |
| 199 | empty, it inserts @code{initial-scratch-message} into that buffer. | 199 | empty, 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 |
| 222 | It displays the @dfn{startup screen}, which is a special buffer that | 222 | It displays the @dfn{startup screen}, which is a special buffer that |
| 223 | contains information about copyleft and basic Emacs usage. This is | 223 | contains information about copyleft and basic Emacs usage. This is |
| 224 | not done if @code{initial-buffer-choice} or | 224 | not done if @code{inhibit-startup-screen} or @code{initial-buffer-choice} |
| 225 | @code{inhibit-startup-screen} are @code{nil}, nor if the | 225 | are 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. | 226 | options 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 |
| 270 | This variable, if non-@code{nil}, determines a file or buffer for | 270 | If non-@code{nil}, this variable is a string that specifies a file or |
| 271 | Emacs to display after starting up, instead of the startup screen. | 271 | directory for Emacs to display after starting up, instead of the |
| 272 | startup 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. |
| 275 | If its value is @code{t}, Emacs displays the @samp{*scratch*} buffer. | 276 | If its value is @code{t}, Emacs displays the @samp{*scratch*} buffer. |
| 276 | @end ignore | 277 | @end ignore |
| 277 | If its value is a string, that specifies the name of a file for Emacs to | ||
| 278 | visit. | ||
| 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 | |||
| 365 | the standard search path for libraries (@pxref{How Programs Do | 364 | the standard search path for libraries (@pxref{How Programs Do |
| 366 | Loading}). The Emacs distribution does not come with this file; it is | 365 | Loading}). The Emacs distribution does not come with this file; it is |
| 367 | intended for local customizations. If the default init file exists, | 366 | intended for local customizations. If the default init file exists, |
| 368 | it is loaded whenever you start Emacs, except in batch mode or if | 367 | it is loaded whenever you start Emacs. But your own personal init |
| 369 | @samp{-q} (or @samp{-Q}) is specified. But your own personal init | ||
| 370 | file, if any, is loaded first; if it sets @code{inhibit-default-init} | 368 | file, if any, is loaded first; if it sets @code{inhibit-default-init} |
| 371 | to a non-@code{nil} value, then Emacs does not subsequently load the | 369 | to 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 | ||
| 372 | the 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 |
| 375 | loads this @emph{before} the user's init file. You can inhibit the | 375 | loads 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 | |||
| 380 | user's init file. Its normal value is @code{"site-start"}. The only | 380 | user's init file. Its normal value is @code{"site-start"}. The only |
| 381 | way you can change it with real effect is to do so before dumping | 381 | way you can change it with real effect is to do so before dumping |
| 382 | Emacs. | 382 | Emacs. |
| 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 |
| 390 | This variable prevents Emacs from loading the default initialization | 391 | If this variable is non-@code{nil}, it prevents Emacs from loading the |
| 391 | library file for your session of Emacs. If its value is non-@code{nil}, | 392 | default initialization library file. The default value is @code{nil}. |
| 392 | then 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 |
| 397 | This normal hook is run, once, just before loading all the init files | 396 | This 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 |
| 403 | This normal hook is run, once, just after loading all the init files | 402 | This 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}), |
| 405 | before loading the terminal-specific library and processing the | 404 | before loading the terminal-specific library (if started on a text |
| 406 | command-line action arguments. | 405 | terminal) 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 |
| 410 | This normal hook is run, once, just after handling the command line | 409 | This normal hook is run, once, just after handling the command line |
| 411 | arguments, just before @code{term-setup-hook}. | 410 | arguments, just before @code{term-setup-hook}. In batch mode, Emacs |
| 411 | does 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 |
| 421 | This variable holds the name of the @file{.emacs.d} directory. It is | 421 | This variable holds the name of the @file{.emacs.d} directory. It is |
| 422 | ordinarily @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 | |||
| 442 | does not specify all the terminal's function keys. @xref{Terminal | 442 | does not specify all the terminal's function keys. @xref{Terminal |
| 443 | Input}. | 443 | Input}. |
| 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 |
| 446 | is found whose name is identical to the terminal's name, Emacs strips | 446 | is found whose name is identical to the terminal's name, Emacs strips |
| 447 | from the terminal's name the last hyphen and everything that follows | 447 | from the terminal's name the last hyphen or underscore and everything that follows |
| 448 | it, and tries again. This process is repeated until Emacs finds a | 448 | it, and tries again. This process is repeated until Emacs finds a |
| 449 | matching library, or until there are no more hyphens in the name | 449 | matching 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 |
| 451 | terminal name is @samp{xterm-256color} and there is no | 451 | terminal 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 |
| 462 | terminal-specific library by setting the variable | 462 | terminal-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 | 464 | at the end its initialization, after loading both |
| 465 | your init file and any terminal-specific libraries. You can | 465 | your init file and any terminal-specific libraries. You could |
| 466 | use this variable to define initializations for terminals that do not | 466 | use this hook to define initializations for terminals that do not |
| 467 | have their own libraries. @xref{Hooks}. | 467 | have 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 |
| 479 | You may set the @code{term-file-prefix} variable to @code{nil} in your | 479 | You may set the @code{term-file-prefix} variable to @code{nil} in your |
| 480 | init file if you do not wish to load the | 480 | init file if you do not wish to load the |
| 481 | terminal-initialization file. To do this, put the following in | 481 | terminal-initialization file. |
| 482 | your init file: @code{(setq term-file-prefix nil)}. | ||
| 483 | 482 | ||
| 484 | On MS-DOS, if the environment variable @code{TERM} is not set, Emacs | 483 | On MS-DOS, Emacs sets the @code{TERM} environment variable to @samp{internal}. |
| 485 | uses @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 | ||
| 493 | You can use @code{term-setup-hook} to override the definitions made by a | 491 | You can use @code{term-setup-hook} to override the definitions made by a |
| 494 | terminal-specific file. | 492 | terminal-specific file. |
| 495 | @end defvar | ||
| 496 | 493 | ||
| 497 | See @code{window-setup-hook} in @ref{Window Systems}, for a related | 494 | For a related feature, @pxref{Window Systems, window-setup-hook}. |
| 498 | feature. | 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 |
| 505 | you start Emacs. Command-line arguments should not be commonly used, | 502 | you start Emacs. Note that the recommended way of using Emacs is to |
| 506 | since the recommended way of using Emacs is to start it just once, | 503 | start it just once, after logging in, and then do all editing in the same |
| 507 | after logging in, and do all editing in the same Emacs session | 504 | Emacs session (@pxref{Entering Emacs,,, emacs, The GNU Emacs Manual}). |
| 508 | (@pxref{Entering Emacs,,, emacs, The GNU Emacs Manual}); nonetheless, | 505 | For this reason, you might not use command-line arguments very often; |
| 509 | they can be useful when invoking Emacs from session scripts or | 506 | nonetheless, they can be useful when invoking Emacs from session |
| 510 | debugging Emacs itself. This section describes how Emacs processes | 507 | scripts or debugging Emacs. This section describes how Emacs |
| 511 | command-line arguments. | 508 | processes command-line arguments. |
| 512 | 509 | ||
| 513 | @defun command-line | 510 | @defun command-line |
| 514 | This function parses the command line that Emacs was called with, | 511 | This function parses the command line that Emacs was called with, |
| 515 | processes it, loads the user's init file and displays the | 512 | processes it, and (amongst other things) loads the user's init file and |
| 516 | startup messages. | 513 | displays 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 |
| 532 | The value of this variable is an alist of user-defined command-line | 529 | This variable is an alist of user-defined command-line options and |
| 533 | options and associated handler functions. This variable exists so you | 530 | associated handler functions. By default it is empty, but you can |
| 534 | can add elements to it. | 531 | add elements if you wish. |
| 535 | 532 | ||
| 536 | A @dfn{command-line option} is an argument on the command line, which | 533 | A @dfn{command-line option} is an argument on the command line, which |
| 537 | has the form: | 534 | has 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 |
| 573 | The value of this variable is the list of command-line arguments that | 570 | The value of this variable is the list of command-line arguments that |
| 574 | have not yet been processed. @code{argv} is an alias for this. | 571 | have 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 | |||
| 592 | argument. If it has also dealt with some of the following arguments, it | 591 | argument. If it has also dealt with some of the following arguments, it |
| 593 | can indicate that by deleting them from @code{command-line-args-left}. | 592 | can indicate that by deleting them from @code{command-line-args-left}. |
| 594 | 593 | ||
| 595 | If all of these functions return @code{nil}, then the argument is used | 594 | If all of these functions return @code{nil}, then the argument is treated |
| 596 | as a file name to visit. | 595 | as a file name to visit. |
| 597 | @end defvar | 596 | @end defvar |
| 598 | 597 | ||
| @@ -602,7 +601,9 @@ as a file name to visit. | |||
| 602 | 601 | ||
| 603 | There are two ways to get out of Emacs: you can kill the Emacs job, | 602 | There are two ways to get out of Emacs: you can kill the Emacs job, |
| 604 | which exits permanently, or you can suspend it, which permits you to | 603 | which exits permanently, or you can suspend it, which permits you to |
| 605 | reenter the Emacs process later. | 604 | reenter the Emacs process later. (In a graphical environment, you can |
| 605 | of course simply switch to another application without doing anything | ||
| 606 | special to Emacs, then switch back to Emacs when you want.) | ||
| 606 | 607 | ||
| 607 | @menu | 608 | @menu |
| 608 | * Killing Emacs:: Exiting Emacs irreversibly. | 609 | * Killing Emacs:: Exiting Emacs irreversibly. |
| @@ -614,9 +615,10 @@ reenter the Emacs process later. | |||
| 614 | @subsection Killing Emacs | 615 | @subsection Killing Emacs |
| 615 | @cindex killing Emacs | 616 | @cindex killing Emacs |
| 616 | 617 | ||
| 617 | Killing Emacs means ending the execution of the Emacs process. The | 618 | Killing Emacs means ending the execution of the Emacs process. |
| 618 | parent process normally resumes control. The low-level primitive for | 619 | If you started Emacs from a terminal, the parent process normally |
| 619 | killing Emacs is @code{kill-emacs}. | 620 | resumes control. The low-level primitive for killing Emacs is |
| 621 | @code{kill-emacs}. | ||
| 620 | 622 | ||
| 621 | @deffn Command kill-emacs &optional exit-data | 623 | @deffn Command kill-emacs &optional exit-data |
| 622 | This command calls the hook @code{kill-emacs-hook}, then exits the | 624 | This command calls the hook @code{kill-emacs-hook}, then exits the |
| @@ -687,11 +689,17 @@ use the appropriate command in the parent shell---most likely | |||
| 687 | Suspending works only on a terminal device from which the Emacs | 689 | Suspending works only on a terminal device from which the Emacs |
| 688 | session was started. We call that device the @dfn{controlling | 690 | session was started. We call that device the @dfn{controlling |
| 689 | terminal} of the session. Suspending is not allowed if the | 691 | terminal} of the session. Suspending is not allowed if the |
| 690 | controlling terminal is a graphical terminal. | 692 | controlling terminal is a graphical terminal. Suspending is usually |
| 691 | 693 | not relevant in graphical environments, since you can simply switch to | |
| 692 | Some operating systems do not support suspension of jobs; on these | 694 | another application without doing anything special to Emacs. |
| 693 | systems, ``suspension'' actually creates a new shell temporarily as a | 695 | |
| 694 | subprocess of Emacs. Then you would exit the shell to return to Emacs. | 696 | @c FIXME? Are there any systems Emacs still supports that do not |
| 697 | @c have SIGTSTP? | ||
| 698 | @cindex SIGTSTP | ||
| 699 | Some operating systems (those without @code{SIGTSTP}, or MS-DOS) do | ||
| 700 | not support suspension of jobs; on these systems, ``suspension'' | ||
| 701 | actually creates a new shell temporarily as a subprocess of Emacs. | ||
| 702 | Then you would exit the shell to return to Emacs. | ||
| 695 | 703 | ||
| 696 | @deffn Command suspend-emacs &optional string | 704 | @deffn Command suspend-emacs &optional string |
| 697 | This function stops Emacs and returns control to the superior process. | 705 | This function stops Emacs and returns control to the superior process. |
| @@ -706,9 +714,10 @@ before suspending Emacs, or this function signals an error. | |||
| 706 | @xref{Multiple Terminals}. | 714 | @xref{Multiple Terminals}. |
| 707 | 715 | ||
| 708 | If @var{string} is non-@code{nil}, its characters are sent to Emacs's | 716 | If @var{string} is non-@code{nil}, its characters are sent to Emacs's |
| 709 | superior shell, to be read as terminal input. The characters in | 717 | superior shell, to be read as terminal input. |
| 710 | @var{string} are not echoed by the superior shell; only the results | 718 | @c FIXME? It seems to me that shell does echo STRING. |
| 711 | appear. | 719 | The characters in @var{string} are not echoed by the superior shell; |
| 720 | only the results appear. | ||
| 712 | 721 | ||
| 713 | Before suspending, @code{suspend-emacs} runs the normal hook | 722 | Before suspending, @code{suspend-emacs} runs the normal hook |
| 714 | @code{suspend-hook}. After the user resumes Emacs, | 723 | @code{suspend-hook}. After the user resumes Emacs, |
| @@ -719,34 +728,23 @@ The next redisplay after resumption will redraw the entire screen, | |||
| 719 | unless the variable @code{no-redraw-on-reenter} is non-@code{nil}. | 728 | unless the variable @code{no-redraw-on-reenter} is non-@code{nil}. |
| 720 | @xref{Refresh Screen}. | 729 | @xref{Refresh Screen}. |
| 721 | 730 | ||
| 722 | In the following example, note that @samp{pwd} is not echoed after | 731 | Here is an example of how you could use these hooks: |
| 723 | Emacs is suspended. But it is read and executed by the shell. | ||
| 724 | 732 | ||
| 725 | @smallexample | 733 | @smallexample |
| 726 | @group | 734 | @group |
| 727 | (suspend-emacs) | ||
| 728 | @result{} nil | ||
| 729 | @end group | ||
| 730 | |||
| 731 | @group | ||
| 732 | (add-hook 'suspend-hook | 735 | (add-hook 'suspend-hook |
| 733 | (function (lambda () | 736 | (lambda () (or (y-or-n-p "Really suspend? ") |
| 734 | (or (y-or-n-p | 737 | (error "Suspend canceled")))) |
| 735 | "Really suspend? ") | ||
| 736 | (error "Suspend canceled"))))) | ||
| 737 | @result{} (lambda nil | ||
| 738 | (or (y-or-n-p "Really suspend? ") | ||
| 739 | (error "Suspend canceled"))) | ||
| 740 | @end group | ||
| 741 | @group | ||
| 742 | (add-hook 'suspend-resume-hook | ||
| 743 | (function (lambda () (message "Resumed!")))) | ||
| 744 | @result{} (lambda nil (message "Resumed!")) | ||
| 745 | @end group | ||
| 746 | @group | ||
| 747 | (suspend-emacs "pwd") | ||
| 748 | @result{} nil | ||
| 749 | @end group | 738 | @end group |
| 739 | (add-hook 'suspend-resume-hook (lambda () (message "Resumed!") | ||
| 740 | (sit-for 2))) | ||
| 741 | @end smallexample | ||
| 742 | @c The sit-for prevents the ``nil'' that suspend-emacs returns | ||
| 743 | @c hiding the message. | ||
| 744 | |||
| 745 | Here is what you would see upon evaluating @code{(suspend-emacs "pwd")}: | ||
| 746 | |||
| 747 | @smallexample | ||
| 750 | @group | 748 | @group |
| 751 | ---------- Buffer: Minibuffer ---------- | 749 | ---------- Buffer: Minibuffer ---------- |
| 752 | Really suspend? @kbd{y} | 750 | Really suspend? @kbd{y} |
| @@ -755,8 +753,8 @@ Really suspend? @kbd{y} | |||
| 755 | 753 | ||
| 756 | @group | 754 | @group |
| 757 | ---------- Parent Shell ---------- | 755 | ---------- Parent Shell ---------- |
| 758 | lewis@@slug[23] % /user/lewis/manual | 756 | bash$ /home/username |
| 759 | lewis@@slug[24] % fg | 757 | bash$ fg |
| 760 | @end group | 758 | @end group |
| 761 | 759 | ||
| 762 | @group | 760 | @group |
| @@ -764,6 +762,10 @@ lewis@@slug[24] % fg | |||
| 764 | Resumed! | 762 | Resumed! |
| 765 | @end group | 763 | @end group |
| 766 | @end smallexample | 764 | @end smallexample |
| 765 | |||
| 766 | @c FIXME? AFAICS, it is echoed. | ||
| 767 | Note that @samp{pwd} is not echoed after Emacs is suspended. But it | ||
| 768 | is read and executed by the shell. | ||
| 767 | @end deffn | 769 | @end deffn |
| 768 | 770 | ||
| 769 | @defvar suspend-hook | 771 | @defvar suspend-hook |
| @@ -792,23 +794,23 @@ terminal object as an argument to each function. | |||
| 792 | 794 | ||
| 793 | @defun resume-tty &optional tty | 795 | @defun resume-tty &optional tty |
| 794 | This function resumes the previously suspended terminal device | 796 | This function resumes the previously suspended terminal device |
| 795 | @var{tty}; @var{tty} can be a terminal object, a frame (meaning the | 797 | @var{tty}; where @var{tty} has the same possible values as it does |
| 796 | terminal for that frame), or @code{nil} (meaning the terminal for the | 798 | for @code{suspend-tty}. |
| 797 | selected frame). | ||
| 798 | 799 | ||
| 799 | @vindex resume-tty-functions | 800 | @vindex resume-tty-functions |
| 800 | This function reopens the terminal device, re-initializes it, and | 801 | This function reopens the terminal device, re-initializes it, and |
| 801 | redraws its with that terminal's selected frame. It then runs the | 802 | redraws it with that terminal's selected frame. It then runs the |
| 802 | hook @code{resume-tty-functions}, passing the terminal object as an | 803 | hook @code{resume-tty-functions}, passing the terminal object as an |
| 803 | argument to each function. | 804 | argument to each function. |
| 804 | 805 | ||
| 805 | If the same device is already used by another Emacs terminal, this | 806 | If the same device is already used by another Emacs terminal, this |
| 806 | function signals an error. | 807 | function signals an error. If @var{tty} is not suspended, this |
| 808 | function does nothing. | ||
| 807 | @end defun | 809 | @end defun |
| 808 | 810 | ||
| 809 | @defun controlling-tty-p &optional terminal | 811 | @defun controlling-tty-p &optional tty |
| 810 | This function returns non-@code{nil} if @var{terminal} is the | 812 | This function returns non-@code{nil} if @var{tty} is the |
| 811 | controlling terminal of the Emacs session; @code{terminal} can be a | 813 | controlling terminal of the Emacs session; @var{tty} can be a |
| 812 | terminal object, a frame (meaning the terminal for that frame), or | 814 | terminal object, a frame (meaning the terminal for that frame), or |
| 813 | @code{nil} (meaning the terminal for the selected frame). | 815 | @code{nil} (meaning the terminal for the selected frame). |
| 814 | @end defun | 816 | @end defun |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 5a0c33da3c8..93ae0f12862 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,19 @@ | |||
| 1 | 2012-03-26 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * emacs-lisp/bytecomp.el (byte-compile-constants-vector): Allow more | ||
| 4 | than 197 variables. | ||
| 5 | |||
| 6 | 2012-03-26 Ami Fischman <ami@fischman.org> | ||
| 7 | |||
| 8 | * vc/vc-git.el (vc-git-state): Avoid unnecessarily locking. | ||
| 9 | |||
| 10 | 2012-03-26 Glenn Morris <rgm@gnu.org> | ||
| 11 | |||
| 12 | * files.el (save-buffers-kill-emacs): Doc fix. | ||
| 13 | |||
| 14 | * startup.el (normal-top-level, command-line, command-line-1): | ||
| 15 | Give them doc strings. | ||
| 16 | |||
| 1 | 2012-03-25 Eli Zaretskii <eliz@gnu.org> | 17 | 2012-03-25 Eli Zaretskii <eliz@gnu.org> |
| 2 | 18 | ||
| 3 | * makefile.w32-in (install): Use $(DIRNAME)_same-dir.tst instead | 19 | * makefile.w32-in (install): Use $(DIRNAME)_same-dir.tst instead |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 2ee878e5213..93c6518d215 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -2694,7 +2694,8 @@ If FORM is a lambda or a macro, byte-compile it as a function." | |||
| 2694 | (limits '(5 ; Use the 1-byte varref codes, | 2694 | (limits '(5 ; Use the 1-byte varref codes, |
| 2695 | 63 ; 1-constlim ; 1-byte byte-constant codes, | 2695 | 63 ; 1-constlim ; 1-byte byte-constant codes, |
| 2696 | 255 ; 2-byte varref codes, | 2696 | 255 ; 2-byte varref codes, |
| 2697 | 65535)) ; 3-byte codes for the rest. | 2697 | 65535 ; 3-byte codes for the rest. |
| 2698 | 65535)) ; twice since we step when we swap. | ||
| 2698 | limit) | 2699 | limit) |
| 2699 | (while (or rest other) | 2700 | (while (or rest other) |
| 2700 | (setq limit (car limits)) | 2701 | (setq limit (car limits)) |
| @@ -2708,8 +2709,8 @@ If FORM is a lambda or a macro, byte-compile it as a function." | |||
| 2708 | (setcdr (car rest) (setq i (1+ i))) | 2709 | (setcdr (car rest) (setq i (1+ i))) |
| 2709 | (setq ret (cons (car rest) ret)))) | 2710 | (setq ret (cons (car rest) ret)))) |
| 2710 | (setq rest (cdr rest))) | 2711 | (setq rest (cdr rest))) |
| 2711 | (setq limits (cdr limits) | 2712 | (setq limits (cdr limits) ;Step |
| 2712 | rest (prog1 other | 2713 | rest (prog1 other ;&Swap. |
| 2713 | (setq other rest)))) | 2714 | (setq other rest)))) |
| 2714 | (apply 'vector (nreverse (mapcar 'car ret))))) | 2715 | (apply 'vector (nreverse (mapcar 'car ret))))) |
| 2715 | 2716 | ||
diff --git a/lisp/files.el b/lisp/files.el index 8c61c288be9..b3fc0766ac5 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -6290,7 +6290,11 @@ be a predicate function such as `yes-or-no-p'." | |||
| 6290 | 6290 | ||
| 6291 | (defun save-buffers-kill-emacs (&optional arg) | 6291 | (defun save-buffers-kill-emacs (&optional arg) |
| 6292 | "Offer to save each buffer, then kill this Emacs process. | 6292 | "Offer to save each buffer, then kill this Emacs process. |
| 6293 | With prefix ARG, silently save all file-visiting buffers, then kill." | 6293 | With prefix ARG, silently save all file-visiting buffers without asking. |
| 6294 | If there are active processes where `process-query-on-exit-flag' | ||
| 6295 | returns non-nil, asks whether processes should be killed. | ||
| 6296 | Runs the members of `kill-emacs-query-functions' in turn and stops | ||
| 6297 | if any returns nil. If `confirm-kill-emacs' is non-nil, calls it." | ||
| 6294 | (interactive "P") | 6298 | (interactive "P") |
| 6295 | (save-some-buffers arg t) | 6299 | (save-some-buffers arg t) |
| 6296 | (and (or (not (memq t (mapcar (function | 6300 | (and (or (not (memq t (mapcar (function |
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. |
| 70 | Setting this variable takes effect | 72 | Setting 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. | ||
| 470 | It sets `command-line-processed', processes the command-line, | ||
| 471 | reads the initialization files, etc. | ||
| 472 | It 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'. | ||
| 711 | Amongst 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)) |
diff --git a/lisp/vc/vc-git.el b/lisp/vc/vc-git.el index 3ec32243796..bf7b7fb9e17 100644 --- a/lisp/vc/vc-git.el +++ b/lisp/vc/vc-git.el | |||
| @@ -217,12 +217,21 @@ matching the resulting Git log output, and KEYWORDS is a list of | |||
| 217 | ;; operation. | 217 | ;; operation. |
| 218 | (if (not (vc-git-registered file)) | 218 | (if (not (vc-git-registered file)) |
| 219 | 'unregistered | 219 | 'unregistered |
| 220 | (vc-git--call nil "add" "--refresh" "--" (file-relative-name file)) | ||
| 221 | (let ((diff (vc-git--run-command-string | 220 | (let ((diff (vc-git--run-command-string |
| 222 | file "diff-index" "-z" "HEAD" "--"))) | 221 | file "diff-index" "-p" "--raw" "-z" "HEAD" "--"))) |
| 223 | (if (and diff (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\([ADMUT]\\)\0[^\0]+\0" | 222 | (if (and diff |
| 224 | diff)) | 223 | (string-match ":[0-7]\\{6\\} [0-7]\\{6\\} [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\([ADMUT]\\)\0[^\0]+\0\\(\\(?:.\\|\n\\)*\\)\\'" |
| 225 | (vc-git--state-code (match-string 1 diff)) | 224 | diff)) |
| 225 | (let ((diff-letter (match-string 1 diff)) | ||
| 226 | (diff-contents (match-string 2 diff))) | ||
| 227 | (if (not (string-match "\n." diff-contents)) | ||
| 228 | ;; Empty diff: file contents is the same as the HEAD | ||
| 229 | ;; revision, but timestamps are different (eg, file | ||
| 230 | ;; was "touch"ed). Update timestamp in index: | ||
| 231 | (prog1 'up-to-date | ||
| 232 | (vc-git--call nil "add" "--refresh" "--" | ||
| 233 | (file-relative-name file))) | ||
| 234 | (vc-git--state-code diff-letter))) | ||
| 226 | (if (vc-git--empty-db-p) 'added 'up-to-date))))) | 235 | (if (vc-git--empty-db-p) 'added 'up-to-date))))) |
| 227 | 236 | ||
| 228 | (defun vc-git-working-revision (file) | 237 | (defun vc-git-working-revision (file) |
diff --git a/src/ChangeLog b/src/ChangeLog index 71bfec1f061..81448982563 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2012-03-26 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * dispextern.h (struct glyph): Fix previous change. Change the | ||
| 4 | bit length of glyphless.ch to 25 (Bug#11082). | ||
| 5 | |||
| 6 | 2012-03-26 Chong Yidong <cyd@gnu.org> | ||
| 7 | |||
| 8 | * keyboard.c (Vselection_inhibit_update_commands): New variable. | ||
| 9 | (command_loop_1): Use it; inhibit selection update for | ||
| 10 | handle-select-window too (Bug#8996). | ||
| 11 | |||
| 1 | 2012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr> | 12 | 2012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr> |
| 2 | 13 | ||
| 3 | * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific | 14 | * w32heap.c (_heap_init, _heap_term): Remove dead MSVC-specific |
diff --git a/src/dispextern.h b/src/dispextern.h index af5a3e836d7..e45d4b1e558 100644 --- a/src/dispextern.h +++ b/src/dispextern.h | |||
| @@ -461,7 +461,7 @@ struct glyph | |||
| 461 | /* Length of acronym or hexadecimal code string (at most 8). */ | 461 | /* Length of acronym or hexadecimal code string (at most 8). */ |
| 462 | unsigned len : 4; | 462 | unsigned len : 4; |
| 463 | /* Character to display. Actually we need only 22 bits. */ | 463 | /* Character to display. Actually we need only 22 bits. */ |
| 464 | unsigned ch : 22; | 464 | unsigned ch : 25; |
| 465 | } glyphless; | 465 | } glyphless; |
| 466 | 466 | ||
| 467 | /* Used to compare all bit-fields above in one step. */ | 467 | /* Used to compare all bit-fields above in one step. */ |
diff --git a/src/keyboard.c b/src/keyboard.c index 6417d97ece3..359e6cd692e 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -241,6 +241,7 @@ Lisp_Object internal_last_event_frame; | |||
| 241 | Time last_event_timestamp; | 241 | Time last_event_timestamp; |
| 242 | 242 | ||
| 243 | static Lisp_Object Qx_set_selection, Qhandle_switch_frame; | 243 | static Lisp_Object Qx_set_selection, Qhandle_switch_frame; |
| 244 | static Lisp_Object Qhandle_select_window; | ||
| 244 | Lisp_Object QPRIMARY; | 245 | Lisp_Object QPRIMARY; |
| 245 | 246 | ||
| 246 | static Lisp_Object Qself_insert_command; | 247 | static Lisp_Object Qself_insert_command; |
| @@ -1650,7 +1651,8 @@ command_loop_1 (void) | |||
| 1650 | ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly) | 1651 | ? EQ (CAR_SAFE (Vtransient_mark_mode), Qonly) |
| 1651 | : (!NILP (Vselect_active_regions) | 1652 | : (!NILP (Vselect_active_regions) |
| 1652 | && !NILP (Vtransient_mark_mode))) | 1653 | && !NILP (Vtransient_mark_mode))) |
| 1653 | && !EQ (Vthis_command, Qhandle_switch_frame)) | 1654 | && NILP (Fmemq (Vthis_command, |
| 1655 | Vselection_inhibit_update_commands))) | ||
| 1654 | { | 1656 | { |
| 1655 | EMACS_INT beg = | 1657 | EMACS_INT beg = |
| 1656 | XINT (Fmarker_position (BVAR (current_buffer, mark))); | 1658 | XINT (Fmarker_position (BVAR (current_buffer, mark))); |
| @@ -11669,6 +11671,7 @@ syms_of_keyboard (void) | |||
| 11669 | DEFSYM (Qx_set_selection, "x-set-selection"); | 11671 | DEFSYM (Qx_set_selection, "x-set-selection"); |
| 11670 | DEFSYM (QPRIMARY, "PRIMARY"); | 11672 | DEFSYM (QPRIMARY, "PRIMARY"); |
| 11671 | DEFSYM (Qhandle_switch_frame, "handle-switch-frame"); | 11673 | DEFSYM (Qhandle_switch_frame, "handle-switch-frame"); |
| 11674 | DEFSYM (Qhandle_select_window, "handle-select-window"); | ||
| 11672 | 11675 | ||
| 11673 | DEFSYM (Qinput_method_function, "input-method-function"); | 11676 | DEFSYM (Qinput_method_function, "input-method-function"); |
| 11674 | DEFSYM (Qinput_method_exit_on_first_char, "input-method-exit-on-first-char"); | 11677 | DEFSYM (Qinput_method_exit_on_first_char, "input-method-exit-on-first-char"); |
| @@ -12305,6 +12308,16 @@ text in the region before modifying the buffer. The next | |||
| 12305 | `deactivate-mark' call uses this to set the window selection. */); | 12308 | `deactivate-mark' call uses this to set the window selection. */); |
| 12306 | Vsaved_region_selection = Qnil; | 12309 | Vsaved_region_selection = Qnil; |
| 12307 | 12310 | ||
| 12311 | DEFVAR_LISP ("selection-inhibit-update-commands", | ||
| 12312 | Vselection_inhibit_update_commands, | ||
| 12313 | doc: /* List of commands which should not update the selection. | ||
| 12314 | Normally, if `select-active-regions' is non-nil and the mark remains | ||
| 12315 | active after a command (i.e. the mark was not deactivated), the Emacs | ||
| 12316 | command loop sets the selection to the text in the region. However, | ||
| 12317 | if the command is in this list, the selection is not updated. */); | ||
| 12318 | Vselection_inhibit_update_commands | ||
| 12319 | = list2 (Qhandle_switch_frame, Qhandle_select_window); | ||
| 12320 | |||
| 12308 | DEFVAR_LISP ("debug-on-event", | 12321 | DEFVAR_LISP ("debug-on-event", |
| 12309 | Vdebug_on_event, | 12322 | Vdebug_on_event, |
| 12310 | doc: /* Enter debugger on this event. When Emacs | 12323 | doc: /* Enter debugger on this event. When Emacs |