aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJoakim Verona2012-03-26 23:32:56 +0200
committerJoakim Verona2012-03-26 23:32:56 +0200
commite28095d4fe09534832c171408fc6520b7d25957b (patch)
tree142e748041268ca6d4e7780f69b931528195176f
parent75da28a3845b9dfa4e730cfa19c14edc52cbb222 (diff)
parentf9210e18be29dd83fab9f4e260a29f6e6e5f0c62 (diff)
downloademacs-e28095d4fe09534832c171408fc6520b7d25957b.tar.gz
emacs-e28095d4fe09534832c171408fc6520b7d25957b.zip
upstream
-rw-r--r--doc/lispref/ChangeLog9
-rw-r--r--doc/lispref/os.texi196
-rw-r--r--lisp/ChangeLog16
-rw-r--r--lisp/emacs-lisp/bytecomp.el7
-rw-r--r--lisp/files.el6
-rw-r--r--lisp/startup.el9
-rw-r--r--lisp/vc/vc-git.el19
-rw-r--r--src/ChangeLog11
-rw-r--r--src/dispextern.h2
-rw-r--r--src/keyboard.c15
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 @@
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 (Killing Emacs): Copyedits.
7 (Suspending Emacs): Copyedits. Mention not very relevant with GUIs.
8 Shorten the example, use more standard shell prompts.
9
12012-03-25 Chong Yidong <cyd@gnu.org> 102012-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.
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
@@ -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,
604which exits permanently, or you can suspend it, which permits you to 603which exits permanently, or you can suspend it, which permits you to
605reenter the Emacs process later. 604reenter the Emacs process later. (In a graphical environment, you can
605of course simply switch to another application without doing anything
606special 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.
618parent process normally resumes control. The low-level primitive for 619If you started Emacs from a terminal, the parent process normally
619killing Emacs is @code{kill-emacs}. 620resumes 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
622This command calls the hook @code{kill-emacs-hook}, then exits the 624This 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
688session was started. We call that device the @dfn{controlling 690session was started. We call that device the @dfn{controlling
689terminal} of the session. Suspending is not allowed if the 691terminal} of the session. Suspending is not allowed if the
690controlling terminal is a graphical terminal. 692controlling terminal is a graphical terminal. Suspending is usually
691 693not relevant in graphical environments, since you can simply switch to
692 Some operating systems do not support suspension of jobs; on these 694another application without doing anything special to Emacs.
693systems, ``suspension'' actually creates a new shell temporarily as a 695
694subprocess 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
700not support suspension of jobs; on these systems, ``suspension''
701actually creates a new shell temporarily as a subprocess of Emacs.
702Then 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
697This function stops Emacs and returns control to the superior process. 705This 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
708If @var{string} is non-@code{nil}, its characters are sent to Emacs's 716If @var{string} is non-@code{nil}, its characters are sent to Emacs's
709superior shell, to be read as terminal input. The characters in 717superior 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.
711appear. 719The characters in @var{string} are not echoed by the superior shell;
720only the results appear.
712 721
713Before suspending, @code{suspend-emacs} runs the normal hook 722Before 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,
719unless the variable @code{no-redraw-on-reenter} is non-@code{nil}. 728unless the variable @code{no-redraw-on-reenter} is non-@code{nil}.
720@xref{Refresh Screen}. 729@xref{Refresh Screen}.
721 730
722In the following example, note that @samp{pwd} is not echoed after 731Here is an example of how you could use these hooks:
723Emacs 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
745Here is what you would see upon evaluating @code{(suspend-emacs "pwd")}:
746
747@smallexample
750@group 748@group
751---------- Buffer: Minibuffer ---------- 749---------- Buffer: Minibuffer ----------
752Really suspend? @kbd{y} 750Really suspend? @kbd{y}
@@ -755,8 +753,8 @@ Really suspend? @kbd{y}
755 753
756@group 754@group
757---------- Parent Shell ---------- 755---------- Parent Shell ----------
758lewis@@slug[23] % /user/lewis/manual 756bash$ /home/username
759lewis@@slug[24] % fg 757bash$ fg
760@end group 758@end group
761 759
762@group 760@group
@@ -764,6 +762,10 @@ lewis@@slug[24] % fg
764Resumed! 762Resumed!
765@end group 763@end group
766@end smallexample 764@end smallexample
765
766@c FIXME? AFAICS, it is echoed.
767Note that @samp{pwd} is not echoed after Emacs is suspended. But it
768is 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
794This function resumes the previously suspended terminal device 796This 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
796terminal for that frame), or @code{nil} (meaning the terminal for the 798for @code{suspend-tty}.
797selected frame).
798 799
799@vindex resume-tty-functions 800@vindex resume-tty-functions
800This function reopens the terminal device, re-initializes it, and 801This function reopens the terminal device, re-initializes it, and
801redraws its with that terminal's selected frame. It then runs the 802redraws it with that terminal's selected frame. It then runs the
802hook @code{resume-tty-functions}, passing the terminal object as an 803hook @code{resume-tty-functions}, passing the terminal object as an
803argument to each function. 804argument to each function.
804 805
805If the same device is already used by another Emacs terminal, this 806If the same device is already used by another Emacs terminal, this
806function signals an error. 807function signals an error. If @var{tty} is not suspended, this
808function does nothing.
807@end defun 809@end defun
808 810
809@defun controlling-tty-p &optional terminal 811@defun controlling-tty-p &optional tty
810This function returns non-@code{nil} if @var{terminal} is the 812This function returns non-@code{nil} if @var{tty} is the
811controlling terminal of the Emacs session; @code{terminal} can be a 813controlling terminal of the Emacs session; @var{tty} can be a
812terminal object, a frame (meaning the terminal for that frame), or 814terminal 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 @@
12012-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
62012-03-26 Ami Fischman <ami@fischman.org>
7
8 * vc/vc-git.el (vc-git-state): Avoid unnecessarily locking.
9
102012-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
12012-03-25 Eli Zaretskii <eliz@gnu.org> 172012-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.
6293With prefix ARG, silently save all file-visiting buffers, then kill." 6293With prefix ARG, silently save all file-visiting buffers without asking.
6294If there are active processes where `process-query-on-exit-flag'
6295returns non-nil, asks whether processes should be killed.
6296Runs the members of `kill-emacs-query-functions' in turn and stops
6297if 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.
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))
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 @@
12012-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
62012-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
12012-03-25 Fabrice Popineau <fabrice.popineau@supelec.fr> 122012-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;
241Time last_event_timestamp; 241Time last_event_timestamp;
242 242
243static Lisp_Object Qx_set_selection, Qhandle_switch_frame; 243static Lisp_Object Qx_set_selection, Qhandle_switch_frame;
244static Lisp_Object Qhandle_select_window;
244Lisp_Object QPRIMARY; 245Lisp_Object QPRIMARY;
245 246
246static Lisp_Object Qself_insert_command; 247static 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.
12314Normally, if `select-active-regions' is non-nil and the mark remains
12315active after a command (i.e. the mark was not deactivated), the Emacs
12316command loop sets the selection to the text in the region. However,
12317if 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