diff options
author | Miles Bader <miles@gnu.org> | 2007-12-06 00:46:18 +0000 |
---|---|---|
committer | Miles Bader <miles@gnu.org> | 2007-12-06 00:46:18 +0000 |
commit | e5e76c04310d287a56675876dd83e1089faba215 (patch) | |
tree | a4b4f1cc134e4fd5af42671ec6689e07afe48ff2 | |
parent | b890d447fb56bfe9f2e4742eda4b3ab4b5f4b32a (diff) | |
parent | a2afc99dbad3fa9a3170ad72c578451c3aea58a4 (diff) | |
download | emacs-e5e76c04310d287a56675876dd83e1089faba215.tar.gz emacs-e5e76c04310d287a56675876dd83e1089faba215.tar.bz2 emacs-e5e76c04310d287a56675876dd83e1089faba215.zip |
Merge from emacs--rel--22
Revision: emacs@sv.gnu.org/emacs--devo--0--patch-943
-rwxr-xr-x | configure | 8 | ||||
-rw-r--r-- | doc/lispref/ChangeLog | 17 | ||||
-rw-r--r-- | doc/lispref/customize.texi | 5 | ||||
-rw-r--r-- | doc/lispref/display.texi | 80 | ||||
-rw-r--r-- | doc/lispref/hooks.texi | 4 | ||||
-rw-r--r-- | doc/lispref/objects.texi | 2 | ||||
-rw-r--r-- | etc/NEWS.22 | 5 | ||||
-rw-r--r-- | lib-src/ChangeLog | 5 | ||||
-rw-r--r-- | lib-src/etags.c | 14 | ||||
-rw-r--r-- | lisp/ChangeLog | 15 | ||||
-rw-r--r-- | lisp/international/mule-cmds.el | 8 | ||||
-rw-r--r-- | lisp/progmodes/perl-mode.el | 4 | ||||
-rw-r--r-- | lisp/wid-edit.el | 2 | ||||
-rw-r--r-- | mac/ChangeLog | 4 | ||||
-rw-r--r-- | mac/INSTALL | 2 | ||||
-rw-r--r-- | src/ChangeLog | 43 | ||||
-rw-r--r-- | src/image.c | 15 | ||||
-rw-r--r-- | src/mac.c | 51 | ||||
-rw-r--r-- | src/process.c | 1 | ||||
-rw-r--r-- | src/sysdep.c | 9 | ||||
-rw-r--r-- | src/unexmacosx.c | 103 | ||||
-rw-r--r-- | src/w32proc.c | 9 | ||||
-rw-r--r-- | src/xdisp.c | 8 |
23 files changed, 353 insertions, 61 deletions
diff --git a/configure b/configure index 10fea94c506..f2f56482347 100755 --- a/configure +++ b/configure @@ -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. } diff --git a/doc/lispref/ChangeLog b/doc/lispref/ChangeLog index 95ab2e09b4b..586f250bd06 100644 --- a/doc/lispref/ChangeLog +++ b/doc/lispref/ChangeLog @@ -1,3 +1,11 @@ +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. diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 7c723a29f28..b97ce20fc22 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi @@ -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}. diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 4c9df9c5ede..165636006d3 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -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 diff --git a/doc/lispref/hooks.texi b/doc/lispref/hooks.texi index d0bb2de8675..3f7f4b4d8bb 100644 --- a/doc/lispref/hooks.texi +++ b/doc/lispref/hooks.texi @@ -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. diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index 0da05488858..64c79d63162 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi @@ -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 diff --git a/etc/NEWS.22 b/etc/NEWS.22 index b276e939ae4..d7368ac6f38 100644 --- a/etc/NEWS.22 +++ b/etc/NEWS.22 @@ -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 diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 3e8cb73c605..2cc37d49dd4 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -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 diff --git a/lib-src/etags.c b/lib-src/etags.c index 280399868d1..23527171e48 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c @@ -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", diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 1bcc372a619..f623747209f 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,18 @@ +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. diff --git a/lisp/international/mule-cmds.el b/lisp/international/mule-cmds.el index ca76d4f5054..77ef1f9cd40 100644 --- a/lisp/international/mule-cmds.el +++ b/lisp/international/mule-cmds.el @@ -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))) diff --git a/lisp/progmodes/perl-mode.el b/lisp/progmodes/perl-mode.el index 809ed7a9f36..ee14100f56d 100644 --- a/lisp/progmodes/perl-mode.el +++ b/lisp/progmodes/perl-mode.el @@ -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) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 48d74b4fb25..1ce6deda89e 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el @@ -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 diff --git a/mac/ChangeLog b/mac/ChangeLog index bcf4d5b5624..20a0de91012 100644 --- a/mac/ChangeLog +++ b/mac/ChangeLog @@ -1,3 +1,7 @@ +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. diff --git a/mac/INSTALL b/mac/INSTALL index 7cdf0de4940..6d78910b464 100644 --- a/mac/INSTALL +++ b/mac/INSTALL @@ -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. diff --git a/src/ChangeLog b/src/ChangeLog index d1507f7edde..f55e4ac786c 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,46 @@ +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. diff --git a/src/image.c b/src/image.c index 91be3f4b57e..a9b1e9835ed 100644 --- a/src/image.c +++ b/src/image.c @@ -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, diff --git a/src/mac.c b/src/mac.c index 75a606b60b3..9c1a08075f8 100644 --- a/src/mac.c +++ b/src/mac.c @@ -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); diff --git a/src/process.c b/src/process.c index dc96bc27e78..0204388e672 100644 --- a/src/process.c +++ b/src/process.c @@ -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 (); diff --git a/src/sysdep.c b/src/sysdep.c index 81850919dd3..d1f378a3f87 100644 --- a/src/sysdep.c +++ b/src/sysdep.c @@ -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; diff --git a/src/unexmacosx.c b/src/unexmacosx.c index 3646aec6983..dadc19d52e3 100644 --- a/src/unexmacosx.c +++ b/src/unexmacosx.c @@ -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; + + for (i = 0; i < num_unexec_regions; i++) + if (unexec_regions[i].range.address + unexec_regions[i].range.size + > 0x100000000) + { + newbase = data_segment_scp->vmaddr; + break; + } + + if (newbase) + { + rebase_reloc_address (dstp->locreloff, dstp->nlocrel, delta, newbase); + rebase_reloc_address (dstp->extreloff, dstp->nextrel, delta, newbase); + } + } +#endif } /* Copy a LC_TWOLEVEL_HINTS load command from the input file to the output diff --git a/src/w32proc.c b/src/w32proc.c index c21d589c525..a14a8ee384c 100644 --- a/src/w32proc.c +++ b/src/w32proc.c @@ -781,7 +781,14 @@ sys_spawnve (int mode, char *cmdname, char **argv, char **envp) variable in their environment. */ char ppid_env_var_buffer[64]; char *extra_env[] = {ppid_env_var_buffer, NULL}; - char *sepchars = " \t"; + /* These are the characters that cause an argument to need quoting. + Arguments with whitespace characters need quoting to prevent the + argument being split into two or more. Arguments with wildcards + are also quoted, for consistency with posix platforms, where wildcards + are not expanded if we run the program directly without a shell. + Some extra whitespace characters need quoting in Cygwin programs, + so this list is conditionally modified below. */ + char *sepchars = " \t*?"; /* We don't care about the other modes */ if (mode != _P_NOWAIT) diff --git a/src/xdisp.c b/src/xdisp.c index eb0fda1fa91..22f51859eff 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -24160,8 +24160,12 @@ If you want scrolling to always be a line at a time, you should set DEFVAR_INT ("scroll-conservatively", &scroll_conservatively, doc: /* *Scroll up to this many lines, to bring point back on screen. -A value of zero means to scroll the text to center point vertically -in the window. */); +If point moves off-screen, redisplay will scroll by up to +`scroll-conservatively' lines in order to bring point just barely +onto the screen again. If that cannot be done, then redisplay +recenters point as usual. + +A value of zero means always recenter point if it moves off screen. */); scroll_conservatively = 0; DEFVAR_INT ("scroll-margin", &scroll_margin, |