Merge branch 'emacs-27' of git.sv.gnu.org:/srv/git/emacs into emacs-27

This commit is contained in:
Michael Albinus 2020-10-23 16:26:47 +02:00
commit c847d5998f
11 changed files with 165 additions and 74 deletions

View file

@ -195,6 +195,17 @@ pt-br Rodrigo Real
ru Alex Ott
sk Miroslav Vaško
** Update some files from their upstream.
Some files in Emacs are copies of data files maintained elsewhere.
Make sure that they are reasonably up-to-date.
- etc/publicsuffix.txt
https://publicsuffix.org/list/public_suffix_list.dat
- leim/SKK-DIC/SKK-JISYO.L
https://raw.githubusercontent.com/skk-dev/dict/master/SKK-JISYO.L
* BUGS
** Check for modes which bind M-s that conflicts with a new global binding M-s

View file

@ -1346,10 +1346,11 @@ button. @xref{Repeat Events}.
To access the contents of a mouse position list in the
@var{position} slot of a click event, you should typically use the
functions documented in @ref{Accessing Mouse}. The explicit format of
the list depends on where the click occurred. For clicks in the text
area, mode line, header line, tab line, or in the fringe or marginal
areas, the mouse position list has the form
functions documented in @ref{Accessing Mouse}.
The explicit format of the list depends on where the click occurred.
For clicks in the text area, mode line, header line, tab line, or in
the fringe or marginal areas, the mouse position list has the form
@example
(@var{window} @var{pos-or-area} (@var{x} . @var{y}) @var{timestamp}
@ -1479,6 +1480,45 @@ handle), @code{up} (the up arrow at one end of the scroll bar), or
@c The 'top', 'bottom', and 'end-scroll' codes don't seem to be used.
@end table
For clicks on the frame's internal border (@pxref{Frame Layout}),
@var{position} has this form:
@example
(@var{frame} @var{part} (@var{X} . @var{Y}) @var{timestamp})
@end example
@table @asis
@item @var{frame}
The frame whose internal border was clicked on.
@item @var{part}
The part of the internal border which was clicked on. This can be one
of the following:
@table @code
@item nil
The frame does not have an internal border. This usually happens on
text-mode frames. This can also happen on GUI frames with internal
border if the frame doesn't have its @code{drag-internal-border}
parameter (@pxref{Mouse Dragging Parameters}) set to a non-@code{nil}
value.
@item left-edge
@itemx top-edge
@itemx right-edge
@itemx bottom-edge
The click was on the corresponding border at an offset of at least one
canonical character from the border's nearest corner.
@item top-left-corner
@itemx top-right-corner
@itemx bottom-right-corner
@itemx bottom-left-corner
The click was on the corresponding corner of the internal border.
@end table
@end table
@node Drag Events
@subsection Drag Events

View file

@ -658,8 +658,13 @@ for which @var{predicate} returns @code{nil}.
@var{initial-value} and the first element of @var{sequence}, then calling
@var{function} with that result and the second element of @var{sequence},
then with that result and the third element of @var{sequence}, etc.
@var{function} should be a function of two arguments. If
@var{sequence} is empty, this returns @var{initial-value} without
@var{function} should be a function of two arguments.
@var{function} is called with two arguments. @var{intial-value}
(and then the accumulated value) is used as the first argument, and
the elements in @var{sequence} are used for the second argument.
If @var{sequence} is empty, this returns @var{initial-value} without
calling @var{function}.
@example

View file

@ -94,6 +94,11 @@ it to Emacs. If and when we do, we can change the name easily enough.
If one prefix is insufficient, your package can use two or three
alternative common prefixes, so long as they make sense.
@item
We recommend enabling @code{lexical-binding} in new code, and
converting existing Emacs Lisp code to enable @code{lexical-binding}
if it doesn't already. @xref{Using Lexical Binding}.
@item
Put a call to @code{provide} at the end of each separate Lisp file.
@xref{Named Features}.
@ -963,7 +968,7 @@ explains these conventions, starting with an example:
@smallexample
@group
;;; foo.el --- Support for the Foo programming language
;;; foo.el --- Support for the Foo programming language -*- lexical-binding: t; -*-
;; Copyright (C) 2010-2020 Your Name
@end group
@ -986,14 +991,14 @@ explains these conventions, starting with an example:
The very first line should have this format:
@example
;;; @var{filename} --- @var{description}
;;; @var{filename} --- @var{description} -*- lexical-binding: t; -*-
@end example
@noindent
The description should be contained in one line. If the file
needs a @samp{-*-} specification, put it after @var{description}.
If this would make the first line too long, use a Local Variables
section at the end of the file.
The description should be contained in one line. If the file needs to
set more variables in the @samp{-*-} specification, add it after
@code{lexical-binding}. If this would make the first line too long, use
a Local Variables section at the end of the file.
The copyright notice usually lists your name (if you wrote the
file). If you have an employer who claims copyright on your work, you

View file

@ -798,17 +798,17 @@ in cross references and node names if it differs from the current
file, so you can always know that you are going to be switching to
another manual and which one.
However, Emacs normally hides some other text in cross-references.
If you put your mouse over the cross reference, then the information
appearing in a separate box (tool tip) or in the echo area will show
the full cross-reference including the file name and the node name of
the cross reference. If you have a mouse, just leave it over the
cross reference @xref{Top,, Overview of Texinfo, texinfo, Texinfo:
The GNU Documentation Format}, and watch what happens. If you
always like to have that information visible without having to move
your mouse over the cross reference, use @kbd{M-x visible-mode}, or
set @code{Info-hide-note-references} to a value other than @code{t}
(@pxref{Emacs Info Variables}).
Emacs normally hides some text in cross references. If you put your
mouse over the cross reference, then the information appearing in a
separate box (tool tip) or in the echo area will show the full
cross reference, including the file name and the node name of the
cross reference if it leads to another file. If you have a mouse,
just leave it over the next cross reference: @xref{Top,, Overview of
Texinfo, texinfo, Texinfo: The GNU Documentation Format}, and watch
what happens. If you always like to have that information visible
without having to move your mouse over the cross reference, use
@kbd{M-x visible-mode}, or set @code{Info-hide-note-references} to a
value other than @code{t} (@pxref{Emacs Info Variables}).
@format
>> Now type @kbd{n} to learn more commands.
@ -1227,12 +1227,20 @@ not scroll with the rest of the buffer, making these links always
visible.
@item Info-hide-note-references
As explained in earlier nodes, the Emacs version of Info normally
hides some text in menus and cross-references. You can completely
disable this feature, by setting this option to @code{nil}. Setting
it to a value that is neither @code{nil} nor @code{t} produces an
intermediate behavior, hiding a limited amount of text, but showing
all text that could potentially be useful.
As explained in earlier sections, the Emacs version of Info normally
hides some text in menus and cross references. It also replaces the
@samp{*note} prefix of each cross reference with a more grammatically
correct @samp{see}. This is the effect of the default value of this
option, @code{t}. Setting this option to @code{nil} disables both
hiding and replacing of the original cross reference text, and Emacs
will then display them as they are in the Info file. If you set it to
the value @code{hide}, Emacs will do the same as with @code{t}, but
will also remove @samp{*note} without replacing it with anything.
Setting it to any other non-@code{nil} value produces an intermediate
behavior, hiding a limited amount of text, but showing all text that
could potentially be useful, including the name of the node that is
the target of the cross reference and its file if it is different from
the current file.
@item Info-scroll-prefer-subnodes
If set to a non-@code{nil} value, @key{SPC} and @key{BACKSPACE} (or

View file

@ -525,4 +525,10 @@ $(lisp)/progmodes/cc-mode.elc: $(lisp)/progmodes/cc-langs.elc \
$(lisp)/progmodes/cc-styles.elc: $(lisp)/progmodes/cc-vars.elc \
$(lisp)/progmodes/cc-align.elc
# https://debbugs.gnu.org/43037
# js.elc (like all modes using CC Mode's compile time macros) needs to
# be compiled under the same version of CC Mode it will run with.
$(lisp)/progmodes/js.elc: $(lisp)/progmodes/cc-defs.elc \
$(lisp)/progmodes/cc-engine.elc $(lisp)/progmodes/cc-mode.elc
# Makefile ends here.

View file

@ -336,9 +336,11 @@ list."
"Reduce the function FUNCTION across SEQUENCE, starting with INITIAL-VALUE.
Return the result of calling FUNCTION with INITIAL-VALUE and the
first element of SEQUENCE, then calling FUNCTION with that result and
the second element of SEQUENCE, then with that result and the third
element of SEQUENCE, etc.
first element of SEQUENCE, then calling FUNCTION with that result
and the second element of SEQUENCE, then with that result and the
third element of SEQUENCE, etc. FUNCTION will be called with
INITIAL-VALUE (and then the accumulated value) as the first
argument, and the elements from SEQUENCE as the second argument.
If SEQUENCE is empty, return INITIAL-VALUE and FUNCTION is not called."
(if (seq-empty-p sequence)

View file

@ -305,10 +305,11 @@ when you hit the end of the current node."
(defcustom Info-hide-note-references t
"If non-nil, hide the tag and section reference in *note and * menu items.
If value is non-nil but not `hide', also replaces the \"*note\" with \"see\".
If value is non-nil but not t or `hide', the reference section is still shown.
nil completely disables this feature. If this is non-nil, you might
want to set `Info-refill-paragraphs'."
If the value is t, the default, replace \"*note\" with \"see\".
If the value is `hide', remove \"*note\" without replacing it with anything.
If value is non-nil, but not t or `hide', the reference section is still shown.
nil completely disables this feature, leaving the original \"*note\" visible.
If this is non-nil, you may wish setting `Info-refill-paragraphs' non-nil."
:version "22.1"
:type '(choice (const :tag "No hiding" nil)
(const :tag "Replace tag and hide reference" t)

View file

@ -783,45 +783,50 @@ The text is displayed for `minibuffer-message-clear-timeout' seconds
whichever comes first.
Unlike `minibuffer-message', this function is called automatically
via `set-message-function'."
(when (and (not noninteractive)
(window-live-p (active-minibuffer-window))
(eq (window-frame) (window-frame (active-minibuffer-window))))
(with-current-buffer (window-buffer (active-minibuffer-window))
(setq message (if (string-match-p "\\` *\\[.+\\]\\'" message)
;; Make sure we can put-text-property.
(copy-sequence message)
(concat " [" message "]")))
(unless (or (null minibuffer-message-properties)
;; Don't overwrite the face properties the caller has set
(text-properties-at 0 message))
(setq message (apply #'propertize message minibuffer-message-properties)))
(let* ((minibuf-window (active-minibuffer-window))
(minibuf-frame (and (window-live-p minibuf-window)
(window-frame minibuf-window))))
(when (and (not noninteractive)
(window-live-p minibuf-window)
(or (eq (window-frame) minibuf-frame)
(eq (frame-parameter minibuf-frame 'minibuffer) 'only)))
(with-current-buffer (window-buffer minibuf-window)
(setq message (if (string-match-p "\\` *\\[.+\\]\\'" message)
;; Make sure we can put-text-property.
(copy-sequence message)
(concat " [" message "]")))
(unless (or (null minibuffer-message-properties)
;; Don't overwrite the face properties the caller has set
(text-properties-at 0 message))
(setq message
(apply #'propertize message minibuffer-message-properties)))
(clear-minibuffer-message)
(clear-minibuffer-message)
(let ((ovpos (minibuffer--message-overlay-pos)))
(setq minibuffer-message-overlay
(make-overlay ovpos ovpos nil t t)))
(unless (zerop (length message))
;; The current C cursor code doesn't know to use the overlay's
;; marker's stickiness to figure out whether to place the cursor
;; before or after the string, so let's spoon-feed it the pos.
(put-text-property 0 1 'cursor 1 message))
(overlay-put minibuffer-message-overlay 'after-string message)
;; Make sure the overlay with the message is displayed before
;; any other overlays in that position, in case they have
;; resize-mini-windows set to nil and the other overlay strings
;; are too long for the mini-window width. This makes sure the
;; temporary message will always be visible.
(overlay-put minibuffer-message-overlay 'priority 1100)
(let ((ovpos (minibuffer--message-overlay-pos)))
(setq minibuffer-message-overlay
(make-overlay ovpos ovpos nil t t)))
(unless (zerop (length message))
;; The current C cursor code doesn't know to use the overlay's
;; marker's stickiness to figure out whether to place the cursor
;; before or after the string, so let's spoon-feed it the pos.
(put-text-property 0 1 'cursor 1 message))
(overlay-put minibuffer-message-overlay 'after-string message)
;; Make sure the overlay with the message is displayed before
;; any other overlays in that position, in case they have
;; resize-mini-windows set to nil and the other overlay strings
;; are too long for the mini-window width. This makes sure the
;; temporary message will always be visible.
(overlay-put minibuffer-message-overlay 'priority 1100)
(when (numberp minibuffer-message-clear-timeout)
(setq minibuffer-message-timer
(run-with-timer minibuffer-message-clear-timeout nil
#'clear-minibuffer-message)))
(when (numberp minibuffer-message-clear-timeout)
(setq minibuffer-message-timer
(run-with-timer minibuffer-message-clear-timeout nil
#'clear-minibuffer-message)))
;; Return `t' telling the caller that the message
;; was handled specially by this function.
t)))
;; Return `t' telling the caller that the message
;; was handled specially by this function.
t))))
(setq set-message-function 'set-minibuffer-message)

View file

@ -5246,7 +5246,6 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
extra_info)));
}
#ifdef HAVE_WINDOW_SYSTEM
else if (f)
{
/* Return mouse pixel coordinates here. */
@ -5254,7 +5253,9 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
xret = XFIXNUM (x);
yret = XFIXNUM (y);
if (FRAME_LIVE_P (f)
#ifdef HAVE_WINDOW_SYSTEM
if (FRAME_WINDOW_P (f)
&& FRAME_LIVE_P (f)
&& FRAME_INTERNAL_BORDER_WIDTH (f) > 0
&& !NILP (get_frame_param (f, Qdrag_internal_border)))
{
@ -5263,8 +5264,8 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
posn = builtin_lisp_symbol (internal_border_parts[part]);
}
}
#endif
}
else
window_or_frame = Qnil;

View file

@ -22793,6 +22793,10 @@ maybe_produce_line_number (struct it *it)
int lnum_face_id = merge_faces (it->w, Qline_number, 0, DEFAULT_FACE_ID);
int current_lnum_face_id
= merge_faces (it->w, Qline_number_current_line, 0, DEFAULT_FACE_ID);
/* From here onwards, we must prevent freeing realized faces, because
we are using the above 2 face IDs for the glyphs we produce. */
bool save_free_realized_faces = inhibit_free_realized_faces;
inhibit_free_realized_faces = true;
/* Compute point's line number if needed. */
if ((EQ (Vdisplay_line_numbers, Qrelative)
|| EQ (Vdisplay_line_numbers, Qvisual)
@ -22922,10 +22926,13 @@ maybe_produce_line_number (struct it *it)
it->lnum_width = 0;
it->lnum_pixel_width = 0;
bidi_unshelve_cache (itdata, false);
inhibit_free_realized_faces = save_free_realized_faces;
return;
}
}
inhibit_free_realized_faces = save_free_realized_faces;
/* Record the width in pixels we need for the line number display. */
it->lnum_pixel_width = tem_it.current_x;
/* Copy the produced glyphs into IT's glyph_row. */