Merge from origin/emacs-26

df64da8 (origin/emacs-26) * lisp/simple.el (region-extract-function):...
520c486 * lisp/simple.el (region-bounds): Doc fix.  (Bug#33168)
9193db0 Improve documentation of 'process-connection-type'
106b9e1 Unify prompt for gnupg passphrase between GNU/Linux and MS-Wi...
2a41616 Doc fix of 'gnus-fetch-old-headers'
29a7644 Deactivate incorrect hyperlinking in gnus-build-sparse-thread...
53ae90f Minor copyedits in cmdargs.texi
fc2e65a Improve documentation of X resource loading
13132b3 * lisp/net/tramp-sh.el (tramp-inline-compress-commands):
8361292 ; Fix sorting in admin/MAINTAINERS
92de44f Don't error when indenting malformed Lisp (Bug#30891)
c3adbc8 Improve 'isearch-delete-char' documentation (Bug#32990)
6ca71ce ; * lisp/help.el (with-help-window): Remove extra space in doc.
f5f9583 Improve XPM load failure message (bug#33126)
f3d01d4 Avoid infloop in CPerl mode fontification
71a2d50 Fix minibuffer-help-form for lexical binding
7e8eee6 Fix some NS drawing issues (bug#32932)
d72975a * lisp/gnus/mm-util.el (mm-decompress-buffer): Fix split-stri...
c97a5f1 * doc/misc/calc.texi (Summary): The +/- key is 'p', not 'P'.

# Conflicts:
#	lisp/gnus/mm-util.el
This commit is contained in:
Glenn Morris 2018-10-27 09:15:32 -07:00
commit 2df74ce79b
20 changed files with 143 additions and 95 deletions

View file

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

View file

@ -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.
@ -323,14 +325,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
@ -373,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

View file

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

View file

@ -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
@ -290,14 +298,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)}

View file

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

View file

@ -598,8 +598,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
@ -609,11 +609,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
@ -666,7 +668,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}.
@ -873,7 +877,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

View file

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

View file

@ -2599,6 +2599,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

View file

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

View file

@ -839,6 +839,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))

View file

@ -655,7 +655,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)))

View file

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

View file

@ -827,7 +827,7 @@ decompressed data. The buffer's multibyteness must be turned off."
(insert-file-contents err-file)
(buffer-string)
(erase-buffer))
t)
nil t)
" ")
"\n")
(setq err-msg

View file

@ -1326,7 +1326,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

View file

@ -1984,11 +1984,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)

View file

@ -4492,7 +4492,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"))

View file

@ -8786,7 +8786,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)

View file

@ -1071,13 +1071,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)
@ -5527,8 +5530,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 ()
@ -7935,7 +7940,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

View file

@ -4309,7 +4309,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);

View file

@ -279,7 +279,6 @@ - (NSColor *)colorUsingDefaultColorSpace
/* 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;
@ -1234,7 +1233,6 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen)
NSRectClipList (r, 2);
else
NSRectClip (*r);
gsaved = YES;
return YES;
}
@ -1258,11 +1256,7 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen)
{
NSTRACE_WHEN (NSTRACE_GROUP_FOCUS, "ns_reset_clipping");
if (gsaved)
{
[[NSGraphicsContext currentContext] restoreGraphicsState];
gsaved = NO;
}
[[NSGraphicsContext currentContext] restoreGraphicsState];
}
@ -1288,19 +1282,6 @@ static NSRect constrain_frame_rect(NSRect frameRect, bool isFullscreen)
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.
@ -2837,6 +2818,8 @@ so some key presses (TAB) are swallowed by the system. */
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))
@ -2845,10 +2828,21 @@ so some key presses (TAB) are swallowed by the system. */
/* 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
}
}
@ -3233,15 +3227,6 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors.
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:
@ -3275,10 +3260,6 @@ Note that CURSOR_WIDTH is meaningful only for (h)bar cursors.
/* 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
}
}
@ -5119,7 +5100,7 @@ static Lisp_Object ns_string_to_lispmod (const char *s)
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,
@ -7114,7 +7095,6 @@ - (NSSize)windowWillResize: (NSWindow *)sender toSize: (NSSize)frameSize
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);
}
}
@ -8164,8 +8144,8 @@ - (instancetype)toggleToolbar: (id)sender
- (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));
@ -8173,9 +8153,23 @@ - (void)drawRect: (NSRect)rect
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 ();
/*