Mercurial > emacs
changeset 107560:9ffe3226fad6
Merge from mainline.
author | Katsumi Yamaoka <yamaoka@jpl.org> |
---|---|
date | Thu, 25 Mar 2010 22:06:48 +0000 |
parents | 9ba820e1741a (current diff) 805495d3c451 (diff) |
children | aae79c4d6845 |
files | |
diffstat | 6 files changed, 61 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ChangeLog Thu Mar 25 00:17:24 2010 +0000 +++ b/lisp/ChangeLog Thu Mar 25 22:06:48 2010 +0000 @@ -1,3 +1,8 @@ +2010-03-25 Glenn Morris <rgm@gnu.org> + + * desktop.el (desktop-save-buffer-p): Don't mistakenly include + all dired buffers, even tramp ones. (Bug#5755) + 2010-03-25 Stefan Monnier <monnier@iro.umontreal.ca> Add "union tags" in mpc.el.
--- a/lisp/desktop.el Thu Mar 25 00:17:24 2010 +0000 +++ b/lisp/desktop.el Thu Mar 25 22:06:48 2010 +0000 @@ -1,7 +1,8 @@ ;;; desktop.el --- save partial status of Emacs when killed ;; Copyright (C) 1993, 1994, 1995, 1997, 2000, 2001, 2002, 2003, -;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software Foundation, Inc. +;; 2004, 2005, 2006, 2007, 2008, 2009, 2010 +;; Free Software Foundation, Inc. ;; Author: Morten Welinder <terra@diku.dk> ;; Keywords: convenience @@ -811,19 +812,23 @@ FILENAME is the visited file name, BUFNAME is the buffer name, and MODE is the major mode. \n\(fn FILENAME BUFNAME MODE)" - (let ((case-fold-search nil)) + (let ((case-fold-search nil) + dired-skip) (and (not (and (stringp desktop-buffers-not-to-save) (not filename) (string-match desktop-buffers-not-to-save bufname))) (not (memq mode desktop-modes-not-to-save)) + ;; FIXME this is broken if desktop-files-not-to-save is nil. (or (and filename (stringp desktop-files-not-to-save) (not (string-match desktop-files-not-to-save filename))) (and (eq mode 'dired-mode) (with-current-buffer bufname - (not (string-match desktop-files-not-to-save - default-directory)))) + (not (setq dired-skip + (string-match desktop-files-not-to-save + default-directory))))) (and (null filename) + (null dired-skip) ; bug#5755 (with-current-buffer bufname desktop-save-buffer)))))) ;; ----------------------------------------------------------------------------
--- a/lisp/url/ChangeLog Thu Mar 25 00:17:24 2010 +0000 +++ b/lisp/url/ChangeLog Thu Mar 25 22:06:48 2010 +0000 @@ -1,3 +1,7 @@ +2010-03-24 Teodor Zlatanov <tzz@lifelogs.com> + + * url-http.el (url-http-parse-headers): Fix wrong variable name. + 2010-03-24 Teodor Zlatanov <tzz@lifelogs.com> * url-http.el (url-http-codes): New variable to hold a mapping of
--- a/lisp/url/url-http.el Thu Mar 25 00:17:24 2010 +0000 +++ b/lisp/url/url-http.el Thu Mar 25 22:06:48 2010 +0000 @@ -486,7 +486,7 @@ (class nil) (success nil) ;; other status symbols: jewelry and luxury cars - (status-symbol (cadr (assq status-number url-http-codes)))) + (status-symbol (cadr (assq url-http-response-status url-http-codes)))) (setq class (/ url-http-response-status 100)) (url-http-debug "Parsed HTTP headers: class=%d status=%d" class url-http-response-status) (url-http-handle-cookies)
--- a/src/ChangeLog Thu Mar 25 00:17:24 2010 +0000 +++ b/src/ChangeLog Thu Mar 25 22:06:48 2010 +0000 @@ -1,3 +1,13 @@ +2010-03-25 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> + + * process.c (Fmake_network_process): Don't call turn_on_atimers around + `connect' (Bug#5723). + +2010-03-25 Helmut Eller <eller.helmut@gmail.com> + + * process.c (Fmake_network_process): Call `select' for interrupted + `connect' rather than creating new socket (Bug#5173). + 2010-03-24 Jan Djärv <jan.h.d@swipnet.se> * frame.c (x_get_arg): Handle RES_TYPE_BOOLEAN_NUMBER (bug #5736).
--- a/src/process.c Thu Mar 25 00:17:24 2010 +0000 +++ b/src/process.c Thu Mar 25 22:06:48 2010 +0000 @@ -3534,8 +3534,6 @@ { int optn, optbits; - retry_connect: - s = socket (lres->ai_family, lres->ai_socktype, lres->ai_protocol); if (s < 0) { @@ -3617,23 +3615,9 @@ immediate_quit = 1; QUIT; - /* This turns off all alarm-based interrupts; the - bind_polling_period call above doesn't always turn all the - short-interval ones off, especially if interrupt_input is - set. - - It'd be nice to be able to control the connect timeout - though. Would non-blocking connect calls be portable? - - This used to be conditioned by HAVE_GETADDRINFO. Why? */ - - turn_on_atimers (0); - ret = connect (s, lres->ai_addr, lres->ai_addrlen); xerrno = errno; - turn_on_atimers (1); - if (ret == 0 || xerrno == EISCONN) { /* The unwind-protect will be discarded afterwards. @@ -3652,6 +3636,38 @@ #endif #endif #endif + if (xerrno == EINTR) + { + /* Unlike most other syscalls connect() cannot be called + again. (That would return EALREADY.) The proper way to + wait for completion is select(). */ + int sc; + SELECT_TYPE fdset; + retry_select: + FD_ZERO (&fdset); + FD_SET (s, &fdset); + QUIT; + sc = select (s + 1, (SELECT_TYPE *)0, &fdset, (SELECT_TYPE *)0, + (EMACS_TIME *)0); + if (sc == -1) + { + if (errno == EINTR) + goto retry_select; + else + report_file_error ("select failed", Qnil); + } + eassert (sc > 0); + { + int len = sizeof xerrno; + eassert (FD_ISSET (s, &fdset)); + if (getsockopt (s, SOL_SOCKET, SO_ERROR, &xerrno, &len) == -1) + report_file_error ("getsockopt failed", Qnil); + if (xerrno != 0) + errno = xerrno, report_file_error ("error during connect", Qnil); + else + break; + } + } immediate_quit = 0; @@ -3659,9 +3675,6 @@ specpdl_ptr = specpdl + count1; emacs_close (s); s = -1; - - if (xerrno == EINTR) - goto retry_connect; } if (s >= 0)