From c97a5f1f44a6ae3eb7729d32aa53c9b27e899716 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Tue, 23 Oct 2018 21:46:01 -0400 Subject: [PATCH 01/19] * doc/misc/calc.texi (Summary): The +/- key is 'p', not 'P'. --- doc/misc/calc.texi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/misc/calc.texi b/doc/misc/calc.texi index fdec65a9a7..28dadc94c0 100644 --- a/doc/misc/calc.texi +++ b/doc/misc/calc.texi @@ -35832,7 +35832,7 @@ keystrokes are not listed in this summary. @r{ @: _ @:number @: @:-@:number} @r{ @: e @:number @: @:@:1e number} @r{ @: # @:number @: @:@:current-radix@tfn{#}number} -@r{ @: P @:(in number) @: @:+/-@:} +@r{ @: p @:(in number) @: @:+/-@:} @r{ @: M @:(in number) @: @:mod@:} @r{ @: @@ ' " @: (in number)@: @:@:HMS form} @r{ @: h m s @: (in number)@: @:@:HMS form} From d72975a654e5effe86625126ba7f2923c8e2f9d2 Mon Sep 17 00:00:00 2001 From: Katsumi Yamaoka Date: Wed, 24 Oct 2018 10:09:51 +0000 Subject: [PATCH 02/19] * lisp/gnus/mm-util.el (mm-decompress-buffer): Fix split-string args. --- lisp/gnus/mm-util.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/gnus/mm-util.el b/lisp/gnus/mm-util.el index fcd97f2b27..91c5f0e907 100644 --- a/lisp/gnus/mm-util.el +++ b/lisp/gnus/mm-util.el @@ -843,7 +843,8 @@ decompressed data. The buffer's multibyteness must be turned off." (prog2 (insert-file-contents err-file) (buffer-string) - (erase-buffer)) t) + (erase-buffer)) + nil t) " ") "\n") (setq err-msg From 7e8eee60a9dbb0c59cf26f237b21efe7fd1043c9 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Sun, 14 Oct 2018 19:12:00 +0100 Subject: [PATCH 03/19] Fix some NS drawing issues (bug#32932) * src/nsterm.m (ns_clip_to_rect): (ns_reset_clipping): Remove gsaved variable and associated code. (ns_flush_display): Remove function. (ns_copy_bits): use translateRectsNeedingDisplayInRect:by: to copy any pending drawing actions along with the image. ([EmacsView windowWillResize:toSize:]): Remove unneeded call. ([EmacsView drawRect:]): Remove redundant call to ns_clear_frame_area, and optimize the exposed rectangles. (ns_draw_window_cursor): Remove unneeded disabling of screen updates. --- src/nsterm.m | 80 ++++++++++++++++++++++++---------------------------- 1 file changed, 37 insertions(+), 43 deletions(-) diff --git a/src/nsterm.m b/src/nsterm.m index 8c355a89f8..4b5d025ee3 100644 --- a/src/nsterm.m +++ b/src/nsterm.m @@ -277,7 +277,6 @@ long context_menu_value = 0; /* display update */ static int ns_window_num = 0; -static BOOL gsaved = NO; static BOOL ns_fake_keydown = NO; #ifdef NS_IMPL_COCOA static BOOL ns_menu_bar_is_hidden = NO; @@ -1180,7 +1179,6 @@ ns_clip_to_rect (struct frame *f, NSRect *r, int n) NSRectClipList (r, 2); else NSRectClip (*r); - gsaved = YES; return YES; } @@ -1204,11 +1202,7 @@ ns_reset_clipping (struct frame *f) { NSTRACE_WHEN (NSTRACE_GROUP_FOCUS, "ns_reset_clipping"); - if (gsaved) - { - [[NSGraphicsContext currentContext] restoreGraphicsState]; - gsaved = NO; - } + [[NSGraphicsContext currentContext] restoreGraphicsState]; } @@ -1234,19 +1228,6 @@ ns_clip_to_row (struct window *w, struct glyph_row *row, return ns_clip_to_rect (f, &clip_rect, 1); } - -static void -ns_flush_display (struct frame *f) -/* Force the frame to redisplay. If areas have previously been marked - dirty by setNeedsDisplayInRect (in ns_clip_to_rect), then this will call - draw_rect: which will "expose" those areas. */ -{ - block_input (); - [FRAME_NS_VIEW (f) displayIfNeeded]; - unblock_input (); -} - - /* ========================================================================== Visible bell and beep. @@ -2710,6 +2691,8 @@ ns_clear_frame_area (struct frame *f, int x, int y, int width, int height) static void ns_copy_bits (struct frame *f, NSRect src, NSRect dest) { + NSSize delta = NSMakeSize (dest.origin.x - src.origin.x, + dest.origin.y - src.origin.y) NSTRACE ("ns_copy_bits"); if (FRAME_NS_VIEW (f)) @@ -2718,10 +2701,21 @@ ns_copy_bits (struct frame *f, NSRect src, NSRect dest) /* FIXME: scrollRect:by: is deprecated in macOS 10.14. There is no obvious replacement so we may have to come up with our own. */ - [FRAME_NS_VIEW (f) scrollRect: src - by: NSMakeSize (dest.origin.x - src.origin.x, - dest.origin.y - src.origin.y)]; - [FRAME_NS_VIEW (f) setNeedsDisplay:YES]; + [FRAME_NS_VIEW (f) scrollRect: src by: delta]; + +#ifdef NS_IMPL_COCOA + /* As far as I can tell from the documentation, scrollRect:by:, + above, should copy the dirty rectangles from our source + rectangle to our destination, however it appears it clips the + operation to src. As a result we need to use + translateRectsNeedingDisplayInRect:by: below, and we have to + union src and dest so it can pick up the dirty rectangles, + and place them, as it also clips to the rectangle. + + FIXME: We need a GNUstep equivalent. */ + [FRAME_NS_VIEW (f) translateRectsNeedingDisplayInRect:NSUnionRect (src, dest) + by:delta]; +#endif } } @@ -3106,15 +3100,6 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, else [FRAME_CURSOR_COLOR (f) set]; -#ifdef NS_IMPL_COCOA - /* TODO: This makes drawing of cursor plus that of phys_cursor_glyph - atomic. Cleaner ways of doing this should be investigated. - One way would be to set a global variable DRAWING_CURSOR - when making the call to draw_phys..(), don't focus in that - case, then move the ns_reset_clipping() here after that call. */ - NSDisableScreenUpdates (); -#endif - switch (cursor_type) { case DEFAULT_CURSOR: @@ -3148,10 +3133,6 @@ ns_draw_window_cursor (struct window *w, struct glyph_row *glyph_row, /* draw the character under the cursor */ if (cursor_type != NO_CURSOR) draw_phys_cursor_glyph (w, glyph_row, DRAW_CURSOR); - -#ifdef NS_IMPL_COCOA - NSEnableScreenUpdates (); -#endif } } @@ -4977,7 +4958,7 @@ static struct redisplay_interface ns_redisplay_interface = ns_after_update_window_line, ns_update_window_begin, ns_update_window_end, - ns_flush_display, /* flush_display */ + 0, /* flush_display */ x_clear_window_mouse_face, x_get_glyph_overhangs, x_fix_overlapping_area, @@ -7046,7 +7027,6 @@ not_in_argv (NSString *arg) size_title = xmalloc (strlen (old_title) + 40); esprintf (size_title, "%s — (%d x %d)", old_title, cols, rows); [window setTitle: [NSString stringWithUTF8String: size_title]]; - [window display]; xfree (size_title); } } @@ -8095,8 +8075,8 @@ not_in_argv (NSString *arg) - (void)drawRect: (NSRect)rect { - int x = NSMinX (rect), y = NSMinY (rect); - int width = NSWidth (rect), height = NSHeight (rect); + const NSRect *rectList; + NSInteger numRects; NSTRACE ("[EmacsView drawRect:" NSTRACE_FMT_RECT "]", NSTRACE_ARG_RECT(rect)); @@ -8104,9 +8084,23 @@ not_in_argv (NSString *arg) if (!emacsframe || !emacsframe->output_data.ns) return; - ns_clear_frame_area (emacsframe, x, y, width, height); block_input (); - expose_frame (emacsframe, x, y, width, height); + + /* Get only the precise dirty rectangles to avoid redrawing + potentially large areas of the frame that haven't changed. + + I'm not sure this actually provides much of a performance benefit + as it's hard to benchmark, but it certainly doesn't seem to + hurt. */ + [self getRectsBeingDrawn:&rectList count:&numRects]; + for (int i = 0 ; i < numRects ; i++) + { + NSRect r = rectList[i]; + expose_frame (emacsframe, + NSMinX (r), NSMinY (r), + NSWidth (r), NSHeight (r)); + } + unblock_input (); /* From 71a2d509f9d2350c6aacfeed24e1e9d8c7fdfebe Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Thu, 25 Oct 2018 10:55:53 +0200 Subject: [PATCH 04/19] Fix minibuffer-help-form for lexical binding * lisp/simple.el (set-variable): Substitute var into minibuffer-help-form. * lisp/cus-edit.el (custom-prompt-variable): Likewise. --- lisp/cus-edit.el | 2 +- lisp/simple.el | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 3ede483dad..33efdd9253 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el @@ -917,7 +917,7 @@ the current value of the variable, otherwise `symbol-value' is used. If optional COMMENT argument is non-nil, also prompt for a comment and return it as the third element in the list." (let* ((var (read-variable prompt-var)) - (minibuffer-help-form '(describe-variable var)) + (minibuffer-help-form `(describe-variable ',var)) (val (let ((prop (get var 'variable-interactive)) (type (get var 'custom-type)) diff --git a/lisp/simple.el b/lisp/simple.el index 8bbafe49d3..ba39a49a44 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -7930,7 +7930,7 @@ With a prefix argument, set VARIABLE to VALUE buffer-locally." (read-variable (format "Set variable (default %s): " default-var) default-var) (read-variable "Set variable: "))) - (minibuffer-help-form '(describe-variable var)) + (minibuffer-help-form `(describe-variable ',var)) (prop (get var 'variable-interactive)) (obsolete (car (get var 'byte-obsolete-variable))) (prompt (format "Set %s %s to value: " var From f3d01d465398afee11c584a559c6842f575f5a03 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Thu, 25 Oct 2018 17:57:34 +0300 Subject: [PATCH 05/19] Avoid infloop in CPerl mode fontification * lisp/progmodes/cperl-mode.el (cperl-font-lock-fontify-region-function): Stop the loop at EOB, to avoid inflooping there. (Bug#33114) --- lisp/progmodes/cperl-mode.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/progmodes/cperl-mode.el b/lisp/progmodes/cperl-mode.el index 6dbdba75de..b152b9c724 100644 --- a/lisp/progmodes/cperl-mode.el +++ b/lisp/progmodes/cperl-mode.el @@ -8884,7 +8884,7 @@ do extra unwind via `cperl-unwind-to-safe'." (goto-char new-beg))) (setq beg (point)) (goto-char end) - (while (and end + (while (and end (< end (point-max)) (progn (or (bolp) (condition-case nil (forward-line 1) From f5f95838bdac9a88ccc00886c6d59d9d5ac73647 Mon Sep 17 00:00:00 2001 From: Alan Third Date: Wed, 24 Oct 2018 12:15:16 +0100 Subject: [PATCH 06/19] Improve XPM load failure message (bug#33126) * src/image.c (xpm_load_image): Only XPM3 is supported, so make that explicit. --- etc/PROBLEMS | 7 +++++++ src/image.c | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/etc/PROBLEMS b/etc/PROBLEMS index 7dfafe04de..29f87e2eaf 100644 --- a/etc/PROBLEMS +++ b/etc/PROBLEMS @@ -2616,6 +2616,13 @@ please call support for your X-server and see if you can get a fix. If you do, please send it to bug-gnu-emacs@gnu.org so we can list it here. +* Runtime problems specific to macOS + +** macOS doesn't come with libxpm, so only XPM3 is supported. + +Libxpm is available for macOS as part of the XQuartz project. + + * Build-time problems ** Configuration diff --git a/src/image.c b/src/image.c index 767979e63b..a6b2d9060b 100644 --- a/src/image.c +++ b/src/image.c @@ -4308,7 +4308,7 @@ xpm_load_image (struct frame *f, return 1; failure: - image_error ("Invalid XPM file (%s)", img->spec); + image_error ("Invalid XPM3 file (%s)", img->spec); x_destroy_x_image (ximg); x_destroy_x_image (mask_img); x_clear_image (f, img); From 6ca71ceb687d238f6bdfd483e32b5c6d54bf6d1a Mon Sep 17 00:00:00 2001 From: "Charles A. Roelli" Date: Thu, 25 Oct 2018 20:40:49 +0200 Subject: [PATCH 07/19] ; * lisp/help.el (with-help-window): Remove extra space in doc. --- lisp/help.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/help.el b/lisp/help.el index 77e3284831..f496214394 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -1377,7 +1377,7 @@ puts the buffer specified by BUFFER-OR-NAME in `help-mode' and displays a message about how to delete the help window when it's no longer needed. The help window will be selected if `help-window-select' is non-nil. -Most of this is done by `help-window-setup', which see." +Most of this is done by `help-window-setup', which see." (declare (indent 1) (debug t)) `(progn ;; Make `help-window-point-marker' point nowhere. The only place From c3adbc88a00f2c8fa773d46bfcf4571c9ebde8fb Mon Sep 17 00:00:00 2001 From: "Charles A. Roelli" Date: Thu, 25 Oct 2018 21:01:53 +0200 Subject: [PATCH 08/19] Improve 'isearch-delete-char' documentation (Bug#32990) * doc/emacs/search.texi (Basic Isearch): Index 'isearch-delete-char', its keybinding and the isearch "input item" concept, and define the latter. (Error in Isearch): Clarify the different uses of DEL and C-M-w during isearch. * lisp/isearch.el (isearch-delete-char): Correct its documentation and link to the Info node '(emacs)Basic Isearch' which explains less technically how this function works in everyday usage. --- doc/emacs/search.texi | 33 +++++++++++++++++++++------------ lisp/isearch.el | 13 ++++++++----- 2 files changed, 29 insertions(+), 17 deletions(-) diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index 053603e54f..58a76580d7 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -99,10 +99,18 @@ text that matches the search string---using the @code{isearch} face that customize this highlighting. The current search string is also displayed in the echo area. - If you make a mistake typing the search string, type @key{DEL}. -Each @key{DEL} cancels the last character of the search string. -@xref{Error in Isearch}, for more about dealing with unsuccessful -search. +@cindex isearch input item +@cindex input item, isearch +@findex isearch-delete-char +@kindex DEL @r{(Incremental search)} + If you make a mistake typing the search string, type @key{DEL} +(@code{isearch-delete-char}). Each @key{DEL} cancels the last input +item entered during the search. Emacs records a new @dfn{input item} +whenever you type a command that changes the search string, the +position of point, the success or failure of the search, the direction +of the search, the position of the other end of the current search +result, or the ``wrappedness'' of the search. @xref{Error in +Isearch}, for more about dealing with unsuccessful search. @cindex exit incremental search @cindex incremental search, exiting @@ -283,14 +291,15 @@ string that failed to match is highlighted using the face @code{isearch-fail}. At this point, there are several things you can do. If your string -was mistyped, you can use @key{DEL} to erase some of it and correct -it, or you can type @kbd{M-e} and edit it. If you like the place you -have found, you can type @key{RET} to remain there. Or you can type -@kbd{C-g}, which removes from the search string the characters that -could not be found (the @samp{T} in @samp{FOOT}), leaving those that -were found (the @samp{FOO} in @samp{FOOT}). A second @kbd{C-g} at -that point cancels the search entirely, returning point to where it -was when the search started. +was mistyped, use @key{DEL} to cancel a previous input item +(@pxref{Basic Isearch}), @kbd{C-M-w} to erase one character at a time, +or @kbd{M-e} to edit it. If you like the place you have found, you +can type @key{RET} to remain there. Or you can type @kbd{C-g}, which +removes from the search string the characters that could not be found +(the @samp{T} in @samp{FOOT}), leaving those that were found (the +@samp{FOO} in @samp{FOOT}). A second @kbd{C-g} at that point cancels +the search entirely, returning point to where it was when the search +started. @cindex quitting (in search) @kindex C-g @r{(Incremental search)} diff --git a/lisp/isearch.el b/lisp/isearch.el index 31571e11cd..b180e63d8e 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -1956,11 +1956,14 @@ and reads its face argument using `hi-lock-read-face-name'." (defun isearch-delete-char () - "Discard last input item and move point back. -Last input means the last character or the last isearch command -that added or deleted characters from the search string, -moved point, toggled regexp mode or case-sensitivity, etc. -If no previous match was done, just beep." + "Undo last input item during a search. + +An input item is the result of a command that pushes a new state +of isearch (as recorded by the `isearch--state' structure) to +`isearch-cmds'. Info node `(emacs)Basic Isearch' explains when +Emacs records a new input item. + +If no input items have been entered yet, just beep." (interactive) (if (null (cdr isearch-cmds)) (ding) From 92de44fa1fdeda74a9b8254f968829df4c957da0 Mon Sep 17 00:00:00 2001 From: Noam Postavsky Date: Sat, 17 Mar 2018 21:14:11 -0400 Subject: [PATCH 09/19] Don't error when indenting malformed Lisp (Bug#30891) * lisp/emacs-lisp/lisp-mode.el (lisp-indent-calc-next): If we run out of indent stack, reset the parse state. --- lisp/emacs-lisp/lisp-mode.el | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lisp/emacs-lisp/lisp-mode.el b/lisp/emacs-lisp/lisp-mode.el index 205c810b97..13ad06e4ae 100644 --- a/lisp/emacs-lisp/lisp-mode.el +++ b/lisp/emacs-lisp/lisp-mode.el @@ -827,6 +827,10 @@ by more than one line to cross a string literal." (prog1 (let (indent) (cond ((= (forward-line 1) 1) nil) + ;; Negative depth, probably some kind of syntax error. + ((null indent-stack) + ;; Reset state. + (setq ppss (parse-partial-sexp (point) (point)))) ((car indent-stack)) ((integerp (setq indent (calculate-lisp-indent ppss))) (setf (car indent-stack) indent)) From 8361292fec233ac59a04743bddff6b89a3460f65 Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 27 Oct 2018 09:21:53 +0200 Subject: [PATCH 10/19] ; Fix sorting in admin/MAINTAINERS --- admin/MAINTAINERS | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/MAINTAINERS b/admin/MAINTAINERS index 1a4157ac53..cbf84d55df 100644 --- a/admin/MAINTAINERS +++ b/admin/MAINTAINERS @@ -210,8 +210,8 @@ Paul Eggert Michael Albinus src/inotify.c lisp/autorevert.el - lisp/files.el (file-name-non-special) lisp/eshell/em-tramp.el + lisp/files.el (file-name-non-special) lisp/net/ange-ftp.el lisp/notifications.el lisp/shadowfile.el From 13132b39932af0139451b9cd77a313c7a023b18e Mon Sep 17 00:00:00 2001 From: Michael Albinus Date: Sat, 27 Oct 2018 09:22:18 +0200 Subject: [PATCH 11/19] * lisp/net/tramp-sh.el (tramp-inline-compress-commands): Suppress warnings about obsolete environment variable GZIP. --- lisp/net/tramp-sh.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 3f83697c6b..c304fcb7aa 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4436,7 +4436,8 @@ means discard it)." (if (stringp output) (concat " >" output) "")))) (defconst tramp-inline-compress-commands - '(("gzip" "gzip -d") + '(;; Suppress warnings about obsolete environment variable GZIP. + ("env GZIP= gzip" "env GZIP= gzip -d") ("bzip2" "bzip2 -d") ("xz" "xz -d") ("compress" "compress -d")) From fc2e65ae82d70bb343a7f8b3165f238c13c4e587 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 27 Oct 2018 11:24:53 +0300 Subject: [PATCH 12/19] Improve documentation of X resource loading * doc/emacs/cmdargs.texi (Initial Options): * doc/emacs/frames.texi (Frame Parameters): * doc/emacs/xresources.texi (Resources): Document the '--no-x-resources' command-line option and the fact that X resources override .emacs settings of frame parameters. (Bug#32975) --- doc/emacs/cmdargs.texi | 14 ++++++++++---- doc/emacs/frames.texi | 4 ++++ doc/emacs/xresources.texi | 5 +++++ 3 files changed, 19 insertions(+), 4 deletions(-) diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index 733919a374..f0dd9fffa8 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi @@ -323,14 +323,20 @@ Do not display a startup screen. You can also achieve this effect by setting the variable @code{inhibit-startup-screen} to non-@code{nil} in your initialization file (@pxref{Entering Emacs}). +@item --no-x-resources +@opindex --no-x-resources +@cindex X resources, not loading +Do not load X resources. You can also achieve this effect by setting +the variable @code{inhibit-x-resources} to @code{t} in your +initialization file (@pxref{Resources}). + @item -Q @opindex -Q @itemx --quick @opindex --quick -Start Emacs with minimum customizations. This is similar to using @samp{-q}, -@samp{--no-site-file}, @samp{--no-site-lisp}, and @samp{--no-splash} -together. This also stops Emacs from processing X resources by -setting @code{inhibit-x-resources} to @code{t} (@pxref{Resources}). +Start Emacs with minimum customizations. This is similar to using +@samp{-q}, @samp{--no-site-file}, @samp{--no-site-lisp}, +@samp{--no-x-resources}, and @samp{--no-splash} together.. @item -daemon @opindex -daemon diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 9f4c7821e9..6bbaae24b1 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -934,6 +934,10 @@ the initial frame, by customizing the variable specify colors and fonts don't affect menus and the menu bar, since those are drawn by the toolkit and not directly by Emacs. + Frame appearance and behavior can also be customized through X +resources (@pxref{X Resources}); these override the parameters of the +initial frame specified in your init file. + Note that if you are using the desktop library to save and restore your sessions, the frames to be restored are recorded in the desktop file, together with their parameters. When these frames are restored, diff --git a/doc/emacs/xresources.texi b/doc/emacs/xresources.texi index db2c6ffafd..903090f51a 100644 --- a/doc/emacs/xresources.texi +++ b/doc/emacs/xresources.texi @@ -46,6 +46,11 @@ this file do not take effect immediately, because the X server stores its own list of resources; to update it, use the command @command{xrdb}---for instance, @samp{xrdb ~/.Xdefaults}. + Settings specified via X resources in general override the +equivalent settings in Emacs init files (@pxref{Init File}), in +particular for parameters of the initial frame (@pxref{Frame +Parameters}). + @cindex registry, setting resources (MS-Windows) (MS-Windows systems do not support X resource files; on such systems, Emacs looks for X resources in the Windows Registry, first under the From 53ae90f4930f20f1dbe7e1e64ed585a45e9c169c Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 27 Oct 2018 11:40:33 +0300 Subject: [PATCH 13/19] Minor copyedits in cmdargs.texi * doc/emacs/cmdargs.texi (Initial Options): Document '-nsl'. Add a cross-reference to "Writing Dynamic Modules". --- doc/emacs/cmdargs.texi | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/doc/emacs/cmdargs.texi b/doc/emacs/cmdargs.texi index f0dd9fffa8..2e2767ccad 100644 --- a/doc/emacs/cmdargs.texi +++ b/doc/emacs/cmdargs.texi @@ -305,6 +305,8 @@ not disable loading @file{site-start.el}. @item --no-site-file @opindex --no-site-file +@itemx -nsl +@opindex -nsl @cindex @file{site-start.el} file, not loading Do not load @file{site-start.el} (@pxref{Init File}). The @samp{-Q} option does this too, but other options like @samp{-q} do not. @@ -379,6 +381,8 @@ Enable expensive correctness checks when dealing with dynamically loadable modules. This is intended for module authors that wish to verify that their module conforms to the module API requirements. The option makes Emacs abort if a module-related assertion triggers. +@xref{Writing Dynamic Modules,, Writing Dynamically-Loaded Modules, +elisp, The GNU Emacs Lisp Reference Manual}. @end table @node Command Example From 29a76443c9dccb33c9eb59b3cee323557a4254be Mon Sep 17 00:00:00 2001 From: Eric Abrahamsen Date: Thu, 18 Oct 2018 11:32:47 -0700 Subject: [PATCH 14/19] Deactivate incorrect hyperlinking in gnus-build-sparse-threads doc * lisp/gnus/gnus-sum.el (gnus-build-sparse-threads): Add the word "symbol" so it doesn't link to the `some' function. (Bug#33090) --- lisp/gnus/gnus-sum.el | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index a39af45e92..2391bd497c 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -203,9 +203,10 @@ Useful functions to put in this list include: (defcustom gnus-build-sparse-threads nil "If non-nil, fill in the gaps in threads. -If `some', only fill in the gaps that are needed to tie loose threads -together. If `more', fill in all leaf nodes that Gnus can find. If -non-nil and non-`some', fill in all gaps that Gnus manages to guess." +If set to the symbol `some', only fill in the gaps that are +needed to tie loose threads together. If the symbol `more', fill +in all leaf nodes that Gnus can find. If t (or any other value), +fill in all gaps that Gnus manages to guess." :group 'gnus-thread :type '(choice (const :tag "off" nil) (const some) From 2a416161b2dd33018a01511ac475e8ede4555ed8 Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 27 Oct 2018 12:14:35 +0300 Subject: [PATCH 15/19] Doc fix of 'gnus-fetch-old-headers' * lisp/gnus/gnus-sum.el (gnus-fetch-old-headers): Avoid treating 'some' and 'invisible' as symbols that need to be hyperlinked. Reported by Robert Pluim . (Bug#33090) --- lisp/gnus/gnus-sum.el | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 2391bd497c..c101130ef4 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el @@ -83,12 +83,12 @@ If an unread article in the group refers to an older, already read (or just marked as read) article, the old article will not normally be displayed in the Summary buffer. If this variable is t, Gnus will attempt to grab the headers to the old articles, and -thereby build complete threads. If it has the value `some', all -old headers will be fetched but only enough headers to connect +thereby build complete threads. If the value is the symbol `some', +all old headers will be fetched but only enough headers to connect otherwise loose threads will be displayed. This variable can also be a number. In that case, no more than that number of old -headers will be fetched. If it has the value `invisible', all -old headers will be fetched, but none will be displayed. +headers will be fetched. If the value is the symbol `invisible', +all old headers will be fetched, but none will be displayed. The server has to support NOV for any of this to work. From 106b9e138fff3a68cbfa09422441af74cdd0355a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20T=C3=A9choueyres?= Date: Sun, 14 Oct 2018 17:49:12 +0200 Subject: [PATCH 16/19] Unify prompt for gnupg passphrase between GNU/Linux and MS-Windows. * lisp/epg.el (epg--start): Use 'raw-text' for coding system instead of 'binary', in order to avoid spurious carriage return on Microsoft Windows and MS-DOS when prompting for a password. (Bug#33040) --- lisp/epg.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lisp/epg.el b/lisp/epg.el index dc0e2df583..87b51b284e 100644 --- a/lisp/epg.el +++ b/lisp/epg.el @@ -657,7 +657,7 @@ callback data (if any)." :command (cons (epg-context-program context) args) :connection-type 'pipe - :coding '(binary . binary) + :coding 'raw-text :filter #'epg--process-filter :stderr error-process :noquery t))) From 9193db08dea945eb18790f9f9381b9e6317f13fd Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 27 Oct 2018 13:18:33 +0300 Subject: [PATCH 17/19] Improve documentation of 'process-connection-type' * doc/lispref/processes.texi (Asynchronous Processes): Clarify better when it is advisable to use pipes for communicating with subprocesses. (Bug#33050) --- doc/lispref/processes.texi | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 34426f339c..0868912b14 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -590,8 +590,8 @@ communication is only partially asynchronous: Emacs sends data to the process only when certain functions are called, and Emacs accepts data from the process only while waiting for input or for a time delay. -@cindex pty -@cindex pipe +@cindex pty, when to use for subprocess communications +@cindex pipe, when to use for subprocess communications An asynchronous process is controlled either via a @dfn{pty} (pseudo-terminal) or a @dfn{pipe}. The choice of pty or pipe is made when creating the process, by default based on the value of the @@ -601,11 +601,13 @@ Shell mode, because they allow for job control (@kbd{C-c}, @kbd{C-z}, etc.)@: between the process and its children, and because interactive programs treat ptys as terminal devices, whereas pipes don't support these features. However, for subprocesses used by Lisp programs for -internal purposes, it is often better to use a pipe, because pipes are +internal purposes (i.e., with no user interaction), 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. +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 @@ -658,7 +660,9 @@ pipe, or @code{nil} to use the default derived from the value of the @code{process-connection-type} variable. This parameter and the value of @code{process-connection-type} are ignored if a non-@code{nil} value is specified for the @code{:stderr} parameter; in that case, the -type will always be @code{pipe}. +type will always be @code{pipe}. On systems where ptys are not +available (MS-Windows), this parameter is likewise ignored, and pipes +are used unconditionally. @item :noquery @var{query-flag} Initialize the process query flag to @var{query-flag}. @@ -863,7 +867,8 @@ around the call to these functions. Note that the value of this variable is ignored when @code{make-process} is called with a non-@code{nil} value of the @code{:stderr} parameter; in that case, Emacs will communicate with -the process using pipes. +the process using pipes. It is also ignored if ptys are unavailable +(MS-Windows). @smallexample @group From 520c486d8bc802cbc31da4455c67af4b8bb01d7b Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 27 Oct 2018 13:50:34 +0300 Subject: [PATCH 18/19] * lisp/simple.el (region-bounds): Doc fix. (Bug#33168) --- lisp/simple.el | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index ba39a49a44..0e5dadc81f 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -5489,8 +5489,10 @@ also checks the value of `use-empty-active-region'." (progn (cl-assert (mark)) t))) (defun region-bounds () - "Return the boundaries of the region as a pair of positions. -Value is a list of cons cells of the form (START . END)." + "Return the boundaries of the region. +Value is a list of one or more cons cells of the form (START . END). +It will have more than one cons cell when the region is non-contiguous, +see `region-noncontiguous-p' and `extract-rectangle-bounds'." (funcall region-extract-function 'bounds)) (defun region-noncontiguous-p () From df64da8eb845c9f07ee93bfbf28af41a01a2e83f Mon Sep 17 00:00:00 2001 From: Eli Zaretskii Date: Sat, 27 Oct 2018 14:08:40 +0300 Subject: [PATCH 19/19] * lisp/simple.el (region-extract-function): Doc fix. (Bug#33167) --- lisp/simple.el | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lisp/simple.el b/lisp/simple.el index 0e5dadc81f..29bb9cbcfb 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1011,13 +1011,16 @@ instead of deleted." (filter-buffer-substring (region-beginning) (region-end) method))))) "Function to get the region's content. Called with one argument METHOD which can be: -- nil: return the content as a string. +- nil: return the content as a string (list of strings for + non-contiguous regions). - `delete-only': delete the region; the return value is undefined. -- `bounds': return the boundaries of the region as a list of cons - cells of the form (START . END). +- `bounds': return the boundaries of the region as a list of one + or more cons cells of the form (START . END). - anything else: delete the region and return its content - as a string, after filtering it with `filter-buffer-substring', which - is called with METHOD as its 3rd argument.") + as a string (or list of strings for non-contiguous regions), + after filtering it with `filter-buffer-substring', which + is called, for each contiguous sub-region, with METHOD as its + 3rd argument.") (defvar region-insert-function (lambda (lines)