Commit 0235128c authored by Stefan Monnier's avatar Stefan Monnier

Merge from emacs-23

parents ca63fca5 19ae0deb
2010-05-08 Štěpán Němec <stepnem@gmail.com> (tiny change)
* INSTALL: Fix typos.
2010-05-08 Chong Yidong <cyd@stupidchicken.com>
* configure.in: Add check for buggy version of GCC (Bug#6031).
2010-05-08 Glenn Morris <rgm@gnu.org>
* configure.in (HAVE_LIBNCURSES): New local variable.
(TERMINFO, LIBS_TERMCAP, TERMCAP_OBJ): New output variables,
replacing cpp in src/s/*.h and src/Makefile.in.
2010-05-07 Chong Yidong <cyd@stupidchicken.com>
* Version 23.2 released.
2010-05-07 Stefan Monnier <monnier@iro.umontreal.ca>
* configure.in: Add tests for `isnan' and `copysign'.
......
......@@ -408,7 +408,7 @@ to look in `/bar/mylib' for libraries, pass the -O3 optimization
switch to the compiler, and link against libfoo.a and libbar.a
libraries in addition to the standard ones.
For some libraries, like Gtk+, fontconfig and ALSA, `configure' use
For some libraries, like Gtk+, fontconfig and ALSA, `configure' uses
pkg-config to find where those libraries are installed.
If you want pkg-config to look in special directories, you have to set
the environment variable PKG_CONFIG_PATH to point to the directories
......@@ -466,7 +466,7 @@ site-load.el for additional libraries if you arrange for their
documentation strings to be in the etc/DOC file (see
src/Makefile.in if you wish to figure out how to do that). For all
else, use site-init.el. Do not load byte-compiled code which
was build with a non-nil value of `byte-compile-dynamic'.
was built with a non-nil value of `byte-compile-dynamic'.
If you set load-path to a different value in site-init.el or
site-load.el, Emacs will use *precisely* that value when it starts up
......@@ -491,7 +491,7 @@ named `src/emacs'. You can execute this file "in place" without
copying it, if you wish; then it automatically uses the sibling
directories ../lisp, ../lib-src, ../info.
Or you can "install" the executable and the other Emacs into their
Or you can "install" the executable and the other files into their
installed locations, with `make install'. By default, Emacs's files
are installed in the following directories:
......
2010-05-07 Chong Yidong <cyd@stupidchicken.com>
* Version 23.2 released.
2010-04-01 Eli Zaretskii <eliz@gnu.org>
* CPP-DEFINES (__DJGPP__, __GO32__): Remove, no longer used.
......
......@@ -26209,6 +26209,16 @@ fi
CFLAGS="$REAL_CFLAGS"
CPPFLAGS="$REAL_CPPFLAGS"
## Hack to detect a buggy GCC version.
if test "x$GCC" = xyes \
&& test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
&& test x"`echo $CFLAGS | grep '\-O[23]'`" != x \
&& test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
{ { $as_echo "$as_me:$LINENO: error: GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." >&5
$as_echo "$as_me: error: GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'." >&2;}
{ (exit 1); exit 1; }; }
fi
#### Find out which version of Emacs this is.
version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
| sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`
......
......@@ -2923,6 +2923,14 @@ dnl Fixme: Use AC_FUNC_MEMCMP since memcmp is used. (Needs libobj replacement.)
CFLAGS="$REAL_CFLAGS"
CPPFLAGS="$REAL_CPPFLAGS"
## Hack to detect a buggy GCC version.
if test "x$GCC" = xyes \
&& test x"`$CC --version 2> /dev/null | grep 'gcc.* 4.5.0'`" != x \
&& test x"`echo $CFLAGS | grep '\-O@<:@23@:>@'`" != x \
&& test x"`echo $CFLAGS | grep '\-fno-optimize-sibling-calls'`" = x; then
AC_MSG_ERROR([GCC 4.5.0 has problems compiling Emacs; see etc/PROBLEMS'.])
fi
#### Find out which version of Emacs this is.
[version=`grep 'defconst[ ]*emacs-version' ${srcdir}/lisp/version.el \
| sed -e 's/^[^"]*"\([^"]*\)".*$/\1/'`]
......
2010-05-08 Chong Yidong <cyd@stupidchicken.com>
* building.texi (GDB Graphical Interface): Remove misleading comparison
to an IDE (Bug#6128).
2010-05-08 Štěpán Němec <stepnem@gmail.com> (tiny change)
* programs.texi (Man Page):
* misc.texi (Invoking emacsclient):
* mini.texi (Repetition):
* mark.texi (Setting Mark): Fix typos.
2010-05-08 Chong Yidong <cyd@stupidchicken.com>
* misc.texi (Printing): Document htmlfontify-buffer.
2010-05-08 Glenn Morris <rgm@gnu.org>
* calendar.texi (Displaying the Diary, Format of Diary File):
Fix external cross-references for TeX format output.
2010-05-07 Chong Yidong <cyd@stupidchicken.com>
* Version 23.2 released.
2010-05-02 Jan Djärv <jan.h.d@swipnet.se>
* cmdargs.texi (Initial Options): Mention --chdir.
......
......@@ -836,12 +836,11 @@ Fully qualified class name derived from the expression surrounding point
@subsection GDB Graphical Interface
The command @code{gdb} starts GDB in a graphical interface, using
Emacs windows for display program state information. In effect, this
makes Emacs into an IDE (interactive development environment). With
it, you do not need to use textual GDB commands; you can control the
debugging session with the mouse. For example, you can click in the
fringe of a source buffer to set a breakpoint there, or on a stack
frame in the stack buffer to select that frame.
Emacs windows for display program state information. With it, you do
not need to use textual GDB commands; you can control the debugging
session with the mouse. For example, you can click in the fringe of a
source buffer to set a breakpoint there, or on a stack frame in the
stack buffer to select that frame.
This mode requires telling GDB that its ``screen size'' is
unlimited, so it sets the height and width accordingly. For correct
......
......@@ -1082,7 +1082,7 @@ of the new window shows the date of the diary entries. Holidays are
shown either in the buffer or in the mode line, depending on the display
method you choose
@iftex
(@pxref{Diary Display,, emacs-xtra}).
(@pxref{Diary Display,,, emacs-xtra, Specialized Emacs Features}).
@end iftex
@ifnottex
(@pxref{Diary Display}).
......@@ -1186,7 +1186,7 @@ punctuation). For example:
This entry will have a different appearance if you use the simple diary
display
@iftex
(@pxref{Diary Display,, emacs-xtra}).
(@pxref{Diary Display,,, emacs-xtra, Specialized Emacs Features}).
@end iftex
@ifnottex
(@pxref{Diary Display}).
......
......@@ -80,7 +80,7 @@ Set the mark at point if the mark is inactive, then move point.
character in @acronym{ASCII}; usually, typing @kbd{C-@key{SPC}} on a
text terminal gives the character @kbd{C-@@}. This key is also bound
to @code{set-mark-command}, so unless you are unlucky enough to have
an text terminal that behaves differently, you might as well think of
a text terminal that behaves differently, you might as well think of
@kbd{C-@@} as @kbd{C-@key{SPC}}.}. This sets the mark where point is,
and activates it. You can then move point away, leaving the mark
behind.
......
......@@ -601,7 +601,7 @@ repetition. If you type just @key{RET}, that repeats the command
unchanged. You can also change the command by editing the Lisp
expression before you execute it. The repeated command is added to
the front of the command history unless it is identical to the most
recently item.
recent item.
Once inside the minibuffer for @kbd{C-x @key{ESC} @key{ESC}}, you can
use the minibuffer history commands (@kbd{M-p}, @kbd{M-n}, @kbd{M-r},
......
......@@ -1528,7 +1528,7 @@ still use Emacs to edit the file.
@kbd{C-x #} (@code{server-edit}) in its buffer. This saves the file
and sends a message back to the @command{emacsclient} program, telling
it to exit. Programs that use @env{EDITOR} usually wait for the
``editor''---in the case @command{emacsclient}---to exit before doing
``editor''---in this case @command{emacsclient}---to exit before doing
something else.
You can also call @command{emacsclient} with multiple file name
......@@ -1701,8 +1701,14 @@ process, type @kbd{M-x kill-emacs}.
Emacs provides commands for printing hard copies of either an entire
buffer or just part of one, with or without page headers. You can
invoke the printing commands directly, as detailed in the following
section, or using the @samp{File} menu on the menu bar. See also the
hardcopy commands of Dired (@pxref{Misc File Ops}) and the diary
section, or using the @samp{File} menu on the menu bar.
@findex htmlfontify-buffer
Aside from the commands described in this section, you can also
``print'' an Emacs buffer to HTML with @kbd{M-x htmlfontify-buffer}.
This command converts the current buffer to a HTML file, replacing
Emacs faces with CSS-based markup. In addition, see the hardcopy
commands of Dired (@pxref{Misc File Ops}) and the diary
(@pxref{Displaying the Diary}).
@table @kbd
......
......@@ -1202,7 +1202,7 @@ completion based on the list of manual pages that are installed on
your machine; the list of available manual pages is computed
automatically the first time you invoke @code{woman}. The word at
point in the current buffer is used to suggest the default for the
name the manual page.
name of the manual page.
With a numeric argument, @kbd{M-x woman} recomputes the list of the
manual pages used for completion. This is useful if you add or delete
......
2010-05-07 Chong Yidong <cyd@stupidchicken.com>
* Version 23.2 released.
2010-03-10 Chong Yidong <cyd@stupidchicken.com>
* Branch for 23.2.
......@@ -13,8 +17,7 @@
2009-12-09 David Robinow <drobinow@gmail.com> (tiny change)
* makefile.w32-in: Use parenthesis for macros for nmake
compatibility.
* makefile.w32-in: Use parenthesis for macros for nmake compatibility.
2009-12-03 Glenn Morris <rgm@gnu.org>
......@@ -72,7 +75,7 @@
2009-02-22 Karl Berry <karl@gnu.org>
* emacs-lisp-intro.texi (Default Configuration): fix dup word "by by".
* emacs-lisp-intro.texi (Default Configuration): Fix dup word "by by".
2009-02-20 Juanma Barranquero <lekktu@gmail.com>
......
2010-05-08 Štěpán Němec <stepnem@gmail.com> (tiny change)
* windows.texi (Textual Scrolling):
* tips.texi (Coding Conventions):
* minibuf.texi (Minibuffer History):
* maps.texi (Standard Keymaps):
* loading.texi (Where Defined):
* edebug.texi (Instrumenting): Fix typos.
2010-05-08 Chong Yidong <cyd@stupidchicken.com>
* keymaps.texi (Menu Bar): Document :advertised-binding property.
* functions.texi (Obsolete Functions):
Document set-advertised-calling-convention.
* minibuf.texi (Basic Completion): Document completion-in-region.
(Programmed Completion): Document completion-annotate-function.
* commands.texi (Reading One Event): Document read-key.
(Distinguish Interactive): Document KIND arg to
called-interactively-p. Delete obsolete interactive-p.
* elisp.texi (Top): Update node description.
2010-05-08 Eli Zaretskii <eliz@gnu.org>
* nonascii.texi (Character Properties): Document
unicode-category-table. Add an index entry for Unicode general
category.
* nonascii.texi (Character Properties):
Document unicode-category-table. Add an index entry for Unicode
general category.
2010-05-07 Chong Yidong <cyd@stupidchicken.com>
* Version 23.2 released.
2010-04-20 Juanma Barranquero <lekktu@gmail.com>
......
......@@ -696,71 +696,67 @@ message when called from a keyboard macro.
because it allows callers to say ``treat this call as interactive.''
But you can also do the job by testing @code{called-interactively-p}.
@defun called-interactively-p
@defun called-interactively-p kind
This function returns @code{t} when the calling function was called
using @code{call-interactively}.
If the containing function was called by Lisp evaluation (or with
@code{apply} or @code{funcall}), then it was not called interactively.
The argument @var{kind} should be either the symbol @code{interactive}
or the symbol @code{any}. If it is @code{interactive}, then
@code{called-interactively-p} returns @code{t} only if the call was
made directly by the user---e.g., if the user typed a key sequence
bound to the calling function, but @emph{not} if the user ran a
keyboard macro that called the function (@pxref{Keyboard Macros}). If
@var{kind} is @code{any}, @code{called-interactively-p} returns
@code{t} for any kind of interactive call, including keyboard macros.
If in doubt, use @code{any}; the only known proper use of
@code{interactive} is if you need to decide whether to display a
helpful message while a function is running.
A function is never considered to be called interactively if it was
called via Lisp evaluation (or with @code{apply} or @code{funcall}).
@end defun
Here's an example of using @code{called-interactively-p}:
@noindent
Here is an example of using @code{called-interactively-p}:
@example
@group
(defun foo ()
(interactive)
(when (called-interactively-p)
(message "foo"))
'haha)
@result{} foo
(when (called-interactively-p 'any)
(message "Interactive!")
'foo-called-interactively))
@end group
@group
;; @r{Type @kbd{M-x foo}.}
@print{} foo
@print{} Interactive!
@end group
@group
(foo)
@result{} haha
@result{} nil
@end group
@end example
Here is another example that contrasts direct and indirect
calls to @code{called-interactively-p}.
@noindent
Here is another example that contrasts direct and indirect calls to
@code{called-interactively-p}.
@example
@group
(defun bar ()
(interactive)
(setq foobar (list (foo) (called-interactively-p))))
@result{} bar
(message "%s" (list (foo) (called-interactively-p 'any))))
@end group
@group
;; @r{Type @kbd{M-x bar}.}
;; @r{This does not display a message.}
@end group
@group
foobar
@result{} (nil t)
@print{} (nil t)
@end group
@end example
If you want to treat commands run in keyboard macros just like calls
from Lisp programs, test @code{interactive-p} instead of
@code{called-interactively-p}.
@defun interactive-p
This function returns @code{t} if the containing function (the one
whose code includes the call to @code{interactive-p}) was called in
direct response to user input. This means that it was called with the
function @code{call-interactively}, and that a keyboard macro is
not running, and that Emacs is not running in batch mode.
@end defun
@node Command Loop Info
@comment node-name, next, previous, up
@section Information from the Command Loop
......@@ -2309,10 +2305,8 @@ and key sequences read from keyboard macros being executed.
@cindex reading a single event
@cindex event, reading only one
The lowest level functions for command input are those that read a
single event.
None of the three functions below suppresses quitting.
The lowest level functions for command input are @code{read-event},
@code{read-char}, and @code{read-char-exclusive}.
@defun read-event &optional prompt inherit-input-method seconds
This function reads and returns the next event of command input, waiting
......@@ -2409,11 +2403,31 @@ user generates an event which is not a character,
gets a character. The arguments work as in @code{read-event}.
@end defun
None of the above functions suppress quitting.
@defvar num-nonmacro-input-events
This variable holds the total number of input events received so far
from the terminal---not counting those generated by keyboard macros.
@end defvar
We emphasize that, unlike @code{read-key-sequence}, the functions
@code{read-event}, @code{read-char}, and @code{read-char-exclusive} do
not perform the translations described in @ref{Translation Keymaps}.
If you wish to read a single key taking these translations into
account, use the function @code{read-key}:
@defun read-key &optional prompt
This function reads a single key. It is ``intermediate'' between
@code{read-key-sequence} and @code{read-event}. Unlike the former, it
reads a single key, not a key sequence. Unlike the latter, it does
not return a raw event, but decodes and translates the user input
according to @code{input-decode-map}, @code{local-function-key-map},
and @code{key-translation-map} (@pxref{Translation Keymaps}).
The argument @var{prompt} is either a string to be displayed in the
echo area as a prompt, or @code{nil}, meaning not to display a prompt.
@end defun
@node Event Mod
@subsection Modifying and Translating Input Events
......
......@@ -186,7 +186,7 @@ instrument any top-level form regardless of the values of
While Edebug is active, the command @kbd{I}
(@code{edebug-instrument-callee}) instruments the definition of the
function or macro called by the list form after point, if is not already
function or macro called by the list form after point, if it is not already
instrumented. This is possible only if Edebug knows where to find the
source for that function; for this reason, after loading Edebug,
@code{eval-region} records the position of every definition it
......
......@@ -649,7 +649,6 @@ Minibuffers
Completion
* Basic Completion:: Low-level functions for completing strings.
(These are too low level to use the minibuffer.)
* Minibuffer Completion:: Invoking the minibuffer with completion.
* Completion Commands:: Minibuffer commands that do completion.
* High-Level Completion:: Convenient special cases of completion
......
......@@ -1197,7 +1197,7 @@ was first made obsolete---for example, a date or a release number.
@end defun
You can define a function as an alias and declare it obsolete at the
same time using the macro @code{define-obsolete-function-alias}.
same time using the macro @code{define-obsolete-function-alias}:
@defmac define-obsolete-function-alias obsolete-name current-name &optional when docstring
This macro marks the function @var{obsolete-name} obsolete and also
......@@ -1210,6 +1210,33 @@ equivalent to the following:
@end example
@end defmac
In addition, you can mark a certain a particular calling convention
for a function as obsolete:
@defun set-advertised-calling-convention function signature
This function specifies the argument list @var{signature} as the
correct way to call @var{function}. This causes the Emacs byte
compiler to issue a warning whenever it comes across an Emacs Lisp
program that calls @var{function} any other way (however, it will
still allow the code to be byte compiled).
For instance, in old versions of Emacs the @code{sit-for} function
accepted three arguments, like this
@smallexample
(sit-for seconds milliseconds nodisp)
@end smallexample
However, calling @code{sit-for} this way is considered obsolete
(@pxref{Waiting}). The old calling convention is deprecated like
this:
@smallexample
(set-advertised-calling-convention
'sit-for '(seconds &optional nodisp))
@end smallexample
@end defun
@node Inline Functions
@section Inline Functions
@cindex inline functions
......
......@@ -2470,9 +2470,13 @@ can do it this way:
@cindex menu bar
Most window systems allow each frame to have a @dfn{menu bar}---a
permanently displayed menu stretching horizontally across the top of the
frame. The items of the menu bar are the subcommands of the fake
``function key'' @code{menu-bar}, as defined in the active keymaps.
permanently displayed menu stretching horizontally across the top of
the frame. (In order for a frame to display a menu bar, its
@code{menu-bar-lines} parameter must be greater than zero.
@xref{Layout Parameters}.)
The items of the menu bar are the subcommands of the fake ``function
key'' @code{menu-bar}, as defined in the active keymaps.
To add an item to the menu bar, invent a fake ``function key'' of your
own (let's call it @var{key}), and make a binding for the key sequence
......@@ -2490,13 +2494,6 @@ determining the menu bar contents. That is, the menu bar is computed
from the keymaps that would be active if @code{overriding-local-map}
were @code{nil}. @xref{Active Keymaps}.
In order for a frame to display a menu bar, its @code{menu-bar-lines}
parameter must be greater than zero. Emacs uses just one line for the
menu bar itself; if you specify more than one line, the other lines
serve to separate the menu bar from the windows in the frame. We
recommend 1 or 2 as the value of @code{menu-bar-lines}. @xref{Layout
Parameters}.
Here's an example of setting up a menu bar item:
@example
......@@ -2535,8 +2532,8 @@ bar item:
@end example
@noindent
@code{edit} is the fake function key used by the global map for the
@samp{Edit} menu bar item. The main reason to suppress a global
Here, @code{edit} is the fake function key used by the global map for
the @samp{Edit} menu bar item. The main reason to suppress a global
menu bar item is to regain space for mode-specific items.
@defvar menu-bar-final-items
......@@ -2557,6 +2554,23 @@ advise you to ensure that the functions it calls do not take much time
in the usual case.
@end defvar
Next to every menu bar item, Emacs displays a key binding that runs
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.
@node Tool Bar
@subsection Tool bars
@cindex tool bar
......
......@@ -823,7 +823,7 @@ without extension.
@code{load-history}.
@defvar load-history
This value of this variable is an alist that associates the names of
The value of this variable is an alist that associates the names of
loaded library files with the names of the functions and variables
they defined, as well as the features they provided or required.
......
......@@ -85,6 +85,9 @@ Minor mode variables will not be listed here.
@item case-fold-search
@xref{Searching and Case}.
@item comment-column
@xref{Comments,,, emacs, The GNU Emacs Manual}.
@item ctl-arrow
@xref{Usual Display}.
......@@ -94,9 +97,6 @@ Minor mode variables will not be listed here.
@item cursor-type
@xref{Cursor Parameters}.
@item comment-column
@xref{Comments,,, emacs, The GNU Emacs Manual}.
@item default-directory
@xref{File Name Expansion}.
......
......@@ -163,7 +163,7 @@ search.
@item key-translation-map
A keymap for translating keys. This one overrides ordinary key
bindings, unlike @code{local- function-key-map}. @xref{Translation
bindings, unlike @code{local-function-key-map}. @xref{Translation
Keymaps}.
@item kmacro-map
......
......@@ -511,7 +511,7 @@ set to a non-@code{nil} value.
@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 no maximum (don't delete old
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
particular history list.
......@@ -626,7 +626,6 @@ for reading certain kinds of names with completion.
@menu
* Basic Completion:: Low-level functions for completing strings.
(These are too low level to use the minibuffer.)
* Minibuffer Completion:: Invoking the minibuffer with completion.
* Completion Commands:: Minibuffer commands that do completion.
* High-Level Completion:: Convenient special cases of completion
......@@ -640,31 +639,23 @@ for reading certain kinds of names with completion.
@node Basic Completion
@subsection Basic Completion Functions
The completion functions @code{try-completion},
@code{all-completions} and @code{test-completion} have nothing in
themselves to do with minibuffers. We describe them in this chapter
so as to keep them near the higher-level completion features that do
use the minibuffer.
If you store a completion alist in a variable, you should mark the
variable as ``risky'' with a non-@code{nil}
@code{risky-local-variable} property.
The following completion functions have nothing in themselves to do
with minibuffers. We describe them here to keep them near the
higher-level completion features that do use the minibuffer.
@defun try-completion string collection &optional predicate
This function returns the longest common substring of all possible
completions of @var{string} in @var{collection}. The value of
@var{collection} must be a list of strings or symbols, an alist, an
obarray, a hash table, or a function that implements a virtual set of
strings (see below).
obarray, a hash table, or a completion function (@pxref{Programmed
Completion}).
Completion compares @var{string} against each of the permissible
completions specified by @var{collection}; if the beginning of the
permissible completion equals @var{string}, it matches. If no permissible
completions match, @code{try-completion} returns @code{nil}. If only
one permissible completion matches, and the match is exact, then
@code{try-completion} returns @code{t}. Otherwise, the value is the
longest initial sequence common to all the permissible completions that
match.
completions specified by @var{collection}. If no permissible
completions match, @code{try-completion} returns @code{nil}. If there
is just one matching completion, and the match is exact, it returns
@code{t}. Otherwise, it returns the longest initial sequence common
to all possible matching completions.
If @var{collection} is an alist (@pxref{Association Lists}), the
permissible completions are the elements of the alist that are either
......@@ -688,13 +679,13 @@ Also, you cannot intern a given symbol in more than one obarray.
If @var{collection} is a hash table, then the keys that are strings
are the possible completions. Other keys are ignored.