Commit e5e76c04 authored by Miles Bader's avatar Miles Bader

Merge from emacs--rel--22

Revision: emacs@sv.gnu.org/emacs--devo--0--patch-943
parents b890d447 a2afc99d
......@@ -412,10 +412,10 @@ else
fi
test \$exitcode = 0") || {
echo No shell found that supports shell functions.
echo Please tell autoconf@gnu.org about your system,
echo including any error possibly output before this
echo message
echo Please tell bug-autoconf@gnu.org about your system,
echo including any error possibly output before this message.
echo This can help us improve future autoconf versions.
echo Configuration will now proceed without shell functions.
}
......
2007-12-04 Richard Stallman <rms@gnu.org>
* objects.texi (Symbol Type): Fix typo.
2007-12-03 Richard Stallman <rms@gnu.org>
* hooks.texi (Standard Hooks): Add link to Hooks for Loading.
2007-12-01 Glenn Morris <rgm@gnu.org>
* functions.texi (Declaring Functions): Improve previous change.
......@@ -7,6 +15,10 @@
* functions.texi (Declaring Functions): Add optional fourth
argument of declare-function, and setting third argument to `t'.
2007-11-29 Richard Stallman <rms@gnu.org>
* customize.texi (Composite Types): Document `group' type.
2007-11-29 Glenn Morris <rgm@gnu.org>
* functions.texi (Declaring Functions): Add findex. Mention
......@@ -34,6 +46,11 @@
* compile.texi (Compiler Errors): Clarify previous change.
2007-11-24 Richard Stallman <rms@gnu.org>
* display.texi (Refresh Screen, Forcing Redisplay):
Clarify the text and move items around.
2007-11-24 Glenn Morris <rgm@gnu.org>
* functions.texi (Declaring Functions): New section.
......
......@@ -755,6 +755,11 @@ string, and the third a function.
In the customization buffer, each element is displayed and edited
separately, according to the type specified for it.
@item (group @var{element-types}@dots{})
This works like @code{list} except for the formatting
of text in the Custom buffer. @code{list} labels each
element value with its tag; @code{group} does not.
@item (vector @var{element-types}@dots{})
Like @code{list} except that the value must be a vector instead of a
list. The elements work the same as in @code{list}.
......
......@@ -55,21 +55,10 @@ This function clears and redisplays frame @var{frame}.
This function clears and redisplays all visible frames.
@end deffn
This function calls for redisplay of certain windows, the next time
redisplay is done, but does not clear them first.
@defun force-window-update &optional object
This function forces some or all windows to be updated on next redisplay.
If @var{object} is a window, it forces redisplay of that window. If
@var{object} is a buffer or buffer name, it forces redisplay of all
windows displaying that buffer. If @var{object} is @code{nil} (or
omitted), it forces redisplay of all windows.
@end defun
Processing user input takes absolute priority over redisplay. If you
call these functions when input is available, they do nothing
immediately, but a full redisplay does happen eventually---after all the
input has been processed.
In Emacs, processing user input takes priority over redisplay. If
you call these functions when input is available, they don't redisplay
immediately, but the requested redisplay does happen
eventually---after all the input has been processed.
Normally, suspending and resuming Emacs also refreshes the screen.
Some terminal emulators record separate contents for display-oriented
......@@ -89,11 +78,56 @@ to redraw, @code{nil} means redrawing is needed. The default is @code{nil}.
@section Forcing Redisplay
@cindex forcing redisplay
Emacs normally tries to redisplay the screen whenever it waits for
input. With this function you can request an immediate attempt to
redisplay, in the middle of Lisp code, without actually waiting for
input.
@defun redisplay &optional force
This function tries immediately to redisplay, provided there are no
pending input events. It is equivalent to @code{(sit-for 0)}.
If the optional argument @var{force} is non-@code{nil}, it does all
pending redisplay work even if input is available, with no
pre-emption.
The function returns @code{t} if it actually tried to redisplay, and
@code{nil} otherwise. A value of @code{t} does not mean that
redisplay proceeded to completion; it could have been pre-empted by
newly arriving terminal input.
@end defun
@code{redisplay} with no argument tries immediately to redisplay,
but has no effect on the usual rules for what parts of the screen to
redisplay. By contrast, the following function adds certain windows
to the pending redisplay work (as if their contents had completely
changed), but doesn't immediately try to do any redisplay work.
@defun force-window-update &optional object
This function forces some or all windows to be updated on next
redisplay. If @var{object} is a window, it requires eventual
redisplay of that window. If @var{object} is a buffer or buffer name,
it requires eventual redisplay of all windows displaying that buffer.
If @var{object} is @code{nil} (or omitted), it requires eventual
redisplay of all windows.
@end defun
@code{force-window-update} does not do a redisplay immediately.
(Emacs will do that when it waits for input.) Rather, its effect is
to put more work on the queue to be done by redisplay whenever there
is a chance.
Emacs redisplay normally stops if input arrives, and does not happen
at all if input is available before it starts. Most of the time, this
is exactly what you want. However, you can prevent preemption by
binding @code{redisplay-dont-pause} to a non-@code{nil} value.
@defvar redisplay-dont-pause
If this variable is non-@code{nil}, pending input does not
prevent or halt redisplay; redisplay occurs, and finishes,
regardless of whether input is available.
@end defvar
@defvar redisplay-preemption-period
This variable specifies how many seconds Emacs waits between checks
for new input during redisplay. (The default is 0.1 seconds.) If
......@@ -107,22 +141,6 @@ This variable is only obeyed on graphical terminals. For
text terminals, see @ref{Terminal Output}.
@end defvar
@defvar redisplay-dont-pause
If this variable is non-@code{nil}, pending input does not
prevent or halt redisplay; redisplay occurs, and finishes,
regardless of whether input is available.
@end defvar
@defun redisplay &optional force
This function performs an immediate redisplay provided there are no
pending input events. This is equivalent to @code{(sit-for 0)}.
If the optional argument @var{force} is non-@code{nil}, it forces an
immediate and complete redisplay even if input is available.
Returns @code{t} if redisplay was performed, or @code{nil} otherwise.
@end defun
@node Truncation
@section Truncation
@cindex line wrapping
......
......@@ -31,6 +31,10 @@ these functions are called in a special way (they are passed arguments,
or their values are used). The variables whose names end in
@samp{-function} have single functions as their values.
A special feature allows you to specify expressions to evaluate if and
when a file is loaded (@pxref{Hooks for Loading}). That feature is
not exactly a hook, but does a similar job.
@c We need to xref to where each hook is documented or else document
@c it here.
......
......@@ -525,7 +525,7 @@ bit values are 2**22 for alt, 2**23 for super and 2**24 for hyper.
A @dfn{symbol} in GNU Emacs Lisp is an object with a name. The
symbol name serves as the printed representation of the symbol. In
ordinary Lisp use, with one single obarray (@pxref{Creating Symbols},
ordinary Lisp use, with one single obarray (@pxref{Creating Symbols}),
a symbol's name is unique---no two symbols have the same name.
A symbol can serve as a variable, as a function name, or to hold a
......
......@@ -3138,11 +3138,6 @@ be used (only once) in place of a file name on the command line. Etags
reads from standard input and marks the produced tags as belonging to
the file FILE.
*** The --members option is now the default.
Use --no-members if you want the old default behaviour of not tagging
struct members in C, members variables in C++ and variables in PHP.
** Ctags changes.
*** Ctags now allows duplicate tags
......
......@@ -15,6 +15,11 @@
* pop.c (socket_connection): Use getaddrinfo if available.
2007-11-22 Francesco Potort,Al(B <pot@gnu.org>
* etags.c (default_C_help) [CTAGS]: differentiate the help string,
as the defaults in ctags are different from etags.
2007-11-15 Francesco Potort,Al(B <pot@gnu.org>
* etags.c: Make prototypes for extern definitions, and add all
......
......@@ -514,7 +514,7 @@ static bool update; /* -u: update tags */
static bool vgrind_style; /* -v: create vgrind style index output */
static bool no_warnings; /* -w: suppress warnings (undocumented) */
static bool cxref_style; /* -x: create cxref style output */
static bool cplusplus; /* .[hc] means C++, not C */
static bool cplusplus; /* .[hc] means C++, not C (undocumented) */
static bool ignoreindent; /* -I: ignore indentation in C */
static bool packages_only; /* --packages-only: in Ada, only tag packages*/
......@@ -621,10 +621,19 @@ followed by a colon, are tags.";
/* Note that .c and .h can be considered C++, if the --c++ flag was
given, or if the `class' or `template' keyowrds are met inside the file.
given, or if the `class' or `template' keywords are met inside the file.
That is why default_C_entries is called for these. */
static char *default_C_suffixes [] =
{ "c", "h", NULL };
#if CTAGS /* C help for Ctags */
static char default_C_help [] =
"In C code, any C function is a tag. Use -t to tag typedefs.\n\
Use -T to tag definitions of `struct', `union' and `enum'.\n\
Use -d to tag `#define' macro definitions and `enum' constants.\n\
Use --globals to tag global variables.\n\
You can tag function declarations and external variables by\n\
using `--declarations', and struct members by using `--members'.";
#else /* C help for Etags */
static char default_C_help [] =
"In C code, any C function or typedef is a tag, and so are\n\
definitions of `struct', `union' and `enum'. `#define' macro\n\
......@@ -635,6 +644,7 @@ definitions and `enum' constants are tags unless you specify\n\
`--no-members' can make the tags table file much smaller.\n\
You can tag function declarations and external variables by\n\
using `--declarations'.";
#endif /* C help for Ctags and Etags */
static char *Cplusplus_suffixes [] =
{ "C", "c++", "cc", "cpp", "cxx", "H", "h++", "hh", "hpp", "hxx",
......
2007-12-05 Richard Stallman <rms@gnu.org>
* wid-edit.el (widget-type): Doc fix.
2007-12-05 Stefan Monnier <monnier@iro.umontreal.ca>
* progmodes/perl-mode.el (perl-font-lock-syntactic-keywords):
Don't match "sub { (...) ... }".
2007-12-05 Richard Stallman <rms@gnu.org>
* international/mule-cmds.el (toggle-input-method-active): New var.
(toggle-input-method): Bind toggle-input-method-active to t.
Error if it was already non-nil.
2007-12-05 Reiner Steib <Reiner.Steib@gmx.de>
* net/tls.el (tls-hostmismatch, open-tls-stream): Checkdoc cleanup.
......
......@@ -1492,6 +1492,9 @@ To deactivate it programmatically, use `inactivate-input-method'."
(customize-mark-as-set 'default-input-method))
default-input-method)
(defvar toggle-input-method-active nil
"Non-nil inside `toggle-input-method'.")
(defun toggle-input-method (&optional arg interactive)
"Enable or disable multilingual text input method for the current buffer.
Only one input method can be enabled at any time in a given buffer.
......@@ -1511,9 +1514,12 @@ When called interactively, the optional arg INTERACTIVE is non-nil,
which marks the variable `default-input-method' as set for Custom buffers."
(interactive "P\np")
(if toggle-input-method-active
(error "Recursive use of `toggle-input-method'"))
(if (and current-input-method (not arg))
(inactivate-input-method)
(let ((default (or (car input-method-history) default-input-method)))
(let ((toggle-input-method-active t)
(default (or (car input-method-history) default-input-method)))
(if (and arg default (equal current-input-method default)
(> (length input-method-history) 1))
(setq default (nth 1 input-method-history)))
......
......@@ -266,7 +266,9 @@ The expansion is entirely correct because it uses the C preprocessor."
;; format statements
("^[ \t]*format.*=[ \t]*\\(\n\\)" (1 '(7)))
;; Funny things in sub arg specifications like `sub myfunc ($$)'
("\\<sub\\s-+\\S-+\\s-*(\\([^)]+\\))" 1 '(1))
;; Be careful not to match "sub { (...) ... }".
("\\<sub[[:space:]]+[^{}[:punct:][:space:]]+[[:space:]]*(\\([^)]+\\))"
1 '(1))
;; Regexp and funny quotes.
("\\(?:[?:.,;=!~({[]\\|\\(^\\)\\)[ \t\n]*\\(/\\)"
(2 (if (and (match-end 1)
......
......@@ -488,7 +488,7 @@ new value.")
;;; Widget Properties.
(defsubst widget-type (widget)
"Return the type of WIDGET, a symbol."
"Return the type of WIDGET. The type is a symbol."
(car widget))
;;;###autoload
......
2007-11-24 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* INSTALL: Also build and run on Mac OS X 10.5.
2007-11-01 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
* inc/config.h: Remove HAVE_X11R5.
......
......@@ -192,7 +192,7 @@ is created.
* NOTES
Emacs should build and run on a PowerMac running Mac OS 8.6 - 9.2 (but
only tested on 9.2.2), and Mac OS X 10.1 - 10.4.
only tested on 9.2.2), and Mac OS X 10.1 - 10.5.
You will need around 100 MB of disk space for the source files and
intermediate files.
......
2007-12-05 Magnus Henoch <mange@freemail.hu>
* process.c (make_process): Initialize pty_flag to 0.
2007-12-05 Jason Rumney <jasonr@gnu.org>
* image.c (xbm_load) [WINDOWSNT]: Shuffle the bits of directly
specified XBMs.
2007-12-05 Richard Stallman <rms@gnu.org>
* xdisp.c (syms_of_xdisp) <scroll-conservatively>: Doc fix.
2007-12-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* mac.c (cfsockets_for_select) [MAC_OSX && SELECT_USE_CFSOCKET]:
New variable.
(mac_try_close_socket) [MAC_OSX]: New function.
[MAC_OSX] (sys_select) [SELECT_USE_CFSOCKET]:
Update cfsockets_for_select. Replace invalid CFRunLoop source.
* sysdep.c (emacs_close) [MAC_OSX && HAVE_CARBON]:
Use mac_try_close_socket.
2007-12-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* unexmacosx.c (unrelocate): New argument BASE. Use it instead of
reloc_base.
(copy_dysymtab): Compute relocation base here.
(rebase_reloc_address) [__ppc64__]: New function.
(copy_dysymtab) [__ppc64__]: Use it if relocation base needs to be
changed.
2007-12-05 Jason Rumney <jasonr@gnu.org>
* w32proc.c (sys_spawnve): Quote args with wildcards.
2007-12-05 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp>
* unexmacosx.c (copy_data_segment): Also copy __gcc_except_tab and
__objc_* sections.
(unrelocate) [_LP64]: Set relocation base to address of data segment.
2007-12-05 Michael Albinus <michael.albinus@gmx.de>
* dbusbind.c (xd_read_message): Return value is a Lisp_Object.
......
......@@ -3128,6 +3128,8 @@ convert_mono_to_color_image (f, img, foreground, background)
release_frame_dc (f, hdc);
old_prev = SelectObject (old_img_dc, img->pixmap);
new_prev = SelectObject (new_img_dc, new_pixmap);
/* Windows convention for mono bitmaps is black = background,
white = foreground. */
SetTextColor (new_img_dc, background);
SetBkColor (new_img_dc, foreground);
......@@ -3523,6 +3525,19 @@ xbm_load (f, img)
else
bits = XBOOL_VECTOR (data)->data;
#ifdef WINDOWSNT
{
char *invertedBits;
int nbytes, i;
/* Windows mono bitmaps are reversed compared with X. */
invertedBits = bits;
nbytes = (img->width + BITS_PER_CHAR - 1) / BITS_PER_CHAR
* img->height;
bits = (char *) alloca(nbytes);
for (i = 0; i < nbytes; i++)
bits[i] = XBM_BIT_SHUFFLE (invertedBits[i]);
}
#endif
/* Create the pixmap. */
Create_Pixmap_From_Bitmap_Data (f, img, bits,
......
......@@ -5004,6 +5004,10 @@ extern int noninteractive;
#if SELECT_USE_CFSOCKET
#define SELECT_TIMEOUT_THRESHOLD_RUNLOOP 0.2
/* Dictionary of file descriptors vs CFSocketRef's allocated in
sys_select. */
static CFMutableDictionaryRef cfsockets_for_select;
static void
socket_callback (s, type, address, data, info)
CFSocketRef s;
......@@ -5089,6 +5093,43 @@ select_and_poll_event (nfds, rfds, wfds, efds, timeout)
return 0;
}
/* Clean up the CFSocket associated with the file descriptor FD in
case the same descriptor is used in other threads later. If no
CFSocket is associated with FD, then return 0 without closing FD.
Otherwise, return 1 with closing FD. */
int
mac_try_close_socket (fd)
int fd;
{
#if SELECT_USE_CFSOCKET
if (cfsockets_for_select)
{
void *key = (void *) fd;
CFSocketRef socket =
(CFSocketRef) CFDictionaryGetValue (cfsockets_for_select, key);
if (socket)
{
#if MAC_OS_X_VERSION_MAX_ALLOWED >= 1020
CFOptionFlags flags = CFSocketGetSocketFlags (socket);
if (!(flags & kCFSocketCloseOnInvalidate))
CFSocketSetSocketFlags (socket, flags | kCFSocketCloseOnInvalidate);
#endif
BLOCK_INPUT;
CFSocketInvalidate (socket);
CFDictionaryRemoveValue (cfsockets_for_select, key);
UNBLOCK_INPUT;
return 1;
}
}
#endif
return 0;
}
int
sys_select (nfds, rfds, wfds, efds, timeout)
int nfds;
......@@ -5165,6 +5206,11 @@ sys_select (nfds, rfds, wfds, efds, timeout)
CFDictionaryCreateMutable (NULL, 0, NULL,
&kCFTypeDictionaryValueCallBacks);
if (cfsockets_for_select == NULL)
cfsockets_for_select =
CFDictionaryCreateMutable (NULL, 0, NULL,
&kCFTypeDictionaryValueCallBacks);
for (minfd = 1; ; minfd++) /* nfds-1 works as a sentinel. */
if (FD_ISSET (minfd, rfds) || (wfds && FD_ISSET (minfd, wfds)))
break;
......@@ -5176,7 +5222,7 @@ sys_select (nfds, rfds, wfds, efds, timeout)
CFRunLoopSourceRef source =
(CFRunLoopSourceRef) CFDictionaryGetValue (sources, key);
if (source == NULL)
if (source == NULL || !CFRunLoopSourceIsValid (source))
{
CFSocketRef socket =
CFSocketCreateWithNative (NULL, fd,
......@@ -5186,11 +5232,12 @@ sys_select (nfds, rfds, wfds, efds, timeout)
if (socket == NULL)
continue;
CFDictionarySetValue (cfsockets_for_select, key, socket);
source = CFSocketCreateRunLoopSource (NULL, socket, 0);
CFRelease (socket);
if (source == NULL)
continue;
CFDictionaryAddValue (sources, key, source);
CFDictionarySetValue (sources, key, source);
CFRelease (source);
}
CFRunLoopAddSource (runloop, source, kCFRunLoopDefaultMode);
......
......@@ -631,6 +631,7 @@ make_process (name)
p->tick = 0;
p->update_tick = 0;
p->pid = 0;
p->pty_flag = 0;
p->raw_status_new = 0;
p->status = Qrun;
p->mark = Fmake_marker ();
......
......@@ -3486,6 +3486,15 @@ emacs_close (fd)
int did_retry = 0;
register int rtnval;
#if defined (MAC_OSX) && defined (HAVE_CARBON)
{
extern int mac_try_close_socket P_ ((int));
if (mac_try_close_socket (fd))
return 0;
}
#endif
while ((rtnval = close (fd)) == -1
&& (errno == EINTR))
did_retry = 1;
......
......@@ -819,7 +819,9 @@ copy_data_segment (struct load_command *lc)
|| strncmp (sectp->sectname, "__la_sym_ptr2", 16) == 0
|| strncmp (sectp->sectname, "__dyld", 16) == 0
|| strncmp (sectp->sectname, "__const", 16) == 0
|| strncmp (sectp->sectname, "__cfstring", 16) == 0)
|| strncmp (sectp->sectname, "__cfstring", 16) == 0
|| strncmp (sectp->sectname, "__gcc_except_tab", 16) == 0
|| strncmp (sectp->sectname, "__objc_", 7) == 0)
{
if (!unexec_copy (sectp->offset, old_file_offset, sectp->size))
unexec_error ("cannot copy section %s", sectp->sectname);
......@@ -898,12 +900,13 @@ copy_symtab (struct load_command *lc, long delta)
/* Fix up relocation entries. */
static void
unrelocate (const char *name, off_t reloff, int nrel)
unrelocate (const char *name, off_t reloff, int nrel, vm_address_t base)
{
int i, unreloc_count;
struct relocation_info reloc_info;
struct scattered_relocation_info *sc_reloc_info
= (struct scattered_relocation_info *) &reloc_info;
vm_address_t location;
for (unreloc_count = 0, i = 0; i < nrel; i++)
{
......@@ -917,14 +920,15 @@ unrelocate (const char *name, off_t reloff, int nrel)
switch (reloc_info.r_type)
{
case GENERIC_RELOC_VANILLA:
if (reloc_info.r_address >= data_segment_scp->vmaddr
&& reloc_info.r_address < (data_segment_scp->vmaddr
+ data_segment_scp->vmsize))
location = base + reloc_info.r_address;
if (location >= data_segment_scp->vmaddr
&& location < (data_segment_scp->vmaddr
+ data_segment_scp->vmsize))
{
off_t src_off = data_segment_old_fileoff
+ reloc_info.r_address - data_segment_scp->vmaddr;
+ (location - data_segment_scp->vmaddr);
off_t dst_off = data_segment_scp->fileoff
+ reloc_info.r_address - data_segment_scp->vmaddr;
+ (location - data_segment_scp->vmaddr);
if (!unexec_copy (dst_off, src_off, 1 << reloc_info.r_length))
unexec_error ("unrelocate: %s:%d cannot copy original value",
......@@ -955,15 +959,73 @@ unrelocate (const char *name, off_t reloff, int nrel)
unreloc_count, nrel, name);
}
#if __ppc64__
/* Rebase r_address in the relocation table. */
static void
rebase_reloc_address (off_t reloff, int nrel, long linkedit_delta, long diff)
{
int i;
struct relocation_info reloc_info;
struct scattered_relocation_info *sc_reloc_info
= (struct scattered_relocation_info *) &reloc_info;
for (i = 0; i < nrel; i++, reloff += sizeof (reloc_info))
{
if (lseek (infd, reloff - linkedit_delta, L_SET)
!= reloff - linkedit_delta)
unexec_error ("rebase_reloc_table: cannot seek to reloc_info");
if (!unexec_read (&reloc_info, sizeof (reloc_info)))
unexec_error ("rebase_reloc_table: cannot read reloc_info");
if (sc_reloc_info->r_scattered == 0
&& reloc_info.r_type == GENERIC_RELOC_VANILLA)
{
reloc_info.r_address -= diff;
if (!unexec_write (reloff, &reloc_info, sizeof (reloc_info)))
unexec_error ("rebase_reloc_table: cannot write reloc_info");
}
}
}
#endif
/* Copy a LC_DYSYMTAB load command from the input file to the output
file, adjusting the file offset fields. */
static void
copy_dysymtab (struct load_command *lc, long delta)
{
struct dysymtab_command *dstp = (struct dysymtab_command *) lc;
vm_address_t base;
unrelocate ("local", dstp->locreloff, dstp->nlocrel);
unrelocate ("external", dstp->extreloff, dstp->nextrel);
#ifdef _LP64
#if __ppc64__
{
int i;
base = 0;
for (i = 0; i < nlc; i++)
if (lca[i]->cmd == LC_SEGMENT)
{
struct segment_command *scp = (struct segment_command *) lca[i];
if (scp->vmaddr + scp->vmsize > 0x100000000
&& (scp->initprot & VM_PROT_WRITE) != 0)
{
base = data_segment_scp->vmaddr;
break;
}
}
}
#else
/* First writable segment address. */
base = data_segment_scp->vmaddr;
#endif
#else
/* First segment address in the file (unless MH_SPLIT_SEGS set). */
base = 0;
#endif
unrelocate ("local", dstp->locreloff, dstp->nlocrel, base);
unrelocate ("external", dstp->extreloff, dstp->nextrel, base);
if (dstp->nextrel > 0) {
dstp->extreloff += delta;
......@@ -982,6 +1044,29 @@ copy_dysymtab (struct load_command *lc, long delta)
unexec_error ("cannot write symtab command to header");
curr_header_offset += lc->cmdsize;
#if __ppc64__
/* Check if the relocation base needs to be changed. */
if (base == 0)
{
vm_address_t newbase = 0;
int i;