emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master a8e545e 1/3: Merge from origin/emacs-26


From: Glenn Morris
Subject: [Emacs-diffs] master a8e545e 1/3: Merge from origin/emacs-26
Date: Sun, 30 Dec 2018 20:02:50 -0500 (EST)

branch: master
commit a8e545ef6b92f6eb5916a6803a5d95256fd9eb6b
Merge: 83bbb48 3abebeb
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Merge from origin/emacs-26
    
    3abebeb * lisp/files.el (cd): Fix last change.  (Bug#33791)
    7a60a4f Fix remote directories in Eshell on MS-Windows
    822a2d0 Fix :type 'group' in defcustom
    a731c56 Fix NS fringe bitmap drawing bug (bug#33864)
    0c52459 Fix commentary in dispnew.c
    c9fdd1b Improve accept-process-process doc
    9578c2a Fix a simple bug in display-buffer-use-some-frame
    0f9be72 Clarify thread switching while waiting for process output
    24ddea0 Improve process doc. with respect to handling of large input ...
    2931016 ; Cosmetic changes in etc/NEWS
    85516b8 Minor copyedits in landmark.el
    
    # Conflicts:
    #   etc/NEWS
---
 doc/lispref/processes.texi | 14 ++++++++------
 doc/lispref/threads.texi   |  6 +++---
 etc/NEWS.26                |  4 +++-
 lisp/files.el              | 12 +++++++++---
 lisp/obsolete/landmark.el  | 11 +++++++++--
 lisp/wid-edit.el           |  2 +-
 lisp/window.el             |  4 +---
 src/dispnew.c              |  8 +++++---
 src/nsterm.m               |  2 +-
 src/process.c              | 22 +++++++++++++---------
 10 files changed, 53 insertions(+), 32 deletions(-)

diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index c6ffb28..88b0382 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -612,10 +612,9 @@ these features.  However, for subprocesses used by Lisp 
programs for
 internal purposes (i.e., no user interaction with the subprocess is
 required), where significant amounts of data need to be exchanged
 between the subprocess and the Lisp program, it is often better to use
-a pipe, because pipes are more efficient, and because they are immune
-to stray character injections that ptys introduce for large (around
-500 byte) messages.  Also, the total number of ptys is limited on many
-systems, and it is good not to waste them unnecessarily.
+a pipe, because pipes are more efficient.  Also, the total number of
+ptys is limited on many systems, and it is good not to waste them
+unnecessarily.
 
 @defun make-process &rest args
 This function is the basic low-level primitive for starting
@@ -1821,7 +1820,8 @@ until output arrives from a process.
 This function allows Emacs to read pending output from processes.  The
 output is given to their filter functions.  If @var{process} is
 address@hidden then this function does not return until some output
-has been received from @var{process}.
+has been received from @var{process} or @var{process} has closed the
+connection.
 
 The arguments @var{seconds} and @var{millisec} let you specify timeout
 periods.  The former specifies a period measured in seconds and the
@@ -1846,7 +1846,9 @@ speech synthesis.
 
 The function @code{accept-process-output} returns address@hidden if it
 got output from @var{process}, or from any process if @var{process} is
address@hidden  It returns @code{nil} if the timeout expired before output
address@hidden; this can occur even after a process has exited if the
+corresponding connection contains buffered data.  The function returns
address@hidden if the timeout expired or the connection was closed before output
 arrived.
 @end defun
 
diff --git a/doc/lispref/threads.texi b/doc/lispref/threads.texi
index c9d5f79..d5d3b42 100644
--- a/doc/lispref/threads.texi
+++ b/doc/lispref/threads.texi
@@ -17,9 +17,9 @@ correct programs should not rely on cooperative threading.
 
   Currently, thread switching will occur upon explicit request via
 @code{thread-yield}, when waiting for keyboard input or for process
-output (e.g., during @code{accept-process-output}), or during blocking
-operations relating to threads, such as mutex locking or
address@hidden
+output from asynchronous processes (e.g., during
address@hidden), or during blocking operations relating
+to threads, such as mutex locking or @code{thread-join}.
 
   Emacs Lisp provides primitives to create and control threads, and
 also to create and control mutexes and condition variables, useful for
diff --git a/etc/NEWS.26 b/etc/NEWS.26
index 043573e..55bdaf1 100644
--- a/etc/NEWS.26
+++ b/etc/NEWS.26
@@ -52,6 +52,7 @@ often cause crashes.  Set it to nil if you really need those 
fonts.
 * Changes in Specialized Modes and Packages in Emacs 26.2
 
 ** Dired
+
 +++
 *** The 'Z' command on a directory name compresses all of its files.
 It produces a compressed '.tar.gz' archive with all the files in the
@@ -171,7 +172,8 @@ changed in Emacs 26.1, in that it didn't consider text 
inside comments
 and strings as a potential list.  This change is now reverted, and
 'thing-at-point' behaves like it did before Emacs 26.1.
 
-To cater to use cases where comments and strings are to be ignored
+---
+** To cater to use cases where comments and strings are to be ignored
 when looking for a list, the function 'list-at-point' now takes an
 optional argument to do so.
 
diff --git a/lisp/files.el b/lisp/files.el
index 448df62..fb09c96 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -802,9 +802,15 @@ The path separator is colon in GNU and GNU-like systems."
     (setq cd-path (or (parse-colon-path (getenv "CDPATH"))
                       (list "./"))))
   (cd-absolute
-   (or (locate-file dir cd-path nil
-                    (lambda (f) (and (file-directory-p f) 'dir-ok)))
-       (error "No such directory found via CDPATH environment variable"))))
+   (or
+    ;; locate-file doesn't support remote file names, so detect them
+    ;; and support them here by hand.
+    (and (file-remote-p (expand-file-name dir))
+         (file-accessible-directory-p (expand-file-name dir))
+         (expand-file-name dir))
+    (locate-file dir cd-path nil
+                 (lambda (f) (and (file-directory-p f) 'dir-ok)))
+    (error "No such directory found via CDPATH environment variable"))))
 
 (defun directory-files-recursively (dir regexp &optional include-directories)
   "Return list of all files under DIR that have file names matching REGEXP.
diff --git a/lisp/obsolete/landmark.el b/lisp/obsolete/landmark.el
index effea95..c4c4c7a 100644
--- a/lisp/obsolete/landmark.el
+++ b/lisp/obsolete/landmark.el
@@ -2,7 +2,7 @@
 
 ;; Copyright (C) 1996-1997, 2000-2018 Free Software Foundation, Inc.
 
-;; Author: Terrence Brannon (was: <address@hidden>)
+;; Author: Terrence Brannon <address@hidden>
 ;; Created: December 16, 1996 - first release to usenet
 ;; Keywords: games, neural network, adaptive search, chemotaxis
 ;; Version: 1.0
@@ -36,7 +36,7 @@
 ;; the smell of the tree increases, then the weights in the robot's
 ;; brain are adjusted to encourage this odor-driven behavior in the
 ;; future. If the smell of the tree decreases, the robots weights are
-;; adjusted to discourage a correct move.
+;; adjusted to discourage that odor-driven behavior.
 
 ;; In laymen's terms, the search space is initially flat. The point
 ;; of training is to "turn up the edges of the search space" so that
@@ -53,6 +53,13 @@
 ;; a single move, one moves east,west and south, then both east and
 ;; west will be improved when they shouldn't
 
+;; The source code was developed as part of a course on Brain Theory
+;; and Neural Networks at the University of Southern California. The
+;; original problem description and solution appeared in 1981 in the
+;; paper "Landmark Learning: An Illustration of Associative
+;; Search" authored by Andrew G. Barto and Richard S. Sutton and
+;; published to Biological Cybernetics.
+
 ;; Many thanks to Yuri Pryadkin <address@hidden> for this
 ;; concise problem description.
 
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index bee7f80..29a7a44 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -2746,7 +2746,7 @@ Return an alist of (TYPE MATCH)."
   "A widget which groups other widgets inside."
   :convert-widget 'widget-types-convert-widget
   :copy 'widget-types-copy
-  :format "%v"
+  :format ":\n%v"
   :value-create 'widget-group-value-create
   :value-get 'widget-editable-list-value-get
   :default-get 'widget-group-default-get
diff --git a/lisp/window.el b/lisp/window.el
index 4e72d34..f1e5664 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -7182,9 +7182,7 @@ that allows the selected frame)."
           (or (cdr (assq 'frame-predicate alist))
               (lambda (frame)
                 (and (not (eq frame (selected-frame)))
-                     (not (window-dedicated-p
-                           (or (get-lru-window frame)
-                               (frame-first-window frame))))))))
+                     (get-lru-window frame)))))
          (frame (car (filtered-frame-list predicate)))
          (window
           (and frame
diff --git a/src/dispnew.c b/src/dispnew.c
index b628c69..39a91e2 100644
--- a/src/dispnew.c
+++ b/src/dispnew.c
@@ -5099,13 +5099,15 @@ update_frame_line (struct frame *f, int vpos, bool 
updating_menu_p)
  ***********************************************************************/
 
 /* Determine what's under window-relative pixel position (*X, *Y).
-   Return the OBJECT (string or buffer) that's there.
+   Return the object (string or buffer) that's there.
    Return in *POS the position in that object.
    Adjust *X and *Y to character positions.
+   If an image is shown at the specified position, return
+   in *OBJECT its image-spec.
    Return in *DX and *DY the pixel coordinates of the click,
-   relative to the top left corner of OBJECT, or relative to
+   relative to the top left corner of object, or relative to
    the top left corner of the character glyph at (*X, *Y)
-   if OBJECT is nil.
+   if the object at (*X, *Y) is nil.
    Return WIDTH and HEIGHT of the object at (*X, *Y), or zero
    if the coordinates point to an empty area of the display.  */
 
diff --git a/src/nsterm.m b/src/nsterm.m
index 6c285f0..a624f62 100644
--- a/src/nsterm.m
+++ b/src/nsterm.m
@@ -3062,7 +3062,7 @@ ns_draw_fringe_bitmap (struct window *w, struct glyph_row 
*row,
   /* Work out the rectangle we will need to clear.  Because we're
      compositing rather than blitting, we need to clear the area under
      the image regardless of anything else.  */
-  if (!p->overlay_p)
+  if (p->bx >= 0 && !p->overlay_p)
     {
       clearRect = NSMakeRect (p->bx, p->by, p->nx, p->ny);
       clearRect = NSUnionRect (clearRect, imageRect);
diff --git a/src/process.c b/src/process.c
index 34045b4..e9b12b1 100644
--- a/src/process.c
+++ b/src/process.c
@@ -4607,8 +4607,8 @@ DEFUN ("accept-process-output", Faccept_process_output, 
Saccept_process_output,
        0, 4, 0,
        doc: /* Allow any pending output from subprocesses to be read by Emacs.
 It is given to their filter functions.
-Optional argument PROCESS means do not return until output has been
-received from PROCESS.
+Optional argument PROCESS means to return only after output is
+received from PROCESS or PROCESS closes the connection.
 
 Optional second argument SECONDS and third argument MILLISEC
 specify a timeout; return after that much time even if there is
@@ -4620,7 +4620,8 @@ If optional fourth argument JUST-THIS-ONE is non-nil, 
accept output
 from PROCESS only, suspending reading output from other processes.
 If JUST-THIS-ONE is an integer, don't run any timers either.
 Return non-nil if we received any output from PROCESS (or, if PROCESS
-is nil, from any process) before the timeout expired.  */)
+is nil, from any process) before the timeout expired or the
+corresponding connection was closed.  */)
   (Lisp_Object process, Lisp_Object seconds, Lisp_Object millisec,
    Lisp_Object just_this_one)
 {
@@ -6463,9 +6464,11 @@ DEFUN ("process-send-region", Fprocess_send_region, 
Sprocess_send_region,
 PROCESS may be a process, a buffer, the name of a process or buffer, or
 nil, indicating the current buffer's process.
 Called from program, takes three arguments, PROCESS, START and END.
-If the region is more than 500 characters long,
-it is sent in several bunches.  This may happen even for shorter regions.
-Output from processes can arrive in between bunches.
+If the region is larger than the input buffer of the process (the
+length of which depends on the process connection type and the
+operating system), it is sent in several bunches.  This may happen
+even for shorter regions.  Output from processes can arrive in between
+bunches.
 
 If PROCESS is a non-blocking network process that hasn't been fully
 set up yet, this function will block until socket setup has completed.  */)
@@ -6496,9 +6499,10 @@ DEFUN ("process-send-string", Fprocess_send_string, 
Sprocess_send_string,
        doc: /* Send PROCESS the contents of STRING as input.
 PROCESS may be a process, a buffer, the name of a process or buffer, or
 nil, indicating the current buffer's process.
-If STRING is more than 500 characters long,
-it is sent in several bunches.  This may happen even for shorter strings.
-Output from processes can arrive in between bunches.
+If STRING is larger than the input buffer of the process (the length
+of which depends on the process connection type and the operating
+system), it is sent in several bunches.  This may happen even for
+shorter strings.  Output from processes can arrive in between bunches.
 
 If PROCESS is a non-blocking network process that hasn't been fully
 set up yet, this function will block until socket setup has completed.  */)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]