commit bed56428a6e767d68a974f5ad81bebf035eb44f4 (HEAD, refs/remotes/origin/master) Author: Paul Eggert Date: Sun Dec 30 19:00:09 2018 -0800 Fix assertion-violations on non-integers These bugs were introduced after bignums were added. * src/data.c (cons_to_unsigned, cons_to_signed): * src/xdisp.c (calc_line_height_property): Invoke integer_to_intmax and integer_to_uintmax only on integers. diff --git a/src/data.c b/src/data.c index c64adb6635..4ea71cea5d 100644 --- a/src/data.c +++ b/src/data.c @@ -2655,7 +2655,7 @@ cons_to_unsigned (Lisp_Object c, uintmax_t max) else { Lisp_Object hi = CONSP (c) ? XCAR (c) : c; - valid = integer_to_uintmax (hi, &val); + valid = INTEGERP (hi) && integer_to_uintmax (hi, &val); if (valid && CONSP (c)) { @@ -2716,7 +2716,7 @@ cons_to_signed (Lisp_Object c, intmax_t min, intmax_t max) else { Lisp_Object hi = CONSP (c) ? XCAR (c) : c; - valid = integer_to_intmax (hi, &val); + valid = INTEGERP (hi) && integer_to_intmax (hi, &val); if (valid && CONSP (c)) { diff --git a/src/xdisp.c b/src/xdisp.c index 65a61a0120..4cb10503e6 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -27991,7 +27991,7 @@ calc_line_height_property (struct it *it, Lisp_Object val, struct font *font, /* FIXME: Check for overflow in multiplication or conversion. */ if (FLOATP (val)) height = (int)(XFLOAT_DATA (val) * height); - else + else if (INTEGERP (val)) { intmax_t v; if (integer_to_intmax (val, &v)) commit 433b6a74ec73608ff06106daee4f53c5175d5297 Merge: f23b1db37a 82c82b1c77 Author: Glenn Morris Date: Sun Dec 30 17:02:40 2018 -0800 Merge from origin/emacs-26 82c82b1 (origin/emacs-26) In user manual fix value of default frame h... 2e8825d Improve documentation of 'file-local-name' and related APIs 11f0635 ; Remove comment in esh-proc.el # Conflicts: # lisp/simple.el commit f23b1db37a816ab88a5970e67d1aaeb7f68ca47c Merge: a8e545ef6b 3c83c9ed66 Author: Glenn Morris Date: Sun Dec 30 16:57:36 2018 -0800 ; Merge from origin/emacs-26 The following commits were skipped: 3c83c9e Fix Bug#31704. Do not merge de7644d Fix Bug#31704. Do not merge commit a8e545ef6b92f6eb5916a6803a5d95256fd9eb6b Merge: 83bbb48142 3abebeb8c3 Author: Glenn Morris Date: Sun Dec 30 16:57:36 2018 -0800 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 commit 83bbb48142e5f9714408dd628d244678eff2dc11 Author: Alan Mackenzie Date: Sun Dec 30 18:38:36 2018 +0000 CC Mode - use font-lock-comment-delimiter-face on block comment end delimiters In particular when the default comment type is currently line comments. Do this by setting font-lock-comment-end-skip. * lisp/progmodes/cc-cmds.el (c-font-lock-comment-end-skip): New lang const. (font-lock-comment-end-skip): New c-lang-setvar. diff --git a/lisp/progmodes/cc-langs.el b/lisp/progmodes/cc-langs.el index 8c148e5e53..4bd4f6d634 100644 --- a/lisp/progmodes/cc-langs.el +++ b/lisp/progmodes/cc-langs.el @@ -1529,6 +1529,17 @@ properly." (c-lang-defvar c-block-comment-ender-regexp (c-lang-const c-block-comment-ender-regexp)) +(c-lang-defconst c-font-lock-comment-end-skip + ;; Regexp which matches whitespace followed by the end of a block comment + ;; (if such exists in the language). This is used by font lock to determine + ;; the portion of the end of a comment to fontify with + ;; `font-lock-comment-delimiter-face'. + t (if (c-lang-const c-block-comment-ender) + (concat "[ \t]*" (c-lang-const c-block-comment-ender-regexp)) + "a\\`")) ; Doesn't match anything. +(c-lang-setvar font-lock-comment-end-skip + (c-lang-const c-font-lock-comment-end-skip)) + (c-lang-defconst c-comment-start-regexp ;; Regexp to match the start of any type of comment. t (let ((re (c-make-keywords-re nil commit d82e73f08f8c12cfa144ff2e404a65e8bff1ab2e Author: Martin Rudalics Date: Sun Dec 30 15:47:16 2018 +0100 Handle 'unbound' like nil for 'window-point-insertion-type' (Bug#33871) * src/window.c (save_window_save): When setting the marker insertion type of saved window points treat a buffer local value of 'unbound' for 'window-point-insertion-type' like nil (Bug#33871). diff --git a/lisp/window.el b/lisp/window.el index 50aec86a42..4e72d34367 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -4278,7 +4278,7 @@ WINDOW must be a live window and defaults to the selected one." (list (copy-marker start) (copy-marker ;; Preserve window-point-insertion-type - ;; (Bug#12588). + ;; (Bug#12855). point window-point-insertion-type))))) (set-window-prev-buffers window (cons entry (window-prev-buffers window))))) @@ -6110,7 +6110,7 @@ element is BUFFER." (list 'other ;; A quadruple of WINDOW's buffer, start, point and height. (list (current-buffer) (window-start window) - ;; Preserve window-point-insertion-type (Bug#12588). + ;; Preserve window-point-insertion-type (Bug#12855). (copy-marker (window-point window) window-point-insertion-type) (if (window-combined-p window) diff --git a/src/window.c b/src/window.c index 14b3364477..a69b115e4b 100644 --- a/src/window.c +++ b/src/window.c @@ -6965,6 +6965,12 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, ptrdiff_t i) if (BUFFERP (w->contents)) { + Lisp_Object buffer_local_window_point_insertion_type + = (buffer_local_value (Qwindow_point_insertion_type, w->contents)); + bool window_point_insertion_type + = (!NILP (buffer_local_window_point_insertion_type) + && !EQ (buffer_local_window_point_insertion_type, Qunbound)); + /* Save w's value of point in the window configuration. If w is the selected window, then get the value of point from the buffer; pointm is garbage in the selected window. */ @@ -6975,12 +6981,8 @@ save_window_save (Lisp_Object window, struct Lisp_Vector *vector, ptrdiff_t i) else p->pointm = Fcopy_marker (w->pointm, Qnil); p->old_pointm = Fcopy_marker (w->old_pointm, Qnil); - XMARKER (p->pointm)->insertion_type - = !NILP (buffer_local_value /* Don't signal error if void. */ - (Qwindow_point_insertion_type, w->contents)); - XMARKER (p->old_pointm)->insertion_type - = !NILP (buffer_local_value /* Don't signal error if void. */ - (Qwindow_point_insertion_type, w->contents)); + XMARKER (p->pointm)->insertion_type = window_point_insertion_type; + XMARKER (p->old_pointm)->insertion_type = window_point_insertion_type; p->start = Fcopy_marker (w->start, Qnil); p->start_at_line_beg = w->start_at_line_beg ? Qt : Qnil; commit 82c82b1c773f441fe424b7ed1757c8eda31814c0 (refs/remotes/origin/emacs-26) Author: Martin Rudalics Date: Sun Dec 30 15:21:50 2018 +0100 In user manual fix value of default frame height (Bug#33921) * doc/emacs/cmdargs.texi (Window Size X): Fix value of default frame height (Bug#33921). diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index 2e2767ccad..76b1cdf1d8 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi @@ -1029,7 +1029,7 @@ specifies a window 164 columns wide, enough for two ordinary width windows side by side, and 55 lines tall. The default frame width is 80 characters and the default height is -40 lines. You can omit either the width or the height or both. If +36 lines. You can omit either the width or the height or both. If you start the geometry with an integer, Emacs interprets it as the width. If you start with an @samp{x} followed by an integer, Emacs interprets it as the height. Thus, @samp{81} specifies just the commit 2e8825d6c55409c15749b12dacc1f49f9c8783c7 Author: Eli Zaretskii Date: Sat Dec 29 17:34:57 2018 +0200 Improve documentation of 'file-local-name' and related APIs * doc/lispref/files.texi (Unique File Names) (Magic File Names, File Name Expansion): Improve documentation of the "local part" of a remote file name. * doc/lispref/processes.texi (Synchronous Processes) (Asynchronous Processes): State explicitly that program and file names passed to functions that start remote processes need to be relative or obtained by 'file-local-name'. * lisp/files.el (file-local-name): * lisp/simple.el (start-file-process, process-file): Improve the documentation of the "local part" of a remote file name, and its use in APIs that start remote processes. diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index c434336d5a..6364289b69 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -2519,9 +2519,9 @@ with @samp{/:}. @defmac file-name-quote name This macro adds the quotation prefix @samp{/:} to the file @var{name}. For a local file @var{name}, it prefixes @var{name} with @samp{/:}. -If @var{name} is a remote file name, the local part of @var{name} is -quoted. If @var{name} is already a quoted file name, @var{name} is -returned unchanged. +If @var{name} is a remote file name, the local part of @var{name} +(@pxref{Magic File Names}) is quoted. If @var{name} is already a +quoted file name, @var{name} is returned unchanged. @example @group @@ -2700,8 +2700,8 @@ that remote host. If such a directory does not exist, or @code{temporary-file-directory} is returned. @end defun -In order to extract the local part of the path name from a temporary -file, @code{file-local-name} could be used. +In order to extract the local part of the file's name of a temporary +file, use @code{file-local-name} (@pxref{Magic File Names}). @node File Name Completion @subsection File Name Completion @@ -3382,11 +3382,24 @@ non-magic directory to serve as its current directory, and this function is a good way to come up with one. @end defun +@cindex local part of remote file name @defun file-local-name filename -This function returns the local part of file @var{filename}. For a -remote @var{filename}, it returns a file name which could be used -directly as argument of a remote process. If @var{filename} is local, -this function returns the file name. +This function returns the @dfn{local part} of @var{filename}. This is +the part of the file's name that identifies it on the remote host, and +is typically obtained by removing from the remote file name the parts +that specify the remote host and the method of accessing it. For +example: + +@smallexample +(file-local-name "/ssh:@var{user}@@@var{host}:/foo/bar") + @result{} "/foo/bar" +@end smallexample + +For a remote @var{filename}, this function returns a file name which +could be used directly as an argument of a remote process +(@pxref{Asynchronous Processes}, and @pxref{Synchronous Processes}), +and as the program to run on the remote host. If @var{filename} is +local, this function returns it unchanged. @end defun @defopt remote-file-name-inhibit-cache diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 2aca7f82a1..f2b3a9c096 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -451,7 +451,9 @@ present in @var{args}. To avoid confusion, it may be best to avoid absolute file names in @var{args}, but rather to specify all file names as relative to @code{default-directory}. The function @code{file-relative-name} is useful for constructing such relative -file names. +file names. Alternatively, you can use @code{file-local-name} +(@pxref{Magic File Names}) to obtain an absolute file name as seen +from the remote host's perspective. @end defun @defvar process-file-side-effects @@ -817,7 +819,12 @@ In the latter case, the local part of @code{default-directory} becomes the working directory of the process. This function does not try to invoke file name handlers for -@var{program} or for the rest of @var{args}. +@var{program} or for the rest of @var{args}. For that reason, if +@var{program} or any of @var{args} use the remote-file syntax +(@pxref{Magic File Names}), they must be converted either to file +names relative to @code{default-directory}, or to names that identify +the files locally on the remote host, by running them through +@code{file-local-name}. Depending on the implementation of the file handler, it might not be possible to apply @code{process-filter} or @code{process-sentinel} to diff --git a/lisp/files.el b/lisp/files.el index 7794f398cf..e9d40f22f1 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -1150,7 +1150,10 @@ consecutive checks. For example: (defun file-local-name (file) "Return the local name component of FILE. -It returns a file name which can be used directly as argument of +This function removes from FILE the specification of the remote host +and the method of accessing the host, leaving only the part that +identifies FILE locally on the remote system. +The returned file name can be used directly as argument of `process-file', `start-file-process', or `shell-command'." (or (file-remote-p file 'localname) file)) diff --git a/lisp/simple.el b/lisp/simple.el index 2116facd58..8671fb9174 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3866,11 +3866,14 @@ interactively, this is t." (process-file shell-file-name nil t nil shell-command-switch command)))) (defun process-file (program &optional infile buffer display &rest args) - "Process files synchronously in a separate process. + "Process files synchronously in a separate process that runs PROGRAM. Similar to `call-process', but may invoke a file handler based on `default-directory'. The current working directory of the subprocess is `default-directory'. +If PROGRAM is a remote file name, it should be processed +by `file-local-name' before passing it to this function. + File names in INFILE and BUFFER are handled normally, but file names in ARGS should be relative to `default-directory', as they are passed to the process verbatim. (This is a difference to @@ -3915,12 +3918,15 @@ Similar to `start-process', but may invoke a file handler based on This handler ought to run PROGRAM, perhaps on the local host, perhaps on a remote host that corresponds to `default-directory'. -In the latter case, the local part of `default-directory' becomes -the working directory of the process. +In the latter case, the local part of `default-directory', the one +produced from it by `file-local-name', becomes the working directory +of the process on the remote host. PROGRAM and PROGRAM-ARGS might be file names. They are not -objects of file handler invocation. File handlers might not -support pty association, if PROGRAM is nil." +objects of file handler invocation, so they need to be obtained +by calling `file-local-name', in case they are remote file names. + +File handlers might not support pty association, if PROGRAM is nil." (let ((fh (find-file-name-handler default-directory 'start-file-process))) (if fh (apply fh 'start-file-process name buffer program program-args) (apply 'start-process name buffer program program-args)))) commit 11f0635c199c97762b461e963a28eff7fc9aea97 Author: Michael Albinus Date: Sat Dec 29 11:57:25 2018 +0100 ; Remove comment in esh-proc.el diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index ee74762193..97170eb04b 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -279,7 +279,6 @@ See `eshell-needs-pipe'." (let ((process-connection-type (unless (eshell-needs-pipe-p command) process-connection-type)) - ;; `start-process' can't deal with relative filenames. (command (file-local-name (expand-file-name command)))) (apply 'start-file-process (file-name-nondirectory command) nil command args))) commit 3c83c9ed66e4989e7633bc3da48ae4b2de81166d Author: Michael Albinus Date: Sat Dec 29 11:52:56 2018 +0100 Fix Bug#31704. Do not merge * lisp/net/tramp.el (tramp-eshell-directory-change): Use `path-separator' as it does eshell. (Bug#31704) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index aa125cde6d..5302659b32 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -4580,6 +4580,7 @@ Only works for Bourne-like shells." (or ;; When `tramp-own-remote-path' is in `tramp-remote-path', ;; the remote path is only set in the session cache. + ;; Use `path-separator' as it does eshell. (tramp-get-connection-property (tramp-get-connection-process v) "remote-path" nil) (tramp-get-connection-property v "remote-path" nil)) commit de7644d8d8b09fc294fe36ed2162c78a494beccb Author: Michael Albinus Date: Thu Sep 6 12:16:00 2018 +0200 Fix Bug#31704. Do not merge * lisp/eshell/esh-proc.el (eshell-gather-process-output): Do not let `expand-file-name' prefix remote file names with MS Windows volume letter. * lisp/net/tramp.el (tramp-eshell-directory-change): Use `path-separator' as it does eshell. (Bug#31704) diff --git a/lisp/eshell/esh-proc.el b/lisp/eshell/esh-proc.el index 94401c5daa..ee74762193 100644 --- a/lisp/eshell/esh-proc.el +++ b/lisp/eshell/esh-proc.el @@ -279,11 +279,10 @@ See `eshell-needs-pipe'." (let ((process-connection-type (unless (eshell-needs-pipe-p command) process-connection-type)) - (command (file-local-name command))) + ;; `start-process' can't deal with relative filenames. + (command (file-local-name (expand-file-name command)))) (apply 'start-file-process - (file-name-nondirectory command) nil - ;; `start-process' can't deal with relative filenames. - (append (list (expand-file-name command)) args)))) + (file-name-nondirectory command) nil command args))) (eshell-record-process-object proc) (set-process-buffer proc (current-buffer)) (if (eshell-interactive-output-p) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 5fa9f9a44d..aa125cde6d 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -4583,7 +4583,7 @@ Only works for Bourne-like shells." (tramp-get-connection-property (tramp-get-connection-process v) "remote-path" nil) (tramp-get-connection-property v "remote-path" nil)) - ":")) + path-separator)) (getenv "PATH")))) (eval-after-load "esh-util" commit 3abebeb8c3047092763f2d4a61fe7dfc659cd1bf Author: Eli Zaretskii Date: Sat Dec 29 11:47:40 2018 +0200 * lisp/files.el (cd): Fix last change. (Bug#33791) diff --git a/lisp/files.el b/lisp/files.el index 0b82c94334..7794f398cf 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -805,7 +805,6 @@ The path separator is colon in GNU and GNU-like systems." ;; 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-name-absolute-p (expand-file-name dir)) (file-accessible-directory-p (expand-file-name dir)) (expand-file-name dir)) (locate-file dir cd-path nil commit 7a60a4f449da800e624cac67d590cd128820aae2 Author: Eli Zaretskii Date: Sat Dec 29 10:15:50 2018 +0200 Fix remote directories in Eshell on MS-Windows * lisp/files.el (cd): Support remote directory names on MS-Windows. (Bug#33791) diff --git a/lisp/files.el b/lisp/files.el index eb09a7c83f..0b82c94334 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -801,9 +801,16 @@ 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-name-absolute-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. commit 822a2d039f7f411e1e41160b163cf24752aea971 Author: Drew Adams Date: Mon Dec 3 12:49:39 2018 -0800 Fix :type 'group' in defcustom * lisp/wid-edit.el (group): Fix the :format spec. (Bug#33566) diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index bee7f8069e..29a7a44f2a 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 commit a731c563a1cbb425e143bd0c60905f8aebc4ca1a Author: Alan Third Date: Thu Dec 27 16:23:32 2018 +0000 Fix NS fringe bitmap drawing bug (bug#33864) * src/nsterm.m (ns_draw_fringe_bitmap): Check the rectangle to clear correctly. diff --git a/src/nsterm.m b/src/nsterm.m index 893bb1b441..98a333d53a 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -2919,7 +2919,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); commit 0c524597b31ae3a948b4fa70014cd3a56fe1fd79 Author: Eli Zaretskii Date: Fri Dec 28 16:28:51 2018 +0200 Fix commentary in dispnew.c * src/dispnew.c (buffer_posn_from_coords): Fix inaccuracies in the commentary. diff --git a/src/dispnew.c b/src/dispnew.c index d3a31967ae..dc5fb31485 100644 --- a/src/dispnew.c +++ b/src/dispnew.c @@ -5097,13 +5097,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. */ commit c9fdd1b4965ebd02aa408f878320c4955f5e2cc7 Author: Paul Eggert Date: Thu Dec 27 12:52:45 2018 -0800 Improve accept-process-process doc * doc/lispref/processes.texi (Accepting Output): * src/process.c (Faccept_process_output): Document that (accept-process-output P) can return non-nil even after P has exited, and that it can return nil even if P is still running (Bug#33839). diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 623be09cc6..2aca7f82a1 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -1795,7 +1795,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 @@ -1820,7 +1821,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 diff --git a/src/process.c b/src/process.c index e306b2ae9e..4dafee8cbe 100644 --- a/src/process.c +++ b/src/process.c @@ -4581,8 +4581,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 @@ -4594,7 +4594,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) { commit 9578c2aa2201642e6846b0d09c14e72bc3225d09 Author: Stephen Leake Date: Sun Dec 23 10:23:26 2018 -0800 Fix a simple bug in display-buffer-use-some-frame * lisp/window.el (display-buffer-use-some-frame): Simplify the predicate, fix TYPE arg to window--display-buffer. diff --git a/lisp/window.el b/lisp/window.el index f252b0e041..d40e6c5c81 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -7114,9 +7114,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 @@ -7125,7 +7123,7 @@ that allows the selected frame)." (when window (prog1 (window--display-buffer - buffer window 'frame alist display-buffer-mark-dedicated) + buffer window 'reuse alist display-buffer-mark-dedicated) (unless (cdr (assq 'inhibit-switch-frame alist)) (window--maybe-raise-frame frame)))))) commit 0f9be72701b5cf03a5b1162c4bce2776a5d2ba81 Author: Michael Albinus Date: Sun Dec 23 09:04:37 2018 +0100 Clarify thread switching while waiting for process output * doc/lispref/threads.texi (Threads): Clarify, that thread switching happens when waiting for process output from asynchronous processes. diff --git a/doc/lispref/threads.texi b/doc/lispref/threads.texi index ddeb2e923f..69f89c32bf 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 -@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 commit 24ddea074a2e61f7accde60cdf941ba67b1ce82a Author: Charles A. Roelli Date: Sat Dec 22 17:14:36 2018 +0100 Improve process doc. with respect to handling of large input (Bug#33191) * src/process.c (Fprocess_send_region, Fprocess_send_string): Document that process input longer than the process input buffer may be split into bunches. Remove an outdated reference to a 500 character split boundary. * doc/lispref/processes.texi (Asynchronous Processes): Remove mention of "stray character injections" in PTY processes. See also the comment about ICANON in src/sysdep.c, function child_setup_tty. diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index e7d61bd5fa..623be09cc6 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -604,10 +604,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 diff --git a/src/process.c b/src/process.c index b0a327229c..e306b2ae9e 100644 --- a/src/process.c +++ b/src/process.c @@ -6456,9 +6456,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. */) @@ -6489,9 +6491,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. */) commit 29310168310e807d289e789a1134df95c366d133 Author: Michael Albinus Date: Sat Dec 22 14:18:59 2018 +0100 ; Cosmetic changes in etc/NEWS diff --git a/etc/NEWS b/etc/NEWS index 043573e3fc..55bdaf1117 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -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. commit 85516b8cc8a6c5767ab29917556f5b30b4482b73 Author: Terrence Brannon Date: Fri Dec 7 22:02:54 2018 +0000 Minor copyedits in landmark.el * lisp/obsolete/landmark.el: Fix author's email and commentary. diff --git a/lisp/obsolete/landmark.el b/lisp/obsolete/landmark.el index effea95cd8..c4c4c7a20f 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: ) +;; Author: Terrence Brannon ;; 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 for this ;; concise problem description.