1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-17 03:10:58 -08:00

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 ru Alex Ott
sk Miroslav Vaško 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 * BUGS
** Check for modes which bind M-s that conflicts with a new global binding M-s ** 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 To access the contents of a mouse position list in the
@var{position} slot of a click event, you should typically use the @var{position} slot of a click event, you should typically use the
functions documented in @ref{Accessing Mouse}. The explicit format of functions documented in @ref{Accessing Mouse}.
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 The explicit format of the list depends on where the click occurred.
areas, the mouse position list has the form 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 @example
(@var{window} @var{pos-or-area} (@var{x} . @var{y}) @var{timestamp} (@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. @c The 'top', 'bottom', and 'end-scroll' codes don't seem to be used.
@end table @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 @node Drag Events
@subsection 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{initial-value} and the first element of @var{sequence}, then calling
@var{function} with that result and the second element of @var{sequence}, @var{function} with that result and the second element of @var{sequence},
then with that result and the third element of @var{sequence}, etc. then with that result and the third element of @var{sequence}, etc.
@var{function} should be a function of two arguments. If @var{function} should be a function of two arguments.
@var{sequence} is empty, this returns @var{initial-value} without
@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}. calling @var{function}.
@example @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 If one prefix is insufficient, your package can use two or three
alternative common prefixes, so long as they make sense. 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 @item
Put a call to @code{provide} at the end of each separate Lisp file. Put a call to @code{provide} at the end of each separate Lisp file.
@xref{Named Features}. @xref{Named Features}.
@ -963,7 +968,7 @@ explains these conventions, starting with an example:
@smallexample @smallexample
@group @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 ;; Copyright (C) 2010-2020 Your Name
@end group @end group
@ -986,14 +991,14 @@ explains these conventions, starting with an example:
The very first line should have this format: The very first line should have this format:
@example @example
;;; @var{filename} --- @var{description} ;;; @var{filename} --- @var{description} -*- lexical-binding: t; -*-
@end example @end example
@noindent @noindent
The description should be contained in one line. If the file The description should be contained in one line. If the file needs to
needs a @samp{-*-} specification, put it after @var{description}. set more variables in the @samp{-*-} specification, add it after
If this would make the first line too long, use a Local Variables @code{lexical-binding}. If this would make the first line too long, use
section at the end of the file. a Local Variables section at the end of the file.
The copyright notice usually lists your name (if you wrote the The copyright notice usually lists your name (if you wrote the
file). If you have an employer who claims copyright on your work, you 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 file, so you can always know that you are going to be switching to
another manual and which one. another manual and which one.
However, Emacs normally hides some other text in cross-references. Emacs normally hides some text in cross references. If you put your
If you put your mouse over the cross reference, then the information mouse over the cross reference, then the information appearing in a
appearing in a separate box (tool tip) or in the echo area will show separate box (tool tip) or in the echo area will show the full
the full cross-reference including the file name and the node name of cross reference, including the file name and the node name of the
the cross reference. If you have a mouse, just leave it over the cross reference if it leads to another file. If you have a mouse,
cross reference @xref{Top,, Overview of Texinfo, texinfo, Texinfo: just leave it over the next cross reference: @xref{Top,, Overview of
The GNU Documentation Format}, and watch what happens. If you Texinfo, texinfo, Texinfo: The GNU Documentation Format}, and watch
always like to have that information visible without having to move what happens. If you always like to have that information visible
your mouse over the cross reference, use @kbd{M-x visible-mode}, or without having to move your mouse over the cross reference, use
set @code{Info-hide-note-references} to a value other than @code{t} @kbd{M-x visible-mode}, or set @code{Info-hide-note-references} to a
(@pxref{Emacs Info Variables}). value other than @code{t} (@pxref{Emacs Info Variables}).
@format @format
>> Now type @kbd{n} to learn more commands. >> 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. visible.
@item Info-hide-note-references @item Info-hide-note-references
As explained in earlier nodes, the Emacs version of Info normally As explained in earlier sections, the Emacs version of Info normally
hides some text in menus and cross-references. You can completely hides some text in menus and cross references. It also replaces the
disable this feature, by setting this option to @code{nil}. Setting @samp{*note} prefix of each cross reference with a more grammatically
it to a value that is neither @code{nil} nor @code{t} produces an correct @samp{see}. This is the effect of the default value of this
intermediate behavior, hiding a limited amount of text, but showing option, @code{t}. Setting this option to @code{nil} disables both
all text that could potentially be useful. 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 @item Info-scroll-prefer-subnodes
If set to a non-@code{nil} value, @key{SPC} and @key{BACKSPACE} (or 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-styles.elc: $(lisp)/progmodes/cc-vars.elc \
$(lisp)/progmodes/cc-align.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. # Makefile ends here.

View file

@ -336,9 +336,11 @@ list."
"Reduce the function FUNCTION across SEQUENCE, starting with INITIAL-VALUE. "Reduce the function FUNCTION across SEQUENCE, starting with INITIAL-VALUE.
Return the result of calling FUNCTION with INITIAL-VALUE and the Return the result of calling FUNCTION with INITIAL-VALUE and the
first element of SEQUENCE, then calling FUNCTION with that result and first element of SEQUENCE, then calling FUNCTION with that result
the second element of SEQUENCE, then with that result and the third and the second element of SEQUENCE, then with that result and the
element of SEQUENCE, etc. 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 SEQUENCE is empty, return INITIAL-VALUE and FUNCTION is not called."
(if (seq-empty-p sequence) (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 (defcustom Info-hide-note-references t
"If non-nil, hide the tag and section reference in *note and * menu items. "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 the value is t, the default, replace \"*note\" with \"see\".
If value is non-nil but not t or `hide', the reference section is still shown. If the value is `hide', remove \"*note\" without replacing it with anything.
nil completely disables this feature. If this is non-nil, you might If value is non-nil, but not t or `hide', the reference section is still shown.
want to set `Info-refill-paragraphs'." 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" :version "22.1"
:type '(choice (const :tag "No hiding" nil) :type '(choice (const :tag "No hiding" nil)
(const :tag "Replace tag and hide reference" t) (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. whichever comes first.
Unlike `minibuffer-message', this function is called automatically Unlike `minibuffer-message', this function is called automatically
via `set-message-function'." via `set-message-function'."
(when (and (not noninteractive) (let* ((minibuf-window (active-minibuffer-window))
(window-live-p (active-minibuffer-window)) (minibuf-frame (and (window-live-p minibuf-window)
(eq (window-frame) (window-frame (active-minibuffer-window)))) (window-frame minibuf-window))))
(with-current-buffer (window-buffer (active-minibuffer-window)) (when (and (not noninteractive)
(setq message (if (string-match-p "\\` *\\[.+\\]\\'" message) (window-live-p minibuf-window)
;; Make sure we can put-text-property. (or (eq (window-frame) minibuf-frame)
(copy-sequence message) (eq (frame-parameter minibuf-frame 'minibuffer) 'only)))
(concat " [" message "]"))) (with-current-buffer (window-buffer minibuf-window)
(unless (or (null minibuffer-message-properties) (setq message (if (string-match-p "\\` *\\[.+\\]\\'" message)
;; Don't overwrite the face properties the caller has set ;; Make sure we can put-text-property.
(text-properties-at 0 message)) (copy-sequence message)
(setq message (apply #'propertize message minibuffer-message-properties))) (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))) (let ((ovpos (minibuffer--message-overlay-pos)))
(setq minibuffer-message-overlay (setq minibuffer-message-overlay
(make-overlay ovpos ovpos nil t t))) (make-overlay ovpos ovpos nil t t)))
(unless (zerop (length message)) (unless (zerop (length message))
;; The current C cursor code doesn't know to use the overlay's ;; The current C cursor code doesn't know to use the overlay's
;; marker's stickiness to figure out whether to place the cursor ;; marker's stickiness to figure out whether to place the cursor
;; before or after the string, so let's spoon-feed it the pos. ;; before or after the string, so let's spoon-feed it the pos.
(put-text-property 0 1 'cursor 1 message)) (put-text-property 0 1 'cursor 1 message))
(overlay-put minibuffer-message-overlay 'after-string message) (overlay-put minibuffer-message-overlay 'after-string message)
;; Make sure the overlay with the message is displayed before ;; Make sure the overlay with the message is displayed before
;; any other overlays in that position, in case they have ;; any other overlays in that position, in case they have
;; resize-mini-windows set to nil and the other overlay strings ;; resize-mini-windows set to nil and the other overlay strings
;; are too long for the mini-window width. This makes sure the ;; are too long for the mini-window width. This makes sure the
;; temporary message will always be visible. ;; temporary message will always be visible.
(overlay-put minibuffer-message-overlay 'priority 1100) (overlay-put minibuffer-message-overlay 'priority 1100)
(when (numberp minibuffer-message-clear-timeout) (when (numberp minibuffer-message-clear-timeout)
(setq minibuffer-message-timer (setq minibuffer-message-timer
(run-with-timer minibuffer-message-clear-timeout nil (run-with-timer minibuffer-message-clear-timeout nil
#'clear-minibuffer-message))) #'clear-minibuffer-message)))
;; Return `t' telling the caller that the message ;; Return `t' telling the caller that the message
;; was handled specially by this function. ;; was handled specially by this function.
t))) t))))
(setq set-message-function 'set-minibuffer-message) (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))); extra_info)));
} }
#ifdef HAVE_WINDOW_SYSTEM
else if (f) else if (f)
{ {
/* Return mouse pixel coordinates here. */ /* Return mouse pixel coordinates here. */
@ -5254,7 +5253,9 @@ make_lispy_position (struct frame *f, Lisp_Object x, Lisp_Object y,
xret = XFIXNUM (x); xret = XFIXNUM (x);
yret = XFIXNUM (y); 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 && FRAME_INTERNAL_BORDER_WIDTH (f) > 0
&& !NILP (get_frame_param (f, Qdrag_internal_border))) && !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]); posn = builtin_lisp_symbol (internal_border_parts[part]);
} }
}
#endif #endif
}
else else
window_or_frame = Qnil; 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 lnum_face_id = merge_faces (it->w, Qline_number, 0, DEFAULT_FACE_ID);
int current_lnum_face_id int current_lnum_face_id
= merge_faces (it->w, Qline_number_current_line, 0, DEFAULT_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. */ /* Compute point's line number if needed. */
if ((EQ (Vdisplay_line_numbers, Qrelative) if ((EQ (Vdisplay_line_numbers, Qrelative)
|| EQ (Vdisplay_line_numbers, Qvisual) || EQ (Vdisplay_line_numbers, Qvisual)
@ -22922,10 +22926,13 @@ maybe_produce_line_number (struct it *it)
it->lnum_width = 0; it->lnum_width = 0;
it->lnum_pixel_width = 0; it->lnum_pixel_width = 0;
bidi_unshelve_cache (itdata, false); bidi_unshelve_cache (itdata, false);
inhibit_free_realized_faces = save_free_realized_faces;
return; return;
} }
} }
inhibit_free_realized_faces = save_free_realized_faces;
/* Record the width in pixels we need for the line number display. */ /* Record the width in pixels we need for the line number display. */
it->lnum_pixel_width = tem_it.current_x; it->lnum_pixel_width = tem_it.current_x;
/* Copy the produced glyphs into IT's glyph_row. */ /* Copy the produced glyphs into IT's glyph_row. */