Merge from emacs-24 branch

This commit is contained in:
Chong Yidong 2012-04-20 16:48:50 +08:00
commit c07a4c0b59
35 changed files with 1135 additions and 734 deletions

View file

@ -1,3 +1,11 @@
2012-04-20 Ludovic Courtès <ludo@gnu.org>
* configure.in: Don't use the -R option (Bug#11251).
2012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
* info/dir, Makefile.in (INFO_FILES): Add emacs-gnutls.
2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
configure: new option --enable-gcc-warnings (Bug#11207)

View file

@ -53,12 +53,17 @@ pt-br Rodrigo Real
ru Alex Ott
sk Miroslav Vaško
** For a major release, add a "New in Emacs XX" section to faq.texi.
** Remove temporary +++/--- lines in NEWS.
** Try to reorder NEWS: most important things first, related items together.
** Consider bumping customize-changed-options-previous-release.
** cusver-check from admin.el cam help find new defcustoms missing
:version tags.
* BUGS
** Check for modes which bind M-s that conflicts with a new global binding M-s
@ -206,7 +211,7 @@ loading.texi cyd
macros.texi cyd
maps.texi rgm
markers.texi rgm
minibuf.texi
minibuf.texi rgm
modes.texi cyd
nonascii.texi cyd
numbers.texi cyd
@ -214,7 +219,7 @@ objects.texi cyd
os.texi cyd
package.texi rgm
positions.texi cyd
processes.texi
processes.texi rgm
searching.texi rgm
sequences.texi cyd
streams.texi cyd

2
autogen/configure vendored
View file

@ -22866,7 +22866,7 @@ case "$opsys" in
## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
## had different values in configure (in ac_link) and src/Makefile.in.
## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;;
gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX_RPATH)" ;;
*) LD_SWITCH_SYSTEM_TEMACS= ;;
esac

View file

@ -3510,7 +3510,7 @@ case "$opsys" in
## had not yet been defined and was expanded to null. Hence LD_SWITCH_SYSTEM
## had different values in configure (in ac_link) and src/Makefile.in.
## It seems clearer therefore to put this piece in LD_SWITCH_SYSTEM_TEMACS.
gnu-linux) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX)" ;;
gnu*) LD_SWITCH_SYSTEM_TEMACS="\$(LD_SWITCH_X_SITE_AUX_RPATH)" ;;
*) LD_SWITCH_SYSTEM_TEMACS= ;;
esac

View file

@ -1,3 +1,75 @@
2012-04-20 Chong Yidong <cyd@gnu.org>
* processes.texi (Asynchronous Processes): Mention nil argument to
start-process.
2012-04-20 Glenn Morris <rgm@gnu.org>
* minibuf.texi (Basic Completion): No need to describe obarrays here.
Don't mention obsolete `nospace' argument of all-completions.
(Minibuffer Completion, Completion Commands, Reading File Names)
(Completion Variables): Copyedits.
(Completion Commands): Mention parent keymaps.
Remove obsolete minibuffer-local-filename-must-match-map.
(High-Level Completion): Remove read-variable's almost
word-for-word duplication of read-command.
* elisp.texi, vol1.texi, vol2.texi, minibuf.texi (Completion):
Update "High-Level Completion" description.
2012-04-19 Glenn Morris <rgm@gnu.org>
* minibuf.texi (Minibuffers):
* elisp.texi, vol1.texi, vol2.texi: Fix minibuffer subsection order.
* minibuf.texi: Standardize metasyntactic variables ("history", etc).
Use Texinfo-recommended form of quote+punctuation.
(Intro to Minibuffers): First minibuffer is #1, not #0.
Mention minibuffer-inactive-mode.
(Text from Minibuffer): Copyedits.
(Minibuffer History, Programmed Completion): Fix @var usage.
(Object from Minibuffer): Remove overly pedantic para.
(Minibuffer History): Copyedits. Add face-name-history.
(Initial Input, Yes-or-No Queries, Multiple Queries)
(Minibuffer Windows, Minibuffer Misc): Copyedits.
(Yes-or-No Queries): Tweak example.
(Minibuffer Commands): Add next-complete-history-element.
(Minibuffer Misc): Mention minibuffer-message-timeout, and
minibuffer-inactive-mode.
2012-04-18 Glenn Morris <rgm@gnu.org>
* processes.texi (Serial Ports, Byte Packing, Bindat Spec)
(Bindat Functions): Copyedits.
2012-04-18 Christopher Schmidt <christopher@ch.ristopher.com>
* files.texi (Saving Buffers): Document `visit and `visit-save'
values of require-final-newline.
2012-04-18 Glenn Morris <rgm@gnu.org>
* processes.texi (Output from Processes, Filter Functions):
Mention waiting-for-user-input-p.
(Sentinels, Query Before Exit, System Processes, Transaction Queues):
(Network Servers, Datagrams, Network Processes, Network Options)
(Network Feature Testing, Serial Ports): Copyedits.
(Network): Add encrypted network overview paragraph.
Cross-reference the Emacs-GnuTLS manual. Use @acronym.
2012-04-17 Chong Yidong <cyd@gnu.org>
* help.texi (Keys in Documentation): Mention :advertised-binding.
* keymaps.texi (Menu Bar): Move most of the :advertised-binding
description to help.texi.
2012-04-16 Glenn Morris <rgm@gnu.org>
* processes.texi (Process Information, Input to Processes)
(Signals to Processes, Output from Processes, Process Buffers)
(Filter Functions, Decoding Output): Copyedits.
(Accepting Output): Discourage use of `millisec' argument.
2012-04-15 Glenn Morris <rgm@gnu.org>
* processes.texi (Processes, Subprocess Creation, Shell Arguments):

View file

@ -637,8 +637,8 @@ Minibuffers
* Multiple Queries:: Asking a series of similar questions.
* Reading a Password:: Reading a password from the terminal.
* Minibuffer Commands:: Commands used as key bindings in minibuffers.
* Minibuffer Contents:: How such commands access the minibuffer text.
* Minibuffer Windows:: Operating on the special minibuffer windows.
* Minibuffer Contents:: How such commands access the minibuffer text.
* Recursive Mini:: Whether recursive entry to minibuffer is allowed.
* Minibuffer Misc:: Various customization hooks and variables.
@ -648,7 +648,7 @@ Completion
* Minibuffer Completion:: Invoking the minibuffer with completion.
* Completion Commands:: Minibuffer commands that do completion.
* High-Level Completion:: Convenient special cases of completion
(reading buffer name, file name, etc.).
(reading buffer names, variable names, etc.).
* Reading File Names:: Using completion to read file names and
shell commands.
* Completion Variables:: Variables controlling completion behavior.

View file

@ -489,11 +489,13 @@ in particular buffers.
@defopt require-final-newline
This variable determines whether files may be written out that do
@emph{not} end with a newline. If the value of the variable is
@code{t}, then @code{save-buffer} silently adds a newline at the end of
the file whenever the buffer being saved does not already end in one.
If the value of the variable is non-@code{nil}, but not @code{t}, then
@code{save-buffer} asks the user whether to add a newline each time the
case arises.
@code{t}, then @code{save-buffer} silently adds a newline at the end
of the buffer whenever it does not already end in one. If the value
is @code{visit}, Emacs adds a missing newline just after it visits the
file. If the value is @code{visit-save}, Emacs adds a missing newline
both on visiting and on saving. For any other non-@code{nil} value,
@code{save-buffer} asks the user whether to add a newline each time
the case arises.
If the value of the variable is @code{nil}, then @code{save-buffer}
doesn't add newlines at all. @code{nil} is the default value, but a few

View file

@ -347,6 +347,21 @@ This function scans @var{string} for the above special sequences and
replaces them by what they stand for, returning the result as a string.
This permits display of documentation that refers accurately to the
user's own customized key bindings.
@cindex advertised binding
If a command has multiple bindings, this function normally uses the
first one it finds. You can specify one particular key binding by
assigning an @code{:advertised-binding} symbol property to the
command, like this:
@smallexample
(put 'undo :advertised-binding [?\C-/])
@end smallexample
@noindent
The @code{:advertised-binding} property also affects the binding shown
in menu items (@pxref{Menu Bar}). The property is ignored if it
specifies a key binding that the command does not actually have.
@end defun
Here are examples of the special sequences:

View file

@ -2548,17 +2548,8 @@ the same command (if such a key binding exists). This serves as a
convenient hint for users who do not know the key binding. If a
command has multiple bindings, Emacs normally displays the first one
it finds. You can specify one particular key binding by assigning an
@code{:advertised-binding} symbol property to the command. For
instance, the following tells Emacs to show @kbd{C-/} for the
@code{undo} menu item:
@smallexample
(put 'undo :advertised-binding [?\C-/])
@end smallexample
@noindent
If the @code{:advertised-binding} property specifies a key binding
that the command does not actually have, it is ignored.
@code{:advertised-binding} symbol property to the command. @xref{Keys
in Documentation}.
@node Tool Bar
@subsection Tool bars

View file

@ -29,8 +29,8 @@ argument.
* Multiple Queries:: Asking a series of similar questions.
* Reading a Password:: Reading a password from the terminal.
* Minibuffer Commands:: Commands used as key bindings in minibuffers.
* Minibuffer Contents:: How such commands access the minibuffer text.
* Minibuffer Windows:: Operating on the special minibuffer windows.
* Minibuffer Contents:: How such commands access the minibuffer text.
* Recursive Mini:: Whether recursive entry to minibuffer is allowed.
* Minibuffer Misc:: Various customization hooks and variables.
@end menu
@ -59,8 +59,10 @@ boundary between the prompt and the actual text.
The minibuffer's window is normally a single line; it grows
automatically if the contents require more space. You can explicitly
@c FIXME? Works in 23.4, not 24.0.95. (Bug#11276)
resize it temporarily with the window sizing commands; it reverts to
its normal size when the minibuffer is exited. You can resize it
@c FIXME? Doesn't work in any version of Emacs?
permanently by using the window sizing commands in the frame's other
window, when the minibuffer is not active. If the frame contains just
a minibuffer, you can change the minibuffer's size by changing the
@ -72,9 +74,9 @@ of variables such as @code{this-command} and @code{last-command}
code that uses the minibuffer, if you do not want that to change them.
Under some circumstances, a command can use a minibuffer even if
there is an active minibuffer; such minibuffers are called a
there is an active minibuffer; such a minibuffer is called a
@dfn{recursive minibuffer}. The first minibuffer is named
@w{@samp{ *Minibuf-0*}}. Recursive minibuffers are named by
@w{@samp{ *Minibuf-1*}}. Recursive minibuffers are named by
incrementing the number at the end of the name. (The names begin with
a space so that they won't show up in normal buffer lists.) Of
several recursive minibuffers, the innermost (or most recently
@ -90,6 +92,12 @@ to be done. @xref{Text from Minibuffer}, for the non-completion
minibuffer local maps. @xref{Completion Commands}, for the minibuffer
local maps for completion.
@cindex inactive minibuffer
When a minibuffer is inactive, its major mode is
@code{minibuffer-inactive-mode}, with keymap
@code{minibuffer-inactive-mode-map}. This is only really useful if
the minibuffer is in a separate frame. @xref{Minibuffers and Frames}.
When Emacs is running in batch mode, any request to read from the
minibuffer actually reads a line from the standard input descriptor that
was supplied when Emacs was started.
@ -110,7 +118,7 @@ middle of a Lisp function. Instead, do all minibuffer input as part of
reading the arguments for a command, in the @code{interactive}
specification. @xref{Defining Commands}.
@defun read-from-minibuffer prompt-string &optional initial-contents keymap read hist default inherit-input-method
@defun read-from-minibuffer prompt &optional initial keymap read history default inherit-input-method
This function is the most general way to get input from the
minibuffer. By default, it accepts arbitrary text and returns it as a
string; however, if @var{read} is non-@code{nil}, then it uses
@ -118,8 +126,8 @@ string; however, if @var{read} is non-@code{nil}, then it uses
Functions}).
The first thing this function does is to activate a minibuffer and
display it with @var{prompt-string} as the prompt. This value must be a
string. Then the user can edit text in the minibuffer.
display it with @var{prompt} (which must be a string) as the
prompt. Then the user can edit text in the minibuffer.
When the user types a command to exit the minibuffer,
@code{read-from-minibuffer} constructs the return value from the text in
@ -131,7 +139,7 @@ reads the text and returns the resulting Lisp object, unevaluated.
The argument @var{default} specifies default values to make available
through the history commands. It should be a string, a list of
strings, or @code{nil}. The string or strings become the minibuffer's
``future history,'' available to the user with @kbd{M-n}.
``future history'', available to the user with @kbd{M-n}.
If @var{read} is non-@code{nil}, then @var{default} is also used
as the input to @code{read}, if the user enters empty input.
@ -148,12 +156,13 @@ value of @code{minibuffer-local-map} is used as the keymap. Specifying
a keymap is the most important way to customize the minibuffer for
various applications such as completion.
The argument @var{hist} specifies which history list variable to use
The argument @var{history} specifies a history list variable to use
for saving the input and for history commands used in the minibuffer.
It defaults to @code{minibuffer-history}. @xref{Minibuffer History}.
It defaults to @code{minibuffer-history}. You can optionally specify
a starting position in the history list as well. @xref{Minibuffer History}.
If the variable @code{minibuffer-allow-text-properties} is
non-@code{nil}, then the string which is returned includes whatever text
non-@code{nil}, then the string that is returned includes whatever text
properties were present in the minibuffer. Otherwise all the text
properties are stripped when the value is returned.
@ -163,9 +172,9 @@ the setting of @code{enable-multibyte-characters} (@pxref{Text
Representations}) from whichever buffer was current before entering the
minibuffer.
Use of @var{initial-contents} is mostly deprecated; we recommend using
Use of @var{initial} is mostly deprecated; we recommend using
a non-@code{nil} value only in conjunction with specifying a cons cell
for @var{hist}. @xref{Initial Input}.
for @var{history}. @xref{Initial Input}.
@end defun
@defun read-string prompt &optional initial history default inherit-input-method
@ -178,11 +187,11 @@ The optional argument @var{default} is used as in
@code{read-from-minibuffer}, except that, if non-@code{nil}, it also
specifies a default value to return if the user enters null input. As
in @code{read-from-minibuffer} it should be a string, a list of
strings, or @code{nil} which is equivalent to an empty string. When
strings, or @code{nil}, which is equivalent to an empty string. When
@var{default} is a string, that string is the default value. When it
is a list of strings, the first string is the default value. (All
these strings are available to the user in the ``future minibuffer
history.'')
history''.)
This function works by calling the
@code{read-from-minibuffer} function:
@ -201,16 +210,16 @@ This function works by calling the
@end smallexample
@end defun
@defun read-regexp prompt &optional default-value
@defun read-regexp prompt &optional default
This function reads a regular expression as a string from the
minibuffer and returns it. The argument @var{prompt} is used as in
@code{read-from-minibuffer}. The keymap used is
@code{minibuffer-local-map}, and @code{regexp-history} is used as the
history list (@pxref{Minibuffer History, regexp-history}).
The optional argument @var{default-value} specifies a default value to
The optional argument @var{default} specifies a default value to
return if the user enters null input; it should be a string, or
@code{nil} which is equivalent to an empty string.
@code{nil}, which is equivalent to an empty string.
In addition, @code{read-regexp} collects a few useful candidates for
input and passes them to @code{read-from-minibuffer}, to make them
@ -234,9 +243,9 @@ function, after computing the list of defaults as described above.
@end defun
@defvar minibuffer-allow-text-properties
If this variable is @code{nil}, then @code{read-from-minibuffer} strips
all text properties from the minibuffer input before returning it.
This variable also affects @code{read-string}. However,
If this variable is @code{nil}, then @code{read-from-minibuffer}
and @code{read-string} strip all text properties from the minibuffer
input before returning it. However,
@code{read-no-blanks-input} (see below), as well as
@code{read-minibuffer} and related functions (@pxref{Object from
Minibuffer,, Reading Lisp Objects With the Minibuffer}), and all
@ -274,6 +283,12 @@ default, it makes the following bindings:
@item @kbd{M-r}
@code{previous-matching-history-element}
@ignore
@c Does not seem worth/appropriate mentioning.
@item @kbd{C-@key{TAB}}
@code{file-cache-minibuffer-complete}
@end ignore
@end table
@end defvar
@ -304,6 +319,8 @@ This function discards text properties, regardless of the value of
@end smallexample
@end defun
@c Slightly unfortunate name, suggesting it might be related to the
@c Nextstep port...
@defvar minibuffer-local-ns-map
This built-in variable is the keymap used as the minibuffer local keymap
in the function @code{read-no-blanks-input}. By default, it makes the
@ -388,23 +405,16 @@ This function simply evaluates the result of a call to
@end defun
@defun edit-and-eval-command prompt form
This function reads a Lisp expression in the minibuffer, and then
evaluates it. The difference between this command and
This function reads a Lisp expression in the minibuffer, evaluates it,
then returns the result. The difference between this command and
@code{eval-minibuffer} is that here the initial @var{form} is not
optional and it is treated as a Lisp object to be converted to printed
representation rather than as a string of text. It is printed with
@code{prin1}, so if it is a string, double-quote characters (@samp{"})
appear in the initial text. @xref{Output Functions}.
The first thing @code{edit-and-eval-command} does is to activate the
minibuffer with @var{prompt} as the prompt. Then it inserts the printed
representation of @var{form} in the minibuffer, and lets the user edit it.
When the user exits the minibuffer, the edited text is read with
@code{read} and then evaluated. The resulting value becomes the value
of @code{edit-and-eval-command}.
In the following example, we offer the user an expression with initial
text which is a valid form already:
text that is already a valid form:
@smallexample
@group
@ -424,7 +434,6 @@ Please edit: (forward-word 1)@point{}
@noindent
Typing @key{RET} right away would exit the minibuffer and evaluate the
expression, thus moving point forward one word.
@code{edit-and-eval-command} returns @code{nil} in this example.
@end defun
@node Minibuffer History
@ -440,7 +449,7 @@ is a list of strings (previous inputs), most recent first.
kinds of inputs. It's the Lisp programmer's job to specify the right
history list for each use of the minibuffer.
You specify a minibuffer history list with the optional @var{hist}
You specify a minibuffer history list with the optional @var{history}
argument to @code{read-from-minibuffer} or @code{completing-read}.
Here are the possible values for it:
@ -456,7 +465,7 @@ Specifying 0 for @var{startpos} is equivalent to just specifying the
symbol @var{variable}. @code{previous-history-element} will display
the most recent element of the history list in the minibuffer. If you
specify a positive @var{startpos}, the minibuffer history functions
behave as if @code{(elt @var{variable} (1- @var{STARTPOS}))} were the
behave as if @code{(elt @var{variable} (1- @var{startpos}))} were the
history element currently shown in the minibuffer.
For consistency, you should also specify that element of the history
@ -464,7 +473,7 @@ as the initial minibuffer contents, using the @var{initial} argument
to the minibuffer input function (@pxref{Initial Input}).
@end table
If you don't specify @var{hist}, then the default history list
If you don't specify @var{history}, then the default history list
@code{minibuffer-history} is used. For other standard history lists,
see below. You can also create your own history list variable; just
initialize it to @code{nil} before the first use.
@ -503,15 +512,15 @@ If the value of this variable is @code{nil}, standard functions that
read from the minibuffer don't add new elements to the history list.
This lets Lisp programs explicitly manage input history by using
@code{add-to-history}. By default, @code{history-add-new-input} is
set to a non-@code{nil} value.
non-@code{nil}.
@end defvar
@defopt history-length
The value of this variable specifies the maximum length for all
history lists that don't specify their own maximum lengths. If the
value is @code{t}, that means there is no maximum (don't delete old
elements). The value of @code{history-length} property of the history
list variable's symbol, if set, overrides this variable for that
elements). If a history list variable's symbol has a non-@code{nil}
@code{history-length} property, it overrides this variable for that
particular history list.
@end defopt
@ -555,11 +564,19 @@ A history list for arguments that are shell commands.
A history list for arguments that are Lisp expressions to evaluate.
@end defvar
@defvar face-name-history
A history list for arguments that are faces.
@end defvar
@c Less common: coding-system-history, input-method-history,
@c command-history, grep-history, grep-find-history,
@c read-envvar-name-history, setenv-history, yes-or-no-p-history.
@node Initial Input
@section Initial Input
Several of the functions for minibuffer input have an argument called
@var{initial} or @var{initial-contents}. This is a mostly-deprecated
@var{initial}. This is a mostly-deprecated
feature for specifying that the minibuffer should start out with
certain text, instead of empty as usual.
@ -576,7 +593,7 @@ to offer useful default inputs to the user.
There is just one situation where you should specify a string for an
@var{initial} argument. This is when you specify a cons cell for the
@var{hist} or @var{history} argument. @xref{Minibuffer History}.
@var{history} argument. @xref{Minibuffer History}.
@var{initial} can also be a cons cell of the form @code{(@var{string}
. @var{position})}. This means to insert @var{string} in the
@ -588,11 +605,10 @@ inconsistently in different functions. In @code{completing-read},
of 0 means the beginning of the string, 1 means after the first
character, etc. In @code{read-minibuffer}, and the other
non-completion minibuffer input functions that support this argument,
1 means the beginning of the string 2 means after the first character,
1 means the beginning of the string, 2 means after the first character,
etc.
Use of a cons cell as the value for @var{initial} arguments is
deprecated in user code.
Use of a cons cell as the value for @var{initial} arguments is deprecated.
@node Completion
@section Completion
@ -603,6 +619,7 @@ starting from an abbreviation for it. Completion works by comparing the
user's input against a list of valid names and determining how much of
the name is determined uniquely by what the user has typed. For
example, when you type @kbd{C-x b} (@code{switch-to-buffer}) and then
@c "This is the sort of English up with which I will not put."
type the first few letters of the name of the buffer to which you wish
to switch, and then type @key{TAB} (@code{minibuffer-complete}), Emacs
extends the name as far as it can.
@ -627,7 +644,7 @@ for reading certain kinds of names with completion.
* Minibuffer Completion:: Invoking the minibuffer with completion.
* Completion Commands:: Minibuffer commands that do completion.
* High-Level Completion:: Convenient special cases of completion
(reading buffer name, file name, etc.).
(reading buffer names, variable names, etc.).
* Reading File Names:: Using completion to read file names and
shell commands.
* Completion Variables:: Variables controlling completion behavior.
@ -662,20 +679,14 @@ If @var{collection} is an alist (@pxref{Association Lists}), the
permissible completions are the elements of the alist that are either
strings, or conses whose @sc{car} is a string or symbol.
Symbols are converted to strings using @code{symbol-name}. Other
elements of the alist are ignored. (Remember that in Emacs Lisp, the
elements of the alist are ignored. (Remember that in Emacs Lisp, the
elements of alists do not @emph{have} to be conses.) In particular, a
list of strings is allowed, even though we usually do not
think of such lists as alists.
@cindex obarray in completion
If @var{collection} is an obarray (@pxref{Creating Symbols}), the names
of all symbols in the obarray form the set of permissible completions. The
global variable @code{obarray} holds an obarray containing the names of
all interned Lisp symbols.
Note that the only valid way to make a new obarray is to create it
empty and then add symbols to it one by one using @code{intern}.
Also, you cannot intern a given symbol in more than one obarray.
of all symbols in the obarray form the set of permissible completions.
If @var{collection} is a hash table, then the keys that are strings
are the possible completions. Other keys are ignored.
@ -756,16 +767,20 @@ too short). Both of those begin with the string @samp{foobar}.
@end smallexample
@end defun
@defun all-completions string collection &optional predicate nospace
@c Removed obsolete argument nospace.
@defun all-completions string collection &optional predicate
This function returns a list of all possible completions of
@var{string}. The arguments to this function (aside from
@var{nospace}) are the same as those of @code{try-completion}. Also,
this function uses @code{completion-regexp-list} in the same way that
@var{string}. The arguments to this function
@c (aside from @var{nospace})
are the same as those of @code{try-completion}, and it
uses @code{completion-regexp-list} in the same way that
@code{try-completion} does.
@ignore
The optional argument @var{nospace} is obsolete. If it is
non-@code{nil}, completions that start with a space are ignored unless
@var{string} starts with a space.
@end ignore
If @var{collection} is a function, it is called with three arguments:
@var{string}, @var{predicate} and @code{t}; then @code{all-completions}
@ -835,7 +850,7 @@ pertains to the area after @code{"/usr/"} and before @code{"/doc"}.
@end defun
If you store a completion alist in a variable, you should mark the
variable as ``risky'' with a non-@code{nil}
variable as ``risky'' by giving it a non-@code{nil}
@code{risky-local-variable} property. @xref{File Local Variables}.
@defvar completion-ignore-case
@ -864,7 +879,7 @@ proper value is done the first time you do completion using @var{var}.
It is done by calling @var{fun} with no arguments. The
value @var{fun} returns becomes the permanent value of @var{var}.
Here is a usage example:
Here is an example:
@smallexample
(defvar foo (lazy-completion-table foo make-my-alist))
@ -879,7 +894,7 @@ Here is a usage example:
This section describes the basic interface for reading from the
minibuffer with completion.
@defun completing-read prompt collection &optional predicate require-match initial hist default inherit-input-method
@defun completing-read prompt collection &optional predicate require-match initial history default inherit-input-method
This function reads a string in the minibuffer, assisting the user by
providing completion. It activates the minibuffer with prompt
@var{prompt}, which must be a string.
@ -934,13 +949,13 @@ The function @code{completing-read} uses
@code{minibuffer-local-must-match-map} if @var{require-match} is
non-@code{nil}. @xref{Completion Commands}.
The argument @var{hist} specifies which history list variable to use for
The argument @var{history} specifies which history list variable to use for
saving the input and for minibuffer history commands. It defaults to
@code{minibuffer-history}. @xref{Minibuffer History}.
The argument @var{initial} is mostly deprecated; we recommend using a
non-@code{nil} value only in conjunction with specifying a cons cell
for @var{hist}. @xref{Initial Input}. For default input, use
for @var{history}. @xref{Initial Input}. For default input, use
@var{default} instead.
If the argument @var{inherit-input-method} is non-@code{nil}, then the
@ -949,7 +964,7 @@ Methods}) and the setting of @code{enable-multibyte-characters}
(@pxref{Text Representations}) from whichever buffer was current before
entering the minibuffer.
If the built-in variable @code{completion-ignore-case} is
If the variable @code{completion-ignore-case} is
non-@code{nil}, completion ignores case when comparing the input
against the possible matches. @xref{Basic Completion}. In this mode
of operation, @var{predicate} must also ignore case, or you will get
@ -1082,8 +1097,8 @@ uses this to highlight text in the completion list for better visual
feedback. This is not needed in the minibuffer; for minibuffer
completion, you can pass @code{nil}.
This function is called by @code{minibuffer-completion-help}. The
most common way to use it is together with
This function is called by @code{minibuffer-completion-help}. A
common way to use it is together with
@code{with-output-to-temp-buffer}, like this:
@example
@ -1117,7 +1132,7 @@ keymap makes the following bindings:
@end table
@noindent
with other characters bound as in @code{minibuffer-local-map}
and uses @code{minibuffer-local-map} as its parent keymap
(@pxref{Definition of minibuffer-local-map}).
@end defvar
@ -1129,15 +1144,6 @@ minibuffer unconditionally. By default, this keymap makes the following
bindings:
@table @asis
@item @kbd{?}
@code{minibuffer-completion-help}
@item @key{SPC}
@code{minibuffer-complete-word}
@item @key{TAB}
@code{minibuffer-complete}
@item @kbd{C-j}
@code{minibuffer-complete-and-exit}
@ -1146,25 +1152,21 @@ bindings:
@end table
@noindent
with other characters bound as in @code{minibuffer-local-map}.
and uses @code{minibuffer-local-completion-map} as its parent keymap.
@end defvar
@defvar minibuffer-local-filename-completion-map
This is like @code{minibuffer-local-completion-map}
except that it does not bind @key{SPC}. This keymap is used by the
function @code{read-file-name}.
This is a sparse keymap that simply unbinds @key{SPC}; because
filenames can contain spaces. The function @code{read-file-name}
combines this keymap with either @code{minibuffer-local-completion-map}
or @code{minibuffer-local-must-match-map}.
@end defvar
@defvar minibuffer-local-filename-must-match-map
This is like @code{minibuffer-local-must-match-map}
except that it does not bind @key{SPC}. This keymap is used by the
function @code{read-file-name}.
@end defvar
@node High-Level Completion
@subsection High-Level Completion Functions
This section describes the higher-level convenient functions for
This section describes the higher-level convenience functions for
reading certain sorts of names with completion.
In most cases, you should not call these functions in the middle of a
@ -1238,7 +1240,7 @@ for which @code{commandp} returns @code{t}. @xref{Interactive Call}.
The argument @var{default} specifies what to return if the user enters
null input. It can be a symbol, a string or a list of strings. If it
is a string, @code{read-command} interns it before returning it.
If it is a list, @code{read-command} returns the first element of this list.
If it is a list, @code{read-command} interns the first element of this list.
If @var{default} is @code{nil}, that means no default has been
specified; then if the user enters null input, the return value is
@code{(intern "")}, that is, a symbol whose name is an empty string.
@ -1280,51 +1282,11 @@ complete in the set of extant Lisp symbols, and it uses the
@defun read-variable prompt &optional default
@anchor{Definition of read-variable}
This function reads the name of a user variable and returns it as a
symbol.
The argument @var{default} specifies the default value to return if
the user enters null input. It can be a symbol, a string, or a list
of strings. If it is a string, @code{read-variable} interns it to
make the default value. If it is a list, @code{read-variable} interns
the first element. If @var{default} is @code{nil}, that means no
default has been specified; then if the user enters null input, the
return value is @code{(intern "")}.
@example
@group
(read-variable "Variable name? ")
;; @r{After evaluation of the preceding expression,}
;; @r{the following prompt appears,}
;; @r{with an empty minibuffer:}
@end group
@group
---------- Buffer: Minibuffer ----------
Variable name? @point{}
---------- Buffer: Minibuffer ----------
@end group
@end example
@noindent
If the user then types @kbd{fill-p @key{RET}}, @code{read-variable}
returns @code{fill-prefix}.
In general, @code{read-variable} is similar to @code{read-command},
but uses the predicate @code{custom-variable-p} instead of
@code{commandp}:
@cindex @code{custom-variable-p} example
@example
@group
(read-variable @var{prompt})
@equiv{}
(intern
(completing-read @var{prompt} obarray
'custom-variable-p t nil))
@end group
@end example
This function reads the name of a customizable variable and returns it
as a symbol. Its arguments have the same form as those of
@code{read-command}. It behaves just like @code{read-command}, except
that it uses the predicate @code{custom-variable-p} instead of
@code{commandp}.
@end defun
@deffn Command read-color &optional prompt convert allow-empty display
@ -1342,7 +1304,7 @@ minibuffer. However, when called interactively or if the optional
argument @var{convert} is non-@code{nil}, it converts any input color
name into the corresponding RGB value string and instead returns that.
This function requires a valid color specification to be input.
Empty color names are allowed when @code{allow-empty} is
Empty color names are allowed when @var{allow-empty} is
non-@code{nil} and the user enters null input.
Interactively, or when @var{display} is non-@code{nil}, the return
@ -1360,7 +1322,7 @@ and @code{read-input-method-name}, in @ref{Input Methods}.
The high-level completion functions @code{read-file-name},
@code{read-directory-name}, and @code{read-shell-command} are designed
to read file names, directory names, and shell commands respectively.
to read file names, directory names, and shell commands, respectively.
They provide special features, including automatic insertion of the
default directory.
@ -1369,15 +1331,29 @@ This function reads a file name, prompting with @var{prompt} and
providing completion.
As an exception, this function reads a file name using a graphical
file dialog instead of the minibuffer, if (i) it is invoked via a
mouse command, and (ii) the selected frame is on a graphical display
supporting such dialogs, and (iii) the variable @code{use-dialog-box}
is non-@code{nil} (@pxref{Dialog Boxes,, Dialog Boxes, emacs, The GNU
Emacs Manual}), and (iv) the @var{directory} argument, described
below, does not specify a remote file (@pxref{Remote Files,, Remote
Files, emacs, The GNU Emacs Manual}). The exact behavior when using a
graphical file dialog is platform-dependent. Here, we simply document
the behavior when using the minibuffer.
file dialog instead of the minibuffer, if all of the following are
true:
@enumerate
@item
It is invoked via a mouse command.
@item
The selected frame is on a graphical display supporting such dialogs.
@item
The variable @code{use-dialog-box} is non-@code{nil}.
@xref{Dialog Boxes,, Dialog Boxes, emacs, The GNU Emacs Manual}.
@item
The @var{directory} argument, described below, does not specify a
remote file. @xref{Remote Files,, Remote Files, emacs, The GNU Emacs Manual}.
@end enumerate
@noindent
The exact behavior when using a graphical file dialog is
platform-dependent. Here, we simply document the behavior when using
the minibuffer.
@code{read-file-name} does not automatically expand the returned file
name. You must call @code{expand-file-name} yourself if an absolute
@ -1388,7 +1364,7 @@ The optional argument @var{require-match} has the same meaning as in
The argument @var{directory} specifies the directory to use for
completing relative file names. It should be an absolute directory
name. If @code{insert-default-directory} is non-@code{nil},
name. If the variable @code{insert-default-directory} is non-@code{nil},
@var{directory} is also inserted in the minibuffer as initial input.
It defaults to the current buffer's value of @code{default-directory}.
@ -1396,9 +1372,9 @@ If you specify @var{initial}, that is an initial file name to insert
in the buffer (after @var{directory}, if that is inserted). In this
case, point goes at the beginning of @var{initial}. The default for
@var{initial} is @code{nil}---don't insert any file name. To see what
@var{initial} does, try the command @kbd{C-x C-v}. @strong{Please
note:} we recommend using @var{default} rather than @var{initial} in
most cases.
@var{initial} does, try the command @kbd{C-x C-v} in a buffer visiting
a file. @strong{Please note:} we recommend using @var{default} rather
than @var{initial} in most cases.
If @var{default} is non-@code{nil}, then the function returns
@var{default} if the user exits the minibuffer with the same non-empty
@ -1501,7 +1477,7 @@ use the code letters @samp{f} or @samp{F} in their interactive form.
@xref{Interactive Codes,, Code Characters for interactive}.) Its
value controls whether @code{read-file-name} starts by placing the
name of the default directory in the minibuffer, plus the initial file
name if any. If the value of this variable is @code{nil}, then
name, if any. If the value of this variable is @code{nil}, then
@code{read-file-name} does not place any initial input in the
minibuffer (unless you specify initial input with the @var{initial}
argument). In that case, the default directory is still used for
@ -1544,17 +1520,17 @@ The file is @point{}
@end example
@end defopt
@defun read-shell-command prompt &optional initial-contents hist &rest args
@defun read-shell-command prompt &optional initial history &rest args
This function reads a shell command from the minibuffer, prompting
with @var{prompt} and providing intelligent completion. It completes
the first word of the command using candidates that are appropriate
for command names, and the rest of the command words as file names.
This function uses @code{minibuffer-local-shell-command-map} as the
keymap for minibuffer input. The @var{hist} argument specifies the
keymap for minibuffer input. The @var{history} argument specifies the
history list to use; if is omitted or @code{nil}, it defaults to
@code{shell-command-history} (@pxref{Minibuffer History,
shell-command-history}). The optional argument @var{initial-contents}
shell-command-history}). The optional argument @var{initial}
specifies the initial content of the minibuffer (@pxref{Initial
Input}). The rest of @var{args}, if present, are used as the
@var{default} and @var{inherit-input-method} arguments in
@ -1563,20 +1539,22 @@ Input}). The rest of @var{args}, if present, are used as the
@defvar minibuffer-local-shell-command-map
This keymap is used by @code{read-shell-command} for completing
command and file names that are part of a shell command.
command and file names that are part of a shell command. It uses
@code{minibuffer-local-map} as its parent keymap, and binds @key{TAB}
to @code{completion-at-point}.
@end defvar
@node Completion Variables
@subsection Completion Variables
Here are some variables which can be used to alter the default
Here are some variables that can be used to alter the default
completion behavior.
@cindex completion styles
@defopt completion-styles
The value of this variable is a list of completion style (symbols) to
use for performing completion. A @dfn{completion style} is a set of
rules for generating completions. Each symbol in occurring this list
rules for generating completions. Each symbol occurring this list
must have a corresponding entry in @code{completion-styles-alist}.
@end defopt
@ -1623,13 +1601,14 @@ description of the available completion styles.
@defopt completion-category-overrides
This variable specifies special completion styles and other completion
behaviors to use when completing certain types of text. Its value
should be a list of the form @code{(@var{category} . @var{alist})}.
@var{category} is a symbol describing what is being completed;
currently, the @code{buffer} and @code{file} categories are defined,
but others can be defined via specialized completion functions
(@pxref{Programmed Completion}). @var{alist} is an association list
describing how completion should behave for the corresponding
category. The following alist keys are supported:
should be an alist with elements of the form @code{(@var{category}
. @var{alist})}. @var{category} is a symbol describing what is being
completed; currently, the @code{buffer}, @code{file}, and
@code{unicode-name} categories are defined, but others can be defined
via specialized completion functions (@pxref{Programmed Completion}).
@var{alist} is an association list describing how completion should
behave for the corresponding category. The following alist keys are
supported:
@table @code
@item styles
@ -1662,7 +1641,7 @@ the completion.
The value should be a function to run after performing completion.
The function should accept two arguments, @var{string} and
@var{status}, where @var{string} is the text to which the field was
completed and @var{status} indicates what kind of operation happened:
completed, and @var{status} indicates what kind of operation happened:
@code{finished} if text is now complete, @code{sole} if the text
cannot be further completed but completion is not finished, or
@code{exact} if the text is a valid completion but may be further
@ -1726,9 +1705,10 @@ some completion alternative; @code{nil} otherwise.
@item (boundaries . @var{suffix})
This specifies a @code{completion-boundaries} operation. The function
should return @code{(boundaries START . END)}, where START is the
position of the beginning boundary in the specified string, and END is
the position of the end boundary in SUFFIX.
should return @code{(boundaries @var{start} . @var{end})}, where
@var{start} is the position of the beginning boundary in the specified
string, and @var{end} is the position of the end boundary in
@var{suffix}.
@item metadata
This specifies a request for information about the state of the
@ -1773,7 +1753,7 @@ the same as for @code{display-sort-function}.
@defun completion-table-dynamic function
This function is a convenient way to write a function that can act as
programmed completion function. The argument @var{function} should be
a programmed completion function. The argument @var{function} should be
a function that takes one argument, a string, and returns an alist of
possible completions of it. You can think of
@code{completion-table-dynamic} as a transducer between that interface
@ -1827,7 +1807,7 @@ satisfy.
@item :exclusive
If the value is @code{no}, then if the completion table fails to match
the text at point, then @code{completion-at-point} moves on to the
the text at point, @code{completion-at-point} moves on to the
next function in @code{completion-at-point-functions} instead of
reporting a completion failure.
@end table
@ -1841,7 +1821,7 @@ old code to using @code{completion-at-point}.
The first function in @code{completion-at-point-functions} to return a
non-@code{nil} value is used by @code{completion-at-point}. The
remaining functions are not called. The exception to this is when
there is a @code{:exclusive} specification, as described above.
there is an @code{:exclusive} specification, as described above.
@end defvar
The following function provides a convenient way to perform
@ -1879,7 +1859,7 @@ answer.
using the mouse---more precisely, if @code{last-nonmenu-event}
(@pxref{Command Loop Info}) is either @code{nil} or a list---then it
uses a dialog box or pop-up menu to ask the question. Otherwise, it
uses keyboard input. You can force use of the mouse or use of keyboard
uses keyboard input. You can force use either of the mouse or of keyboard
input by binding @code{last-nonmenu-event} to a suitable value around
the call.
@ -1890,7 +1870,7 @@ the call.
This function asks the user a question, expecting input in the echo
area. It returns @code{t} if the user types @kbd{y}, @code{nil} if the
user types @kbd{n}. This function also accepts @key{SPC} to mean yes
and @key{DEL} to mean no. It accepts @kbd{C-]} to mean ``quit,'' like
and @key{DEL} to mean no. It accepts @kbd{C-]} to mean ``quit'', like
@kbd{C-g}, because the question might look like a minibuffer and for
that reason the user might try to use @kbd{C-]} to get out. The answer
is a single character, with no @key{RET} needed to terminate it. Upper
@ -1914,12 +1894,16 @@ hardwired. The keymap @code{query-replace-map} specifies them.
In the following example, the user first types @kbd{q}, which is
invalid. At the next prompt the user types @kbd{y}.
@c Need an interactive example, because otherwise the return value
@c obscures the display of the valid answer.
@smallexample
@group
(y-or-n-p "Do you need a lift? ")
(defun ask ()
(interactive)
(y-or-n-p "Do you need a lift? "))
;; @r{After evaluation of the preceding expression,}
;; @r{the following prompt appears in the echo area:}
;; @r{After evaluation of the preceding definition, @kbd{M-x ask}}
;; @r{causes the following prompt to appear in the echo area:}
@end group
@group
@ -1951,10 +1935,10 @@ We show successive lines of echo area messages, but only one actually
appears on the screen at a time.
@end defun
@defun y-or-n-p-with-timeout prompt seconds default-value
@defun y-or-n-p-with-timeout prompt seconds default
Like @code{y-or-n-p}, except that if the user fails to answer within
@var{seconds} seconds, this function stops waiting and returns
@var{default-value}. It works by setting up a timer; see @ref{Timers}.
@var{default}. It works by setting up a timer; see @ref{Timers}.
The argument @var{seconds} may be an integer or a floating point number.
@end defun
@ -2022,7 +2006,7 @@ single-character answer in the echo area for each one.
The value of @var{list} specifies the objects to ask questions about.
It should be either a list of objects or a generator function. If it is
a function, it should expect no arguments, and should return either the
next object to ask about, or @code{nil} meaning stop asking questions.
next object to ask about, or @code{nil}, meaning to stop asking questions.
The argument @var{prompter} specifies how to ask each question. If
@var{prompter} is a string, the question text is computed like this:
@ -2038,8 +2022,8 @@ where @var{object} is the next object to ask about (as obtained from
If not a string, @var{prompter} should be a function of one argument
(the next object to ask about) and should return the question text. If
the value is a string, that is the question to ask the user. The
function can also return @code{t} meaning do act on this object (and
don't ask the user), or @code{nil} meaning ignore this object (and don't
function can also return @code{t}, meaning do act on this object (and
don't ask the user), or @code{nil}, meaning ignore this object (and don't
ask the user).
The argument @var{actor} says how to act on the answers that the user
@ -2080,7 +2064,7 @@ answer); @var{function} is a function of one argument (an object from
When the user responds with @var{char}, @code{map-y-or-n-p} calls
@var{function}. If it returns non-@code{nil}, the object is considered
``acted upon,'' and @code{map-y-or-n-p} advances to the next object in
``acted upon'', and @code{map-y-or-n-p} advances to the next object in
@var{list}. If it returns @code{nil}, the prompt is repeated for the
same object.
@ -2092,12 +2076,14 @@ If @code{map-y-or-n-p} is called in a command that was invoked using the
mouse---more precisely, if @code{last-nonmenu-event} (@pxref{Command
Loop Info}) is either @code{nil} or a list---then it uses a dialog box
or pop-up menu to ask the question. In this case, it does not use
keyboard input or the echo area. You can force use of the mouse or use
keyboard input or the echo area. You can force use either of the mouse or
of keyboard input by binding @code{last-nonmenu-event} to a suitable
value around the call.
The return value of @code{map-y-or-n-p} is the number of objects acted on.
@end defun
@c FIXME An example of this would be more useful than all the
@c preceding examples of simple things.
@node Reading a Password
@section Reading a Password
@ -2160,6 +2146,19 @@ This command replaces the minibuffer contents with the value of the
regular expression).
@end deffn
@deffn Command previous-complete-history-element n
This command replaces the minibuffer contents with the value of the
@var{n}th previous (older) history element that completes the current
contents of the minibuffer before the point.
@end deffn
@deffn Command next-complete-history-element n
This command replaces the minibuffer contents with the value of the
@var{n}th next (newer) history element that completes the current
contents of the minibuffer before the point.
@end deffn
@node Minibuffer Windows
@section Minibuffer Windows
@cindex minibuffer windows
@ -2169,7 +2168,7 @@ and test whether they are active.
@defun active-minibuffer-window
This function returns the currently active minibuffer window, or
@code{nil} if none is currently active.
@code{nil} if there is none.
@end defun
@defun minibuffer-window &optional frame
@ -2202,8 +2201,8 @@ there can be more than one minibuffer window if there is more than one
frame.
@defun minibuffer-window-active-p window
This function returns non-@code{nil} if @var{window}, assumed to be
a minibuffer window, is currently active.
This function returns non-@code{nil} if @var{window} is the currently
active minibuffer window.
@end defun
@node Minibuffer Contents
@ -2318,7 +2317,7 @@ minibuffer, it scrolls this window.
@end defvar
@defun minibuffer-selected-window
This function returns the window which was selected when the
This function returns the window that was selected when the
minibuffer was entered. If selected window is not a minibuffer
window, it returns @code{nil}.
@end defun
@ -2329,10 +2328,19 @@ windows. If a float, it specifies a fraction of the height of the
frame. If an integer, it specifies a number of lines.
@end defopt
@vindex minibuffer-message-timeout
@defun minibuffer-message string &rest args
This function displays @var{string} temporarily at the end of the
minibuffer text, for two seconds, or until the next input event
arrives, whichever comes first. If @var{args} is non-@code{nil}, the
actual message is obtained by passing @var{string} and @var{args}
through @code{format}. @xref{Formatting Strings}.
minibuffer text, for a few seconds, or until the next input event
arrives, whichever comes first. The variable
@code{minibuffer-message-timeout} specifies the number of seconds to
wait in the absence of input. It defaults to 2. If @var{args} is
non-@code{nil}, the actual message is obtained by passing @var{string}
and @var{args} through @code{format}. @xref{Formatting Strings}.
@end defun
@deffn Command minibuffer-inactive-mode
This is the major mode used in inactive minibuffers. It uses
keymap @code{minibuffer-inactive-mode-map}. This can be useful
if the minibuffer is in a separate frame. @xref{Minibuffers and Frames}.
@end deffn

File diff suppressed because it is too large Load diff

View file

@ -658,8 +658,8 @@ Minibuffers
* Multiple Queries:: Asking a series of similar questions.
* Reading a Password:: Reading a password from the terminal.
* Minibuffer Commands:: Commands used as key bindings in minibuffers.
* Minibuffer Contents:: How such commands access the minibuffer text.
* Minibuffer Windows:: Operating on the special minibuffer windows.
* Minibuffer Contents:: How such commands access the minibuffer text.
* Recursive Mini:: Whether recursive entry to minibuffer is allowed.
* Minibuffer Misc:: Various customization hooks and variables.
@ -670,7 +670,7 @@ Completion
* Minibuffer Completion:: Invoking the minibuffer with completion.
* Completion Commands:: Minibuffer commands that do completion.
* High-Level Completion:: Convenient special cases of completion
(reading buffer name, file name, etc.).
(reading buffer names, variable names, etc.).
* Reading File Names:: Using completion to read file names and
shell commands.
* Completion Variables:: Variables controlling completion behavior.

View file

@ -657,8 +657,8 @@ Minibuffers
* Multiple Queries:: Asking a series of similar questions.
* Reading a Password:: Reading a password from the terminal.
* Minibuffer Commands:: Commands used as key bindings in minibuffers.
* Minibuffer Contents:: How such commands access the minibuffer text.
* Minibuffer Windows:: Operating on the special minibuffer windows.
* Minibuffer Contents:: How such commands access the minibuffer text.
* Recursive Mini:: Whether recursive entry to minibuffer is allowed.
* Minibuffer Misc:: Various customization hooks and variables.
@ -669,7 +669,7 @@ Completion
* Minibuffer Completion:: Invoking the minibuffer with completion.
* Completion Commands:: Minibuffer commands that do completion.
* High-Level Completion:: Convenient special cases of completion
(reading buffer name, file name, etc.).
(reading buffer names, variable names, etc.).
* Reading File Names:: Using completion to read file names and
shell commands.
* Completion Variables:: Variables controlling completion behavior.

View file

@ -1,3 +1,23 @@
2012-04-20 Glenn Morris <rgm@gnu.org>
* faq.texi (New in Emacs 24): New section.
(Packages that do not come with Emacs): Mention M-x list-packages.
2012-04-20 Glenn Morris <rgm@gnu.org>
* Makefile.in: Replace non-portable use of $< in emacs-gnutls rules.
2012-04-20 Eli Zaretskii <eliz@gnu.org>
* makefile.w32-in (INFO_TARGETS, DVI_TARGETS, clean): Add emacs-gnutls.
($(infodir)/emacs-gnutls, emacs-gnutls.dvi): New targets.
2012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
* emacs-gnutls.texi: Add documentation for the GnuTLS integration.
* Makefile.in: Add emacs-gnutls.texi to build.
2012-04-20 Alan Mackenzie <acm@muc.de>
2012-04-14 Alan Mackenzie <acm@muc.de>
* cc-mode.texi (c-offsets-alist): Correct a typo.

View file

@ -942,6 +942,7 @@ status of its latest version.
@menu
* Origin of the term Emacs::
* Latest version of Emacs::
* New in Emacs 24::
* New in Emacs 23::
* New in Emacs 22::
* New in Emacs 21::
@ -1009,12 +1010,84 @@ Emacs, type @kbd{C-h C-n} (@kbd{M-x view-emacs-news}). As of Emacs 22,
you can give this command a prefix argument to read about which features
were new in older versions.
@node New in Emacs 24
@section What is different about Emacs 24?
@cindex Differences between Emacs 23 and Emacs 24
@cindex Emacs 24, new features in
@itemize
@cindex packages, installing more
@item
Emacs now includes a package manager. Type @kbd{M-x list-packages} to
get started. You can use this to download and automatically install
many more Lisp packages.
@cindex lexical binding
@item
Emacs Lisp now supports lexical binding on a per-file basis. In
@emph{lexical binding}, variable references must be located textually
within the binding construct. This contrasts with @emph{dynamic
binding}, where programs can refer to variables defined outside their
local textual scope. A Lisp file can use a local variable setting of
@code{lexical-binding: t} to indicate that the contents should be
interpreted using lexical binding. See the Emacs Lisp Reference
Manual for more details.
@cindex bidirectional display
@cindex right-to-left languages
@item
Some human languages, such as English, are written from left to right.
Others, such as Arabic, are written from right to left. Emacs now has
support for any mixture of these forms---this is ``bidirectional text''.
@item
Handling of text selections has been improved, and now integrates
better with external clipboards.
@cindex themes
@item
A new command @kbd{customize-themes} allows you to easily change the
appearance of your Emacs.
@item
Emacs can be compiled with the Gtk+ 3 toolkit.
@item
Support for several new external libraries can be included at compile
time:
@itemize
@item
``Security-Enhanced Linux'' (SELinux) is a Linux kernel feature that
provides more sophisticated file access controls than ordinary
``Unix-style'' file permissions.
@item
The ImageMagick display library. This allows you to display many more
image format in Emacs, as well as carry out transformations such as
rotations.
@item
The GnuTLS library for secure network communications. Emacs uses this
transparently for email if your mail server supports it.
@item
The libxml2 library for parsing XML structures.
@end itemize
@item
Much more flexibility in the handling of windows and buffer display.
@end itemize
As always, consult the @file{NEWS} file for more information.
@node New in Emacs 23
@section What is different about Emacs 23?
@cindex Differences between Emacs 22 and Emacs 23
@cindex Emacs 23, new features in
@cindex Recently introduced features
@cindex Default features
@itemize
@ -1065,8 +1138,7 @@ Other changes include: support for serial port access; D-Bus bindings; a
new Visual Line mode for line-motion; improved completion; a new mode
(@samp{DocView}) for viewing of PDF, PostScript, and DVI documents; nXML
mode (for editing XML documents) is included; VC has been updated for
newer version control systems; etc. As always, consult the @file{NEWS}
file for more information.
newer version control systems; etc.
@node New in Emacs 22
@ -3225,6 +3297,14 @@ see @ref{Packages that do not come with Emacs}.
@cindex Emacs Lisp List
@cindex Emacs Lisp Archive
Your first port of call should be the @kbd{M-x list-packages} command.
This connects to the @uref{http:///elpa.gnu.org, GNU ELPA} (``Emacs
Lisp Package Archive'') server and fetches the list of additional
packages that it offers. These are GNU packages that are available
for use with Emacs, but are distributed separately. Select a package
to get more details about the features that it offers, and then if you
wish, Emacs can download and automatically install it for you.
@uref{http://www.damtp.cam.ac.uk/user/sje30/emacs/ell.html, The Emacs Lisp
List (ELL)}, maintained by @email{S.J.Eglen@@damtp.cam.ac.uk, Stephen Eglen},
aims to provide one compact list with links to all of the current Emacs

View file

@ -1,4 +1,4 @@
Copyright (C) 2006-2012 Free Software Foundation, Inc.
Copyright (C) 2006-2012 Free Software Foundation, Inc.
See end for license conditions.
@ -44,13 +44,24 @@ Ref: The "Tips" Appendix in the Emacs Lisp Reference.
* Copyright Assignment
We can accept small changes (roughly, fewer than 15 lines) without
legal papers. Anything more substantial requires a copyright
disclaimer or assignment (the latter is preferred, especially for
larger changes). Both of these involved filling out a short form and
filing it with the FSF. The process is straightforward -- contact us
at emacs-devel@gnu.org to obtain the relevant forms.
The FSF (Free Software Foundation) is the copyright holder for GNU Emacs.
The FSF is a nonprofit with a worldwide mission to promote computer
user freedom and to defend the rights of all free software users.
For general information, see the website http://www.fsf.org/ .
Generally speaking, for non-trivial contributions to GNU Emacs we
require that the copyright be assigned to the FSF. For the reasons
behind this, see: http://www.gnu.org/licenses/why-assign.html .
Copyright assignment is a simple process. If you live in the US, you
can do it entirely electronically. We can help you get started, and
answer any questions you may have (or point you to the people with the
answers), at the emacs-devel@gnu.org mailing list.
A copyright disclaimer is also a possibility, but we prefer an assignment.
We can accept small changes (roughly, fewer than 15 lines) without
an assignment. This is a cumulative limit (e.g. three separate 5 line
patches) over all your contributions.
* Getting the Source Code

View file

@ -1,3 +1,9 @@
2012-04-20 Glenn Morris <rgm@gnu.org>
* CONTRIBUTE: Expand a bit on copyright assignments.
* MORE.STUFF: General update. Mention list-packages.
Remove many old/outdated URLs.
2012-04-10 Lars Magne Ingebrigtsen <larsi@gnus.org>
* publicsuffix.txt: New file (bug#1401).

View file

@ -1,99 +1,87 @@
More Neat Stuff for your Emacs
Copyright (C) 1993, 1999, 2001-2012 Free Software Foundation, Inc.
Copyright (C) 1993, 1999, 2001-2012 Free Software Foundation, Inc.
See the end of the file for license conditions.
This file describes GNU Emacs programs and resources that are
The easiest way to add more features to your Emacs is to use the command
M-x list-packages. This contacts the server at <URL:http://elpa.gnu.org>,
where many Emacs Lisp packages are stored. These are distributed
separately from Emacs itself for reasons of space, etc. You can browse
the resulting *Packages* buffer to see what is available, and then
Emacs can automatically download and install the packages that you
select. See the section "Emacs Lisp Packages" in the Emacs manual
for more details.
Below we describe some GNU Emacs programs and resources that are
maintained by other people. Some of these may become part of the
Emacs distribution in the future. Others we unfortunately can't
distribute, even though they are free software, because we lack legal
papers for copyright purposes. Also included are sites where
development versions of some packages distributed with Emacs may be
found.
Emacs distribution, or GNU ELPA, in the future. Others we unfortunately
can't distribute, even though they are free software, because we lack
legal papers for copyright purposes.
You might also look at the Emacs web page
<URL:http://www.gnu.org/software/emacs/emacs.html>. If you use the
Windows-32 version of Emacs, see the NTEmacs sites listed in the FAQ.
Also listed are sites where development versions of some packages
distributed with Emacs may be found.
Please submit a bug report if you find that any of the addresses
listed here fail.
It is difficult to keep this file up-to-date, and it only lists a fraction
of the Emacs modes that are available. If you are interested in
a particular feature, then after checking Emacs itself and GNU ELPA,
a web search is often the best way to find results.
* The gnu-emacs-sources mailing list
<URL:https://lists.gnu.org/mailman/listinfo/gnu-emacs-sources>
which is gatewayed to the gnu.emacs.sources newsgroup (although the
connection between the two can be unreliable) is an official
place where people can post or announce their extensions to Emacs.
* The `Emacs Lisp List' at
<URL:http://www.damtp.cam.ac.uk/user/eglen/emacs/ell.html> has pointers
to sources of a large number of packages.
* gnu.emacs.sources
Packages posted to the gnu.emacs.sources newsgroup (see
etc/MAILINGLISTS) might be archived specifically (try a web search
engine) or retrievable from general Usenet archive services.
<URL:http://www.damtp.cam.ac.uk/user/sje30/emacs/ell.html> has pointers
to sources of a large number of packages. Unfortunately, at the time
of writing it seems to no longer be updating.
* emacswiki.org
The Emacs Wiki has an area for storing elisp files
<URL:http://www.emacswiki.org/cgi-bin/wiki/ElispArea>.
The Emacs Wiki has an area for storing elisp files
<URL:http://www.emacswiki.org/cgi-bin/wiki/ElispArea>.
* WikEmacs
<URL:http://wikemacs.org> is an alternative wiki for Emacs.
* Emacs tutorials and manuals
* Emacs slides and tutorials can be found here:
* Emacs slides and tutorials can be found here:
<URL:http://web.psung.name/emacs/>
* Maintenance versions of some packages distributed with Emacs
You might find bug-fixes or enhancements in these places.
In many cases, however, development of these packages has shifted to Emacs,
so you will find the latest version in Emacs.
* Ada-mode: <URL:http://stephe-leake.org/emacs/ada-mode/emacs-ada-mode.html>
* Battery and Info Look: <URL:http://ralph-schleicher.de/emacs.html>
* BS: <URL:http://www.geekware.de/software/emacs/index.html>
* Calculator: <URL:http://www.barzilay.org/misc/calculator.el>
* CC mode: <URL:http://cc-mode.sourceforge.net/>
* CPerl: <URL:http://math.berkeley.edu/~ilya/software/emacs/>
* Ediff and Viper: <URL:http://www.cs.sunysb.edu/~kifer/emacs.html>
* Eldoc and Rlogin:
<URL:http://www.splode.com/~friedman/software/emacs-lisp/>
* ERC: <URL:http://savannah.gnu.org/projects/erc/>
* Etags: <URL:http://fly.isti.cnr.it/software/>
* Gnus: <URL:http://www.gnus.org/>
* Ispell: <URL:http://www.kdstevens.com/stevens/ispell-page.html>
* MH-E: <URL:http://mh-e.sourceforge.net/>
* nXML: <URL:http://www.thaiopensource.com/nxml-mode/>
* Org mode: <URL:http://orgmode.org/>
* PS mode: <URL:http://odur.let.rug.nl/%7Ekleiweg/postscript/>
* PS-print: <URL:http://www.emacswiki.org/cgi-bin/wiki/PsPrintPackage>
* Python: <URL:http://www.loveshack.ukfsn.org/emacs/>
* QuickURL: <URL:http://www.davep.org/emacs/>
* RefTeX: <URL:http://www.gnu.org/software/auctex/reftex.html>
* Remember: <URL:https://gna.org/p/remember-el>
* Speedbar, Checkdoc etc: <URL:http://cedet.sourceforge.net/>
* SQL: <URL:http://www.emacswiki.org/cgi-bin/wiki/sql.el>
* CEDET: <URL:http://cedet.sourceforge.net/>
* Tramp: Remote file access via rsh/ssh
<URL:http://savannah.gnu.org/projects/tramp/>
* Webjump: <URL:http://www.neilvandyke.org/webjump>
* Auxiliary files
* (Tex)info files for use with Info-look that don't come from GNU
@ -114,18 +102,16 @@ Emacs for various reasons, sometimes because their authors haven't made
a copyright assignment to the FSF. Some of them may be integrated in
the future.
You might like to check whether they are packaged for your system.
Several are for Debian GNU/Linux in particular.
Your operating system distribution may include several of these as optional
packages that you can install.
* AUCTeX: <URL:http://www.gnu.org/software/auctex/>
An extensible package that supports writing and formatting TeX
files (including AMS-TeX, LaTeX, Texinfo, ConTeXt, and docTeX).
Available from GNU ELPA.
* BBDB: personal Info Rolodex integrated with mail/news:
<URL:http://bbdb.sourceforge.net/>
[You might want to set the coding system of your .bbdb file to
emacs-mule, say by adding `("\\.bbdb\\'" . emacs-mule)' to
`file-coding-system-alist' for non-ASCII characters.]
<URL:http://savannah.nongnu.org/projects/bbdb>
* Boxquote: <URL:http://www.davep.org/emacs/>
@ -143,13 +129,6 @@ Several are for Debian GNU/Linux in particular.
* Ee: categorizing information manager:
<URL:http://www.jurta.org/en/emacs/ee/>
* EFS: enhanced version of ange-ftp:
<URL:http://www-pu.informatik.uni-tuebingen.de/users/sperber/software/efs/>
* Elib library: <URL:http://www.gnu.org/software/elib/elib.html>
From GNU distribution mirrors. (Much of this functionality is now
in Emacs.)
* EMacro: <URL:http://emacro.sourceforge.net/>
EMacro is a portable configuration file that configures itself.
@ -168,33 +147,19 @@ Several are for Debian GNU/Linux in particular.
* Emacs Wiki Mode: <URL:http://mwolson.org/projects/EmacsWikiMode.html>
A wiki-like publishing tool and personal information manager
* Gnuserv:
<URL:http://www.hpl.hp.com/personal/ange/gnuserv/home.html>
Alternative emacsclient/emacsserver. Also available from this Web
page: eiffel-mode.el.
* Go in a buffer: Go Text Protocol client:
<URL:http://www.gnuvola.org/software/personal-elisp/dist/lisp/diversions/gnugo.el>
A modified version is also bundled with GNU Go:
<URL:http://www.gnu.org/software/gnugo/gnugo.html>
* hm--html-menus:
<URL:ftp://sunsite.unc.edu/pub/Linux/apps/editors/emacs/>
HTML-specific editing. Can work with PSGML.
* Hyperbole:
<URL:http://directory.fsf.org/hyperbole.html>
<URL:http://directory.fsf.org/wiki/Hyperbole>
Hyperbole is an open, efficient, programmable information
management and hypertext system.
* JDEE: <URL:http://jdee.sourceforge.net/>
Provides a Java development environment for Emacs.
* Mailcrypt:
<URL:http://mailcrypt.sourceforge.net/>
PGP and GPG support. PGP isn't free software, but GPG, the GNU
Privacy Guard, is a free replacement <URL:http://www.gnupg.org/>.
* Mew: <URL:http://www.mew.org/>
A MIME mail reader for Emacs/XEmacs.
@ -208,9 +173,6 @@ Several are for Debian GNU/Linux in particular.
* Preview LaTeX: embed preview LaTeX images in source buffer.
<URL:http://www.gnu.org/software/auctex/preview-latex.html>
* PSGML: <URL:http://www.lysator.liu.se/projects/about_psgml.html>
DTD-aware serious SGML/XML editing.
* Quack: <URL:http://www.neilvandyke.org/quack/>
Quack enhances Emacs support for Scheme.
@ -227,26 +189,17 @@ Several are for Debian GNU/Linux in particular.
* Tamago: Chinese/Japanese/Korean input method
<URL:http://www.m17n.org/tamago/index.en.html>
Emacs Lisp package to provide input methods for CJK characters.
It can use these background conversion servers:
FreeWnn (jserver, cserver, tserver),
Wnn6,
SJ3 Ver.2
* Tiny Tools: <URL:http://freshmeat.net/projects/emacs-tiny-tools>
* Tiny Tools: <URL:https://savannah.nongnu.org/projects/emacs-tiny-tools>
* VM (View Mail): Alternative mail reader
<URL:http://launchpad.net/vm>
Previously hosted at: <URL:http://www.nongnu.org/viewmail/>
There are VM newsgroups: <URL:news:gnu.emacs.vm.info>, and
<URL:news:gnu.emacs.vm.bug>.
* W3: <URL:http://savannah.gnu.org/projects/w3/>
Web browser. There's a W3 mail list/newsgroup
<URL:http://savannah.gnu.org/mail/?group=w3>.
* W3 Web browser: <URL:http://savannah.gnu.org/projects/w3/>
* Wanderlust: <URL:http://www.gohome.org/wl/>
Yet Another Message Interface on Emacsen. Wanderlust is a mail/news
reader supporting IMAP4rev1 for emacsen.
Wanderlust is a mail/news reader for Emacs.
* WhizzyTex: <URL:http://cristal.inria.fr/whizzytex/>
WhizzyTeX provides a minor mode for Emacs or XEmacs, a (bash)

View file

@ -1,3 +1,8 @@
2012-04-20 Chong Yidong <cyd@gnu.org>
* emacsclient.c (decode_options): Move -t -n corner case handling
into server.el (Bug#11102).
2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
configure: new option --enable-gcc-warnings (Bug#11207)

View file

@ -638,32 +638,23 @@ decode_options (int argc, char **argv)
if (display && strlen (display) == 0)
display = NULL;
#ifdef WINDOWSNT
/* Emacs on Windows does not support GUI and console frames in the same
instance. So, it makes sense to treat the -t and -c options as
equivalent, and open a new frame regardless of whether the running
instance is GUI or console. Ideally, we would only set tty = 1 when
the instance is running in a console, but alas we don't know that.
The simplest workaround is to always ask for a tty frame, and let
server.el check whether it makes sense. */
if (tty || !current_frame)
{
display = (const char *) ttyname (0); /* Arg is ignored. */
current_frame = 0;
tty = 1;
}
#endif
/* If no display is available, new frames are tty frames. */
if (!current_frame && !display)
tty = 1;
/* --no-wait implies --current-frame on ttys when there are file
arguments or expressions given. */
if (nowait && tty && argc - optind > 0)
current_frame = 1;
#ifdef WINDOWSNT
/* Emacs on Windows does not support graphical and text terminal
frames in the same instance. So, treat the -t and -c options as
equivalent, and open a new frame on the server's terminal.
Ideally, we would only set tty = 1 when the serve is running in a
console, but alas we don't know that. As a workaround, always
ask for a tty frame, and let server.el figure it out. */
if (!current_frame)
{
display = NULL;
tty = 1;
}
if (alternate_editor && alternate_editor[0] == '\0')
{
message (TRUE, "--alternate-editor argument or ALTERNATE_EDITOR variable cannot be\n\

View file

@ -1,3 +1,77 @@
2012-04-20 Dan Nicolaescu <dann@gnu.org>
* battery.el (battery-echo-area-format): Display remaining time
for sysfs backend too (Bug#11269).
(battery-linux-sysfs): Fix conditional for the charge.
2012-04-20 Chong Yidong <cyd@gnu.org>
* progmodes/gdb-mi.el (gdb): Revert previous change.
(gdb-inferior-io--init-proc): New function.
(gdb-init-1): Use it.
(gdb-inferior-io-sentinel): New sentinel for the gdb-inferior pty,
responsible for allocating a new pty and hooking it to gdb when
the old pty gets an EIO due to process exit.
(gdb-delchar-or-quit): New command. Bind it in gdb-mi buffers.
(gdb-tooltip-print): Don't use obsolete tooltip-use-echo-area.
(gdb-inferior-io--maybe-delete-pty): Move into gdb-reset.
2012-04-20 Eli Zaretskii <eliz@gnu.org>
* window.el (window-min-size, window-sizable, window-min-delta)
(window-max-delta, window--resizable, window-resizable)
(window-total-size, window-full-height-p, window-full-width-p)
(window-in-direction, window--resize-mini-window, window-resize)
(window--resize-child-windows-normal)
(window--resize-child-windows, window--resize-siblings)
(window--resize-this-window, adjust-window-trailing-edge)
(enlarge-window, shrink-window): Doc fixes.
2012-04-20 Chong Yidong <cyd@gnu.org>
* progmodes/gdb-mi.el (gdb-inferior-io--maybe-delete-pty): New
function to call delete-process on the gdb-inferior buffer's pty.
(gdb-reset): Use it, instead of relying on kill-buffer to kill the
pty process (Bug#11273).
(gdb-update): New arg to suppress talking to the gdb process.
(gdb-done-or-error): Use it.
(gdb-stopped-functions): Rename from gdb-stopped-hooks.
(gdb): Call gdb-inferior-io--maybe-delete-pty as a workaround for
sentinel not being called.
* comint.el (make-comint-in-buffer, comint-exec): Doc fix.
* progmodes/grep.el (grep, rgrep): Doc fix (Bug#11268).
2012-04-20 Glenn Morris <rgm@gnu.org>
* net/network-stream.el (open-network-stream): Doc fix.
2012-04-20 Chong Yidong <cyd@gnu.org>
* emacs-lisp/tabulated-list.el (tabulated-list-print): Fix typos.
2012-04-20 Alan Mackenzie <acm@muc.de>
Ensure searching for keywords is case sensitive.
* progmodes/cc-cmds.el (c-electric-brace, c-electric-lt-gt)
(c-electric-paren, c-beginning-of-defun, c-end-of-defun)
(c-defun-name, c-mark-function, c-cpp-define-name)
(c-comment-indent, c-scan-conditionals, c-indent-defun)
(c-context-line-break): Bind case-fold-search to nil.
* progmodes/cc-mode.el (c-font-lock-fontify-region): Bind
case-fold-search to nil.
2012-04-20 Chong Yidong <cyd@gnu.org>
* mail/sendmail.el (mail-bury): Call return action with the right
Rmail buffer (Bug#11242).
* server.el (server-process-filter): Handle corner case where both
tty and nowait options are present (Bug#11102).
2012-04-20 Eli Zaretskii <eliz@gnu.org>
* version.el (emacs-bzr-version, emacs-bzr-get-version): Doc fixes.

View file

@ -78,7 +78,7 @@ introduced by a `%' character in a control string."
(cond ((eq battery-status-function 'battery-linux-proc-acpi)
"Power %L, battery %B at %r (%p%% load, remaining time %t)")
((eq battery-status-function 'battery-linux-sysfs)
"Power %L, battery %B (%p%% load)")
"Power %L, battery %B (%p%% load, remaining time %t)")
((eq battery-status-function 'battery-pmset)
"%L power, battery %B (%p%% load, remaining time %t)")
(battery-status-function
@ -509,7 +509,7 @@ The following %-sequences are provided:
"N/A"))
(cons ?d (or temperature "N/A"))
(cons ?B (or charging-state "N/A"))
(cons ?p (cond ((> charge-full 0)
(cons ?p (cond ((and (> charge-full 0) (> charge-now 0))
(format "%.1f"
(/ (* 100 charge-now) charge-full)))
((> energy-full 0)

View file

@ -699,16 +699,21 @@ BUFFER can be either a buffer or the name of one."
(defun make-comint-in-buffer (name buffer program &optional startfile &rest switches)
"Make a Comint process NAME in BUFFER, running PROGRAM.
If BUFFER is nil, it defaults to NAME surrounded by `*'s.
PROGRAM should be either a string denoting an executable program to create
via `start-file-process', or a cons pair of the form (HOST . SERVICE) denoting
a TCP connection to be opened via `open-network-stream'. If there is already
a running process in that buffer, it is not restarted. Optional fourth arg
STARTFILE is the name of a file, whose contents are sent to the
process as its initial input.
If there is a running process in BUFFER, it is not restarted.
PROGRAM should be one of the following:
- a string, denoting an executable program to create via
`start-file-process'
- a cons pair of the form (HOST . SERVICE), denoting a TCP
connection to be opened via `open-network-stream'
- nil, denoting a newly-allocated pty.
Optional fourth arg STARTFILE is the name of a file, whose
contents are sent to the process as its initial input.
If PROGRAM is a string, any more args are arguments to PROGRAM.
Returns the (possibly newly created) process buffer."
Return the (possibly newly created) process buffer."
(or (fboundp 'start-file-process)
(error "Multi-processing is not supported for this system"))
(setq buffer (get-buffer-create (or buffer (concat "*" name "*"))))
@ -752,9 +757,18 @@ See `make-comint' and `comint-exec'."
(defun comint-exec (buffer name command startfile switches)
"Start up a process named NAME in buffer BUFFER for Comint modes.
Runs the given COMMAND with SWITCHES, and initial input from STARTFILE.
Blasts any old process running in the buffer. Doesn't set the buffer mode.
You can use this to cheaply run a series of processes in the same Comint
buffer. The hook `comint-exec-hook' is run after each exec."
COMMAND should be one of the following:
- a string, denoting an executable program to create via
`start-file-process'
- a cons pair of the form (HOST . SERVICE), denoting a TCP
connection to be opened via `open-network-stream'
- nil, denoting a newly-allocated pty.
This function blasts any old process running in the buffer, and
does not set the buffer mode. You can use this to cheaply run a
series of processes in the same Comint buffer. The hook
`comint-exec-hook' is run after each exec."
(with-current-buffer buffer
(let ((proc (get-buffer-process buffer))) ; Blast any old process.
(if proc (delete-process proc)))

View file

@ -215,7 +215,7 @@ buffer and inserts the entries with `tabulated-list-printer'.
Optional argument REMEMBER-POS, if non-nil, means to move point
to the entry with the same ID element as the current line."
(let ((inhibit-read-only t)
(entries (if (functionp 'tabulated-list-entries)
(entries (if (functionp tabulated-list-entries)
(funcall tabulated-list-entries)
tabulated-list-entries))
entry-id saved-pt saved-col)
@ -246,7 +246,7 @@ to the entry with the same ID element as the current line."
(setq entries (sort entries sorter))
(if (cdr tabulated-list-sort-key)
(setq entries (nreverse entries)))
(unless (functionp 'tabulated-list-entries)
(unless (functionp tabulated-list-entries)
(setq tabulated-list-entries entries)))))
;; Print the resulting list.
(dolist (elt entries)

View file

@ -125,9 +125,8 @@ values:
certificate. This parameter will only be used when doing TLS
or STARTTLS connections.
If :use-starttls-if-possible is non-nil, do opportunistic
STARTTLS upgrades even if Emacs doesn't have built-in TLS
functionality.
:use-starttls-if-possible is a boolean that says to do opportunistic
STARTTLS upgrades even if Emacs doesn't have built-in TLS functionality.
:nowait is a boolean that says the connection should be made
asynchronously, if possible."

View file

@ -679,7 +679,7 @@ settings of `c-cleanup-list' are done."
;; We want to inhibit blinking the paren since this would be
;; most disruptive. We'll blink it ourselves later on.
(old-blink-paren blink-paren-function)
blink-paren-function)
blink-paren-function case-fold-search)
(c-save-buffer-state ()
(setq safepos (c-safe-position (point) (c-parse-state))
@ -1086,7 +1086,7 @@ numeric argument is supplied, or the point is inside a literal."
(interactive "*P")
(let ((c-echo-syntactic-information-p nil)
final-pos close-paren-inserted found-delim)
final-pos close-paren-inserted found-delim case-fold-search)
(self-insert-command (prefix-numeric-value arg))
(setq final-pos (point))
@ -1172,7 +1172,8 @@ newline cleanups are done if appropriate; see the variable `c-cleanup-list'."
(interactive "*P")
(let ((literal (c-save-buffer-state () (c-in-literal)))
;; shut this up
(c-echo-syntactic-information-p nil))
(c-echo-syntactic-information-p nil)
case-fold-search)
(self-insert-command (prefix-numeric-value arg))
(if (and (not arg) (not literal))
@ -1585,7 +1586,7 @@ defun."
; structure with other users of c-state-cache.
(orig-point-min (point-min)) (orig-point-max (point-max))
lim ; Position of { which has been widened to.
where pos)
where pos case-fold-search)
(save-restriction
(if (eq c-defun-tactic 'go-outward)
@ -1709,7 +1710,8 @@ the open-parenthesis that starts a defun; see `beginning-of-defun'."
; structure with other users of c-state-cache.
(orig-point-min (point-min)) (orig-point-max (point-max))
lim
where pos)
where pos case-fold-search)
(save-restriction
(if (eq c-defun-tactic 'go-outward)
(setq lim (c-widen-to-enclosing-decl-scope ; e.g. class, namespace
@ -1769,8 +1771,8 @@ with a brace block."
(interactive)
(c-save-buffer-state
(beginning-of-defun-function end-of-defun-function
where pos name-end)
where pos name-end case-fold-search)
(save-restriction
(widen)
(save-excursion
@ -1969,7 +1971,7 @@ As opposed to \\[c-beginning-of-defun] and \\[c-end-of-defun], this
function does not require the declaration to contain a brace block."
(interactive)
(let (decl-limits)
(let (decl-limits case-fold-search)
(c-save-buffer-state nil
;; We try to be line oriented, unless there are several
;; declarations on the same line.
@ -2001,11 +2003,12 @@ function does not require the declaration to contain a brace block."
(defun c-cpp-define-name ()
"Return the name of the current CPP macro, or NIL if we're not in one."
(interactive)
(save-excursion
(and c-opt-cpp-macro-define-start
(c-beginning-of-macro)
(looking-at c-opt-cpp-macro-define-start)
(match-string-no-properties 1))))
(let (case-fold-search)
(save-excursion
(and c-opt-cpp-macro-define-start
(c-beginning-of-macro)
(looking-at c-opt-cpp-macro-define-start)
(match-string-no-properties 1)))))
;; Movement by statements.
@ -2888,7 +2891,8 @@ See `c-indent-comment-alist' for a description."
(eq (match-end 0) eot))
'cpp-end-block)
(t
'other))))
'other)))
case-fold-search)
(if (and (memq line-type '(anchored-comment empty-line))
c-indent-comments-syntactically-p)
(let ((c-syntactic-context (c-guess-basic-syntax)))
@ -3024,7 +3028,7 @@ are treated as conditional clause limits. Normally they are ignored."
(let* ((forward (> count 0))
(increment (if forward -1 1))
(search-function (if forward 're-search-forward 're-search-backward))
new)
new case-fold-search)
(unless (integerp target-depth)
(setq target-depth (if target-depth -1 0)))
(save-excursion
@ -3226,7 +3230,7 @@ balanced expression is found."
In the macro case this also has the effect of realigning any line
continuation backslashes, unless `c-auto-align-backslashes' is nil."
(interactive "*")
(let ((here (point-marker)) decl-limits)
(let ((here (point-marker)) decl-limits case-fold-search)
(unwind-protect
(progn
(c-save-buffer-state nil
@ -4638,7 +4642,8 @@ inside a preprocessor directive."
(interactive "*")
(let* (c-lit-limits c-lit-type
(c-macro-start c-macro-start))
(c-macro-start c-macro-start)
case-fold-search)
(c-save-buffer-state ()
(setq c-lit-limits (c-literal-limits nil nil t)

View file

@ -1170,10 +1170,10 @@ Note that the style variables are always made local to the buffer."
;;
;;
;; void myfunc(T* p) {}
;;
;;
;; Type a space in the first blank line, and the fontification of the next
;; line was fouled up by context fontification.
(let ((new-beg beg) (new-end end) new-region)
(let ((new-beg beg) (new-end end) new-region case-fold-search)
(if c-in-after-change-fontification
(setq c-in-after-change-fontification nil)
(save-restriction

View file

@ -375,9 +375,8 @@ Emacs always switches to the thread which caused the stop."
:version "23.2"
:link '(info-link "(gdb)GDB/MI Async Records"))
(defcustom gdb-stopped-hooks nil
"This variable holds a list of functions to be called whenever
GDB stops.
(defcustom gdb-stopped-functions nil
"List of functions called whenever GDB stops.
Each function takes one argument, a parsed MI response, which
contains fields of corresponding MI *stopped async record:
@ -818,6 +817,8 @@ detailed description of this mode.
nil 'local)
(local-set-key "\C-i" 'completion-at-point)
(local-set-key [remap comint-delchar-or-maybe-eof] 'gdb-delchar-or-quit)
(setq gdb-first-prompt t)
(setq gud-running nil)
@ -859,15 +860,8 @@ detailed description of this mode.
(gdb-get-buffer-create 'gdb-inferior-io)
(gdb-clear-inferior-io)
(set-process-filter (get-process "gdb-inferior") 'gdb-inferior-filter)
(gdb-input
;; Needs GDB 6.4 onwards
(concat "-inferior-tty-set "
(or
;; The process can run on a remote host.
(process-get (get-process "gdb-inferior") 'remote-tty)
(process-tty-name (get-process "gdb-inferior"))))
'ignore)
(gdb-inferior-io--init-proc (get-process "gdb-inferior"))
(if (eq window-system 'w32)
(gdb-input "-gdb-set new-console off" 'ignore))
(gdb-input "-gdb-set height 0" 'ignore)
@ -905,6 +899,25 @@ detailed description of this mode.
(setq gdb-non-stop nil)
(gdb-input "-gdb-set non-stop 0" 'ignore)))
(defun gdb-delchar-or-quit (arg)
"Delete ARG characters or send a quit command to GDB.
Send a quit only if point is at the end of the buffer, there is
no input, and GDB is waiting for input."
(interactive "p")
(unless (and (eq (current-buffer) gud-comint-buffer)
(eq gud-minor-mode 'gdbmi))
(error "Not in a GDB-MI buffer"))
(let ((proc (get-buffer-process gud-comint-buffer)))
(if (and (eobp) proc (process-live-p proc)
(not gud-running)
(= (point) (marker-position (process-mark proc))))
;; Sending an EOF does not work with GDB-MI; submit an
;; explicit quit command.
(progn
(insert "quit")
(comint-send-input t t))
(delete-char arg))))
(defvar gdb-define-alist nil "Alist of #define directives for GUD tooltips.")
(defun gdb-create-define-alist ()
@ -929,7 +942,6 @@ detailed description of this mode.
(push (cons name define) gdb-define-alist))))
(declare-function tooltip-show "tooltip" (text &optional use-echo-area))
(defvar tooltip-use-echo-area)
(defun gdb-tooltip-print (expr)
(with-current-buffer (gdb-get-buffer 'gdb-partial-output-buffer)
@ -937,7 +949,7 @@ detailed description of this mode.
(if (re-search-forward ".*value=\\(\".*\"\\)" nil t)
(tooltip-show
(concat expr " = " (read (match-string 1)))
(or gud-tooltip-echo-area tooltip-use-echo-area
(or gud-tooltip-echo-area
(not (display-graphic-p)))))))
;; If expr is a macro for a function don't print because of possible dangerous
@ -1510,6 +1522,31 @@ DOC is an optional documentation string."
(gdb-display-buffer
(gdb-get-buffer-create 'gdb-inferior-io) t))
(defun gdb-inferior-io--init-proc (proc)
;; Set up inferior I/O. Needs GDB 6.4 onwards.
(set-process-filter proc 'gdb-inferior-filter)
(set-process-sentinel proc 'gdb-inferior-io-sentinel)
(gdb-input
(concat "-inferior-tty-set "
;; The process can run on a remote host.
(or (process-get proc 'remote-tty)
(process-tty-name proc)))
'ignore))
(defun gdb-inferior-io-sentinel (proc str)
(when (eq (process-status proc) 'failed)
;; When the debugged process exits, Emacs gets an EIO error on
;; read from the pty, and stops listening to it. If the gdb
;; process is still running, remove the pty, make a new one, and
;; pass it to gdb.
(let ((gdb-proc (get-buffer-process gud-comint-buffer))
(io-buffer (process-buffer proc)))
(when (and gdb-proc (process-live-p gdb-proc)
(buffer-live-p io-buffer))
;; `comint-exec' deletes the original process as a side effect.
(comint-exec io-buffer "gdb-inferior" nil nil nil)
(gdb-inferior-io--init-proc (get-buffer-process io-buffer))))))
(defconst gdb-frame-parameters
'((height . 14) (width . 80)
(unsplittable . t)
@ -1746,24 +1783,27 @@ If `gdb-thread-number' is nil, just wrap NAME in asterisks."
(setq gdb-output-sink 'user)
(setq gdb-pending-triggers nil))
(defun gdb-update ()
"Update buffers showing status of debug session."
(defun gdb-update (&optional no-proc)
"Update buffers showing status of debug session.
If NO-PROC is non-nil, do not try to contact the GDB process."
(when gdb-first-prompt
(gdb-force-mode-line-update
(propertize "initializing..." 'face font-lock-variable-name-face))
(gdb-init-1)
(setq gdb-first-prompt nil))
(gdb-get-main-selected-frame)
(unless no-proc
(gdb-get-main-selected-frame))
;; We may need to update gdb-threads-list so we can use
(gdb-get-buffer-create 'gdb-threads-buffer)
;; gdb-break-list is maintained in breakpoints handler
(gdb-get-buffer-create 'gdb-breakpoints-buffer)
(gdb-emit-signal gdb-buf-publisher 'update)
(unless no-proc
(gdb-emit-signal gdb-buf-publisher 'update))
(gdb-get-changed-registers)
(when (and (boundp 'speedbar-frame) (frame-live-p speedbar-frame))
(dolist (var gdb-var-list)
(setcar (nthcdr 5 var) nil))
@ -2045,7 +2085,7 @@ current thread and update GDB buffers."
;; In all-stop this updates gud-running properly as well.
(gdb-update)
(setq gdb-first-done-or-error nil))
(run-hook-with-args 'gdb-stopped-hooks result)))
(run-hook-with-args 'gdb-stopped-functions result)))
;; Remove the trimmings from log stream containing debugging messages
;; being produced by GDB's internals, use warning face and send to GUD
@ -2085,23 +2125,28 @@ current thread and update GDB buffers."
(setq gdb-output-sink 'emacs))
(gdb-clear-partial-output)
(when gdb-first-done-or-error
(unless (or token-number gud-running)
(setq gdb-filter-output (concat gdb-filter-output gdb-prompt-name)))
(gdb-update)
(setq gdb-first-done-or-error nil))
(setq gdb-filter-output
(gdb-concat-output gdb-filter-output output-field))
;; The process may already be dead (e.g. C-d at the gdb prompt).
(let* ((proc (get-buffer-process gud-comint-buffer))
(no-proc (or (null proc)
(memq (process-status proc) '(exit signal)))))
(if token-number
(progn
(with-current-buffer
(gdb-get-buffer-create 'gdb-partial-output-buffer)
(funcall
(cdr (assoc (string-to-number token-number) gdb-handler-alist))))
(setq gdb-handler-alist
(assq-delete-all token-number gdb-handler-alist)))))
(when gdb-first-done-or-error
(unless (or token-number gud-running no-proc)
(setq gdb-filter-output (concat gdb-filter-output gdb-prompt-name)))
(gdb-update no-proc)
(setq gdb-first-done-or-error nil))
(setq gdb-filter-output
(gdb-concat-output gdb-filter-output output-field))
(when token-number
(with-current-buffer
(gdb-get-buffer-create 'gdb-partial-output-buffer)
(funcall
(cdr (assoc (string-to-number token-number) gdb-handler-alist))))
(setq gdb-handler-alist
(assq-delete-all token-number gdb-handler-alist)))))
(defun gdb-concat-output (so-far new)
(cond
@ -4105,9 +4150,15 @@ This arrangement depends on the value of `gdb-many-windows'."
(gud-find-file gdb-main-file)))
(setq gdb-source-window win)))))
;; Called from `gud-sentinel' in gud.el:
(defun gdb-reset ()
"Exit a debugging session cleanly.
Kills the gdb buffers, and resets variables and the source buffers."
;; The gdb-inferior buffer has a pty hooked up to the main gdb
;; process. This pty must be deleted explicitly.
(let ((pty (get-process "gdb-inferior")))
(if pty (delete-process pty)))
;; Find gdb-mi buffers and kill them.
(dolist (buffer (buffer-list))
(unless (eq buffer gud-comint-buffer)
(with-current-buffer buffer

View file

@ -728,9 +728,9 @@ This function is called from `compilation-filter-hook'."
(defun grep (command-args)
"Run grep, with user-specified args, and collect output in a buffer.
While grep runs asynchronously, you can use \\[next-error] (M-x next-error),
or \\<grep-mode-map>\\[compile-goto-error] in the grep \
output buffer, to go to the lines where grep
found matches.
or \\<grep-mode-map>\\[compile-goto-error] in the *grep* \
buffer, to go to the lines where grep found
matches. To kill the grep job before it finishes, type \\[kill-compilation].
For doing a recursive `grep', see the `rgrep' command. For running
`grep' in a specific directory, see `lgrep'.
@ -957,10 +957,11 @@ With \\[universal-argument] prefix, you can edit the constructed shell command l
before it is executed.
With two \\[universal-argument] prefixes, directly edit and run `grep-find-command'.
Collect output in a buffer. While find runs asynchronously, you
can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error] \
Collect output in a buffer. While the recursive grep is running,
you can use \\[next-error] (M-x next-error), or \\<grep-mode-map>\\[compile-goto-error] \
in the grep output buffer,
to go to the lines where grep found matches.
to visit the lines where matches were found. To kill the job
before it finishes, type \\[kill-compilation].
This command shares argument histories with \\[lgrep] and \\[grep-find].

View file

@ -1174,6 +1174,13 @@ The following commands are accepted by the client:
;; Unknown command.
(arg (error "Unknown command: %s" arg))))
;; If both -no-wait and -tty are given with file or sexp
;; arguments, use an existing frame.
(and nowait
(not (eq tty-name 'window-system))
(or files commands)
(setq use-current-frame t))
(setq frame
(cond
((and use-current-frame

View file

@ -1888,8 +1888,7 @@ Used from `delayed-warnings-hook' (which see)."
(push warning collapsed)))
(setq delayed-warnings-list (nreverse collapsed))))
;; At present this is only really useful for Emacs internals.
;; Document in the lispref if it becomes generally useful.
;; At present this is only used for Emacs internals.
;; Ref http://lists.gnu.org/archive/html/emacs-devel/2012-02/msg00085.html
(defvar delayed-warnings-hook '(collapse-delayed-warnings
display-delayed-warnings)
@ -2308,6 +2307,8 @@ is nil and `use-dialog-box' is non-nil."
(discard-input))))
(let ((ret (eq answer 'act)))
(unless noninteractive
;; FIXME this prints one too many spaces, since prompt
;; already ends in a space. Eg "... (y or n) y".
(message "%s %s" prompt (if ret "y" "n")))
ret)))

View file

@ -514,17 +514,19 @@ window).")
(if (window-valid-p ignore) (eq window ignore) ignore))
(defun window-min-size (&optional window horizontal ignore)
"Return the minimum number of lines of WINDOW.
"Return the minimum size of WINDOW.
WINDOW can be an arbitrary window and defaults to the selected
one. Optional argument HORIZONTAL non-nil means return the
minimum number of columns of WINDOW.
minimum number of columns of WINDOW; otherwise return the minimum
number of WINDOW's lines.
Optional argument IGNORE non-nil means ignore any restrictions
Optional argument IGNORE, if non-nil, means ignore restrictions
imposed by fixed size windows, `window-min-height' or
`window-min-width' settings. IGNORE equal `safe' means live
`window-min-width' settings. If IGNORE equals `safe', live
windows may get as small as `window-safe-min-height' lines and
`window-safe-min-width' columns. IGNORE a window means ignore
restrictions for that window only."
`window-safe-min-width' columns. If IGNORE is a window, ignore
restrictions for that window only. Any other non-nil value
means ignore all of the above restrictions for all windows."
(window--min-size-1
(window-normalize-window window) horizontal ignore))
@ -614,12 +616,13 @@ columns. If WINDOW cannot be shrunk by -DELTA lines or columns,
return the minimum value in the range DELTA..0 by which WINDOW
can be shrunk.
Optional argument IGNORE non-nil means ignore any restrictions
Optional argument IGNORE non-nil means ignore restrictions
imposed by fixed size windows, `window-min-height' or
`window-min-width' settings. IGNORE equal `safe' means live
`window-min-width' settings. If IGNORE equals `safe', live
windows may get as small as `window-safe-min-height' lines and
`window-safe-min-width' columns. IGNORE any window means ignore
restrictions for that window only."
`window-safe-min-width' columns. If IGNORE is a window, ignore
restrictions for that window only. Any other non-nil value means
ignore all of the above restrictions for all windows."
(setq window (window-normalize-window window))
(cond
((< delta 0)
@ -734,20 +737,21 @@ window. Return zero if WINDOW cannot be shrunk.
Optional argument HORIZONTAL non-nil means return number of
columns by which WINDOW can be shrunk.
Optional argument IGNORE non-nil means ignore any restrictions
Optional argument IGNORE non-nil means ignore restrictions
imposed by fixed size windows, `window-min-height' or
`window-min-width' settings. IGNORE a window means ignore
restrictions for that window only. IGNORE equal `safe' means
`window-min-width' settings. If IGNORE is a window, ignore
restrictions for that window only. If IGNORE equals `safe',
live windows may get as small as `window-safe-min-height' lines
and `window-safe-min-width' columns.
and `window-safe-min-width' columns. Any other non-nil value
means ignore all of the above restrictions for all windows.
Optional argument TRAIL `before' means only windows to the left
of or above WINDOW can be enlarged. Optional argument TRAIL
`after' means only windows to the right of or below WINDOW can be
enlarged.
Optional argument TRAIL restricts the windows that can be enlarged.
If its value is `before', only windows to the left of or above WINDOW
can be enlarged. If it is `after', only windows to the right of or
below WINDOW can be enlarged.
Optional argument NOUP non-nil means don't go up in the window
tree but try to enlarge windows within WINDOW's combination only.
tree, but try to enlarge windows within WINDOW's combination only.
Optional argument NODOWN non-nil means don't check whether WINDOW
itself (and its child windows) can be shrunk; check only whether
@ -808,24 +812,25 @@ at least one other window can be enlarged appropriately."
(window--max-delta-1 parent delta horizontal ignore trail))))))
(defun window-max-delta (&optional window horizontal ignore trail noup nodown)
"Return maximum number of lines WINDOW by which WINDOW can be enlarged.
"Return maximum number of lines by which WINDOW can be enlarged.
WINDOW can be an arbitrary window and defaults to the selected
window. The return value is zero if WINDOW cannot be enlarged.
Optional argument HORIZONTAL non-nil means return maximum number
of columns by which WINDOW can be enlarged.
Optional argument IGNORE non-nil means ignore any restrictions
Optional argument IGNORE non-nil means ignore restrictions
imposed by fixed size windows, `window-min-height' or
`window-min-width' settings. IGNORE a window means ignore
restrictions for that window only. IGNORE equal `safe' means
`window-min-width' settings. If IGNORE is a window, ignore
restrictions for that window only. If IGNORE equals `safe',
live windows may get as small as `window-safe-min-height' lines
and `window-safe-min-width' columns.
and `window-safe-min-width' columns. Any other non-nil value means
ignore all of the above restrictions for all windows.
Optional argument TRAIL `before' means only windows to the left
of or below WINDOW can be shrunk. Optional argument TRAIL
`after' means only windows to the right of or above WINDOW can be
shrunk.
Optional argument TRAIL restricts the windows that can be enlarged.
If its value is `before', only windows to the left of or above WINDOW
can be enlarged. If it is `after', only windows to the right of or
below WINDOW can be enlarged.
Optional argument NOUP non-nil means don't go up in the window
tree but try to obtain the entire space from windows within
@ -860,12 +865,13 @@ columns. If WINDOW cannot be shrunk by -DELTA lines or columns,
return the minimum value in the range DELTA..0 that can be used
for shrinking WINDOW.
Optional argument IGNORE non-nil means ignore any restrictions
Optional argument IGNORE non-nil means ignore restrictions
imposed by fixed size windows, `window-min-height' or
`window-min-width' settings. IGNORE a window means ignore
restrictions for that window only. IGNORE equal `safe' means
`window-min-width' settings. If IGNORE is a window, ignore
restrictions for that window only. If IGNORE equals `safe',
live windows may get as small as `window-safe-min-height' lines
and `window-safe-min-width' columns.
and `window-safe-min-width' columns. Any other non-nil value
means ignore all of the above restrictions for all windows.
Optional argument TRAIL `before' means only windows to the left
of or below WINDOW can be shrunk. Optional argument TRAIL
@ -916,17 +922,18 @@ columns. If WINDOW cannot be shrunk by -DELTA lines or columns,
return the minimum value in the range DELTA..0 that can be used
for shrinking WINDOW.
Optional argument IGNORE non-nil means ignore any restrictions
Optional argument IGNORE non-nil means ignore restrictions
imposed by fixed size windows, `window-min-height' or
`window-min-width' settings. IGNORE a window means ignore
restrictions for that window only. IGNORE equal `safe' means
`window-min-width' settings. If IGNORE is a window, ignore
restrictions for that window only. If IGNORE equals `safe',
live windows may get as small as `window-safe-min-height' lines
and `window-safe-min-width' columns."
and `window-safe-min-width' columns. Any other non-nil value
means ignore all of the above restrictions for all windows."
(setq window (window-normalize-window window))
(window--resizable window delta horizontal ignore))
(defun window-total-size (&optional window horizontal)
"Return the total height or width of window WINDOW.
"Return the total height or width of WINDOW.
If WINDOW is omitted or nil, it defaults to the selected window.
If HORIZONTAL is omitted or nil, return the total height of
@ -941,7 +948,7 @@ the total width, in columns, like `window-total-width'."
;; See discussion in bug#4543.
(defun window-full-height-p (&optional window)
"Return t if WINDOW is as high as the containing frame.
"Return t if WINDOW is as high as its containing frame.
More precisely, return t if and only if the total height of
WINDOW equals the total height of the root window of WINDOW's
frame. WINDOW can be any window and defaults to the selected
@ -951,7 +958,7 @@ one."
(window-total-size (frame-root-window window))))
(defun window-full-width-p (&optional window)
"Return t if WINDOW is as wide as the containing frame.
"Return t if WINDOW is as wide as its containing frame.
More precisely, return t if and only if the total width of WINDOW
equals the total width of the root window of WINDOW's frame.
WINDOW can be any window and defaults to the selected one."
@ -1115,7 +1122,7 @@ SIDE can be any of the symbols `left', `top', `right' or
"Return window in DIRECTION as seen from WINDOW.
DIRECTION must be one of `above', `below', `left' or `right'.
WINDOW must be a live window and defaults to the selected one.
IGNORE, when non-nil means a window can be returned even if its
IGNORE non-nil means a window can be returned even if its
`no-other-window' parameter is non-nil."
(setq window (window-normalize-window window t))
(unless (memq direction '(above below left right))
@ -1420,7 +1427,7 @@ windows."
(defun window--resize-mini-window (window delta)
"Resize minibuffer window WINDOW by DELTA lines.
If WINDOW cannot be resized by DELTA lines make it as large (or
as small) as possible but don't signal an error."
as small) as possible, but don't signal an error."
(when (window-minibuffer-p window)
(let* ((frame (window-frame window))
(root (frame-root-window frame))
@ -1461,12 +1468,13 @@ horizontally by DELTA columns. In this case a positive DELTA
means enlarge WINDOW by DELTA columns. DELTA negative means
WINDOW shall be shrunk by -DELTA columns.
Optional argument IGNORE non-nil means ignore any restrictions
Optional argument IGNORE non-nil means ignore restrictions
imposed by fixed size windows, `window-min-height' or
`window-min-width' settings. IGNORE any window means ignore
restrictions for that window only. IGNORE equal `safe' means
`window-min-width' settings. If IGNORE is a window, ignore
restrictions for that window only. If IGNORE equals `safe',
live windows may get as small as `window-safe-min-height' lines
and `window-safe-min-width' columns.
and `window-safe-min-width' columns. Any other non-nil value
means ignore all of the above restrictions for all windows.
This function resizes other windows proportionally and never
deletes any windows. If you want to move only the low (right)
@ -1516,9 +1524,9 @@ HORIZONTAL non-nil means set the new normal width of these
windows. WINDOW specifies a child window of PARENT that has been
resized by THIS-DELTA lines (columns).
Optional argument TRAIL either 'before or 'after means set values
for windows before or after WINDOW only. Optional argument
OTHER-DELTA a number specifies that this many lines (columns)
Optional argument TRAIL either `before' or `after' means set values
only for windows before or after WINDOW. Optional argument
OTHER-DELTA, a number, specifies that this many lines (columns)
have been obtained from (or returned to) an ancestor window of
PARENT in order to resize WINDOW."
(let* ((delta-normal
@ -1618,12 +1626,13 @@ be a horizontally combined internal window.
WINDOW, if specified, must denote a child window of PARENT that
is resized by DELTA lines.
Optional argument IGNORE non-nil means ignore any restrictions
Optional argument IGNORE non-nil means ignore restrictions
imposed by fixed size windows, `window-min-height' or
`window-min-width' settings. IGNORE equal `safe' means live
`window-min-width' settings. If IGNORE equals `safe', live
windows may get as small as `window-safe-min-height' lines and
`window-safe-min-width' columns. IGNORE any window means ignore
restrictions for that window only.
`window-safe-min-width' columns. If IGNORE is a window, ignore
restrictions for that window only. Any other non-nil value means
ignore all of the above restrictions for all windows.
Optional arguments TRAIL and EDGE, when non-nil, restrict the set
of windows that shall be resized. If TRAIL equals `before',
@ -1790,12 +1799,13 @@ Optional argument HORIZONTAL non-nil means resize other windows
when WINDOW is resized horizontally by DELTA columns. WINDOW
itself is not resized by this function.
Optional argument IGNORE non-nil means ignore any restrictions
Optional argument IGNORE non-nil means ignore restrictions
imposed by fixed size windows, `window-min-height' or
`window-min-width' settings. IGNORE equal `safe' means live
`window-min-width' settings. If IGNORE equals `safe', live
windows may get as small as `window-safe-min-height' lines and
`window-safe-min-width' columns. IGNORE any window means ignore
restrictions for that window only.
`window-safe-min-width' columns. If IGNORE is a window, ignore
restrictions for that window only. Any other non-nil value means
ignore all of the above restrictions for all windows.
Optional arguments TRAIL and EDGE, when non-nil, refine the set
of windows that shall be resized. If TRAIL equals `before',
@ -1891,12 +1901,13 @@ preferably only resize windows adjacent to EDGE."
Optional argument HORIZONTAL non-nil means resize WINDOW
horizontally by DELTA columns.
Optional argument IGNORE non-nil means ignore any restrictions
Optional argument IGNORE non-nil means ignore restrictions
imposed by fixed size windows, `window-min-height' or
`window-min-width' settings. IGNORE equal `safe' means live
`window-min-width' settings. If IGNORE equals `safe', live
windows may get as small as `window-safe-min-height' lines and
`window-safe-min-width' columns. IGNORE any window means ignore
restrictions for that window only.
`window-safe-min-width' columns. If IGNORE is a window, ignore
restrictions for that window only. Any other non-nil value
means ignore all of the above restrictions for all windows.
Optional argument ADD non-nil means add DELTA to the new total
size of WINDOW.
@ -1986,7 +1997,7 @@ any windows."
Optional argument HORIZONTAL non-nil means move WINDOW's right
edge by DELTA columns. WINDOW defaults to the selected window.
If DELTA is greater zero, then move the edge downwards or to the
If DELTA is greater than zero, move the edge downwards or to the
right. If DELTA is less than zero, move the edge upwards or to
the left. If the edge can't be moved by DELTA lines or columns,
move it as far as possible in the desired direction."
@ -2091,7 +2102,7 @@ move it as far as possible in the desired direction."
(error "Failed adjusting window %s" window)))))))
(defun enlarge-window (delta &optional horizontal)
"Make selected window DELTA lines taller.
"Make the selected window DELTA lines taller.
Interactively, if no argument is given, make the selected window
one line taller. If optional argument HORIZONTAL is non-nil,
make selected window wider by DELTA columns. If DELTA is
@ -2112,7 +2123,7 @@ Return nil."
horizontal))))
(defun shrink-window (delta &optional horizontal)
"Make selected window DELTA lines smaller.
"Make the selected window DELTA lines smaller.
Interactively, if no argument is given, make the selected window
one line smaller. If optional argument HORIZONTAL is non-nil,
make selected window narrower by DELTA columns. If DELTA is

View file

@ -1,3 +1,30 @@
2012-04-20 Chong Yidong <cyd@gnu.org>
* process.c (wait_reading_process_output): If EIO occurs on a pty,
set the status to "failed" and ensure that sentinel is run.
2012-04-20 Glenn Morris <rgm@gnu.org>
* process.c (Fset_process_inherit_coding_system_flag)
(Fset_process_query_on_exit_flag): Doc fix (mention return value).
(Fmake_network_process, Fmake_serial_process): Doc fix.
2012-04-20 Eli Zaretskii <eliz@gnu.org>
* xdisp.c (string_buffer_position_lim): Limit starting position to
BEGV.
(set_cursor_from_row): If called for a mode-line or header-line
row, return zero immediately.
(try_cursor_movement): If inside continuation line, don't back up
farther than the first row after the header line, if any. Don't
consider the header-line row as "partially visible", even if
MATRIX_ROW_PARTIALLY_VISIBLE_P returns non-zero. (Bug#11261)
2012-04-20 Atsuo Ohki <ohki@gssm.otsuka.tsukuba.ac.jp> (tiny change)
* lread.c (lisp_file_lexically_bound_p): Fix hang at ";-*-\n" (bug#11238).
2012-04-20 Teodor Zlatanov <tzz@lifelogs.com>
2012-04-18 Paul Eggert <eggert@cs.ucla.edu>
configure: new option --enable-gcc-warnings (Bug#11207)

View file

@ -1077,7 +1077,9 @@ is more appropriate for saving the process buffer.
Binding the variable `inherit-process-coding-system' to non-nil before
starting the process is an alternative way of setting the inherit flag
for the process which will run. */)
for the process which will run.
This function returns FLAG. */)
(register Lisp_Object process, Lisp_Object flag)
{
CHECK_PROCESS (process);
@ -1090,7 +1092,8 @@ DEFUN ("set-process-query-on-exit-flag",
2, 2, 0,
doc: /* Specify if query is needed for PROCESS when Emacs is exited.
If the second argument FLAG is non-nil, Emacs will query the user before
exiting or killing a buffer if PROCESS is running. */)
exiting or killing a buffer if PROCESS is running. This function
returns FLAG. */)
(register Lisp_Object process, Lisp_Object flag)
{
CHECK_PROCESS (process);
@ -2532,7 +2535,7 @@ could be "COM1", or "\\\\.\\COM10" for ports higher than COM9 (double
the backslashes in strings).
:speed SPEED -- (mandatory) is handled by `serial-process-configure',
which is called by `make-serial-process'.
which this function calls.
:name NAME -- NAME is the name of the process. If NAME is not given,
the value of PORT is used.
@ -2561,13 +2564,12 @@ but you can send outgoing data. The stopped state is cleared by
:plist PLIST -- Install PLIST as the initial plist of the process.
:speed
:bytesize
:parity
:stopbits
:flowcontrol
-- These arguments are handled by `serial-process-configure', which is
called by `make-serial-process'.
-- This function calls `serial-process-configure' to handle these
arguments.
The original argument list, possibly modified by later configuration,
is available via the function `process-contact'.
@ -2801,7 +2803,7 @@ The stopped state is cleared by `continue-process' and set by
:filter-multibyte BOOL -- If BOOL is non-nil, strings given to the
process filter are multibyte, otherwise they are unibyte.
If this keyword is not specified, the strings are multibyte if
`default-enable-multibyte-characters' is non-nil.
the default value of `enable-multibyte-characters' is non-nil.
:sentinel SENTINEL -- Install SENTINEL as the process sentinel.
@ -4898,16 +4900,23 @@ wait_reading_process_output (int time_limit, int microsecs, int read_kbd,
It can't hurt. */
else if (nread == -1 && errno == EIO)
{
/* Don't do anything if only a pty, with no associated
process (bug#10933). */
if (XPROCESS (proc)->pid != -2) {
/* Clear the descriptor now, so we only raise the signal
once. */
FD_CLR (channel, &input_wait_mask);
FD_CLR (channel, &non_keyboard_wait_mask);
kill (getpid (), SIGCHLD);
}
struct Lisp_Process *p = XPROCESS (proc);
/* Clear the descriptor now, so we only raise the
signal once. */
FD_CLR (channel, &input_wait_mask);
FD_CLR (channel, &non_keyboard_wait_mask);
if (p->pid == -2)
{
/* If the EIO occurs on a pty, sigchld_handler's
wait3() will not find the process object to
delete. Do it here. */
p->tick = ++process_tick;
p->status = Qfailed;
}
else
kill (getpid (), SIGCHLD);
}
#endif /* HAVE_PTYS */
/* If we can detect process termination, don't consider the

View file

@ -4979,7 +4979,7 @@ string_buffer_position_lim (Lisp_Object string,
Lisp_Object limit, prop, pos;
int found = 0;
pos = make_number (from);
pos = make_number (max (from, BEGV));
if (!back_p) /* looking forward */
{
@ -13690,6 +13690,13 @@ set_cursor_from_row (struct window *w, struct glyph_row *row,
comes from a text property, not from an overlay. */
int string_from_text_prop = 0;
/* Don't even try doing anything if called for a mode-line or
header-line row, since the rest of the code isn't prepared to
deal with such calamities. */
xassert (!row->mode_line_p);
if (row->mode_line_p)
return 0;
/* Skip over glyphs not having an object at the start and the end of
the row. These are special glyphs like truncation marks on
terminal frames. */
@ -14910,6 +14917,8 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste
else if (rc != CURSOR_MOVEMENT_SUCCESS
&& !NILP (BVAR (XBUFFER (w->buffer), bidi_display_reordering)))
{
struct glyph_row *row1;
/* If rows are bidi-reordered and point moved, back up
until we find a row that does not belong to a
continuation line. This is because we must consider
@ -14920,24 +14929,28 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, int *scroll_ste
/* FIXME: Revisit this when glyph ``spilling'' in
continuation lines' rows is implemented for
bidi-reordered rows. */
while (MATRIX_ROW_CONTINUATION_LINE_P (row))
for (row1 = MATRIX_FIRST_TEXT_ROW (w->current_matrix);
MATRIX_ROW_CONTINUATION_LINE_P (row);
--row)
{
/* If we hit the beginning of the displayed portion
without finding the first row of a continued
line, give up. */
if (row <= w->current_matrix->rows)
if (row <= row1)
{
rc = CURSOR_MOVEMENT_MUST_SCROLL;
break;
}
xassert (row->enabled_p);
--row;
}
}
if (must_scroll)
;
else if (rc != CURSOR_MOVEMENT_SUCCESS
&& MATRIX_ROW_PARTIALLY_VISIBLE_P (w, row)
/* Make sure this isn't a header line by any chance, since
then MATRIX_ROW_PARTIALLY_VISIBLE_P might yield non-zero. */
&& !row->mode_line_p
&& make_cursor_line_fully_visible_p)
{
if (PT == MATRIX_ROW_END_CHARPOS (row)