ido, iswitchb, icomplete: Use `C-.' and `C-,' for cycling (Bug#13708)
authorJambunathan K <kjambunathan@gmail.com>
Fri, 15 Feb 2013 19:39:50 +0000 (01:09 +0530)
committerJambunathan K <kjambunathan@gmail.com>
Fri, 15 Feb 2013 19:39:50 +0000 (01:09 +0530)
* lisp/icomplete.el (icomplete-minibuffer-map): Unbind `C-s' and `C-r'.
Bind `C-.' and `C-,' to `icomplete-forward-completions' and
`icomplete-backward-completions'.

* lisp/ido.el (ido-init-completion-maps): Bind `C-.' and `C-,' to
`ido-next-match' and `ido-prev-match' resply.

* lisp/iswitchb.el (iswitchb-read-buffer): Bind `C-.' and `C-,' to
`iswitchb-next-match' and `iswitchb-prev-match' resply.

src/ChangeLog
src/keyboard.c
src/process.c
src/w32proc.c

index 1e1fe64..6ff25ed 100644 (file)
@@ -1,16 +1,14 @@
+2013-02-15  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * process.c (h_errno) [!HAVE_H_ERRNO]: Remove unused decl.
+
 2013-02-15  Eli Zaretskii  <eliz@gnu.org>
 
+       * keyboard.c (read_char): Fix calculation of auto-save time out
+       when auto-save-timeout is less than 4.  (Bug#13720)
+
        * w32proc.c (new_child): Free up to 2 slots of dead processes at a
-       time.  Improve diagnostics in DebPrint.
-       (reader_thread): If cp->char_avail is NULL, set the FILE_AT_EOF
-       flag, so that sys_select could have a chance of noticing that this
-       process is dead, and call a SIGCHLD handler for it.  Improve
-       diagnostics in DebPrint.
-       (reap_subprocess): Reset the FILE_AT_EOF flag set by
-       reader_thread.
-       (sys_select): Watch a process whose procinfo.hProcess is non-NULL
-       even if its char_avail is NULL.  Allows to reap subprocesses that
-       were forcibly deleted by delete-process.  (Bug#13546)
+       time.  Improve diagnostics in DebPrint.  (Bug#13546)
 
        * w32.c (sys_socket, sys_bind, sys_connect, sys_gethostname)
        (sys_gethostbyname, sys_getservbyname, sys_getpeername)
index fe1c3d7..69c68d1 100644 (file)
@@ -2657,9 +2657,10 @@ read_char (int commandflag, Lisp_Object map,
          && XINT (Vauto_save_timeout) > 0)
        {
          Lisp_Object tem0;
-         EMACS_INT timeout = (delay_level
-                              * min (XFASTINT (Vauto_save_timeout) / 4,
-                                     MOST_POSITIVE_FIXNUM / delay_level));
+         EMACS_INT timeout = XFASTINT (Vauto_save_timeout);
+
+         timeout = min (timeout, MOST_POSITIVE_FIXNUM / delay_level * 4);
+         timeout = delay_level * timeout / 4;
          save_getcjmp (save_jump);
          restore_getcjmp (local_getcjmp);
          tem0 = sit_for (make_number (timeout), 1, 1);
index f210065..9d6e8c0 100644 (file)
@@ -180,10 +180,6 @@ static Lisp_Object Qlast_nonmenu_event;
 #define SERIALCONN_P(p) (EQ (XPROCESS (p)->type, Qserial))
 #define SERIALCONN1_P(p) (EQ (p->type, Qserial))
 
-#ifndef HAVE_H_ERRNO
-extern int h_errno;
-#endif
-
 /* Number of events of change of status of a process.  */
 static EMACS_INT process_tick;
 /* Number of events for which the user or sentinel has been notified.  */
@@ -5567,7 +5563,7 @@ Output from processes can arrive in between bunches.  */)
   if (XINT (start) < GPT && XINT (end) > GPT)
     move_gap_both (XINT (start), start_byte);
 
-  send_process (proc, (char *) BYTE_POS_ADDR (start_byte), 
+  send_process (proc, (char *) BYTE_POS_ADDR (start_byte),
                end_byte - start_byte, Fcurrent_buffer ());
 
   return Qnil;
index 8226564..3f3e97c 100644 (file)
@@ -1017,17 +1017,6 @@ reader_thread (void *arg)
       if (cp->status == STATUS_READ_ERROR || !cp->char_avail)
        break;
 
-      if (!CHILD_ACTIVE (cp) && cp->procinfo.hProcess && cp->fd >= 0)
-       {
-         /* Somebody already called delete_child on this child, since
-            only delete_child zeroes out cp->char_avail.  This means
-            no one will read from cp->fd and will not set the
-            FILE_AT_EOF flag, therefore preventing sys_select from
-            noticing that the process died.  Set the flag here
-            instead.  */
-         fd_info[cp->fd].flags |= FILE_AT_EOF;
-       }
-
       /* The name char_avail is a misnomer - it really just means the
         read-ahead has completed, whether successfully or not. */
       if (!SetEvent (cp->char_avail))
@@ -1237,11 +1226,6 @@ reap_subprocess (child_process *cp)
      sys_read when the subprocess output is fully read.  */
   if (cp->fd < 0)
     delete_child (cp);
-  else
-    {
-      /* Reset the flag set by reader_thread.  */
-      fd_info[cp->fd].flags &= ~FILE_AT_EOF;
-    }
 }
 
 /* Wait for a child process specified by PID, or for any of our
@@ -2067,7 +2051,7 @@ count_children:
     /* Some child_procs might be sockets; ignore them.  Also some
        children may have died already, but we haven't finished reading
        the process output; ignore them too.  */
-    if ((CHILD_ACTIVE (cp) || cp->procinfo.hProcess)
+    if ((CHILD_ACTIVE (cp) && cp->procinfo.hProcess)
        && (cp->fd < 0
            || (fd_info[cp->fd].flags & FILE_SEND_SIGCHLD) == 0
            || (fd_info[cp->fd].flags & FILE_AT_EOF) != 0)