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
This commit is contained in:
Glenn Morris 2018-12-30 16:57:36 -08:00
commit a8e545ef6b
10 changed files with 53 additions and 32 deletions

View file

@ -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
non-@code{nil} 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 non-@code{nil} if it
got output from @var{process}, or from any process if @var{process} is
@code{nil}. It returns @code{nil} if the timeout expired before output
@code{nil}; this can occur even after a process has exited if the
corresponding connection contains buffered data. The function returns
@code{nil} if the timeout expired or the connection was closed before output
arrived.
@end defun

View file

@ -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
@code{thread-join}.
output from asynchronous processes (e.g., during
@code{accept-process-output}), 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

View file

@ -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.

View file

@ -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.

View file

@ -2,7 +2,7 @@
;; Copyright (C) 1996-1997, 2000-2018 Free Software Foundation, Inc.
;; Author: Terrence Brannon (was: <brannon@rana.usc.edu>)
;; Author: Terrence Brannon <metaperl@gmail.com>
;; 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 <yuri@rana.usc.edu> for this
;; concise problem description.

View file

@ -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

View file

@ -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

View file

@ -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. */

View file

@ -3062,7 +3062,7 @@ so some key presses (TAB) are swallowed by the system. */
/* 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);

View file

@ -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. */)