1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-11-24 07:20:37 +00:00

Merge from origin/emacs-27

e0de9f3295 (origin/emacs-27) Don't skip empty lines when fitting mini...
a4ec03fa9b ; * etc/tutorials/TUTORIAL.de: Fix grammar (Bug#44246)
20c02e628c Improve documentation of display-fill-column-indicator
e2005f1f2a * INSTALL: Mention efaq.texi for installation of intlfonts.
71661b2872 Use WebKit sandboxing

# Conflicts:
#	etc/NEWS
This commit is contained in:
Glenn Morris 2020-10-27 08:24:56 -07:00
commit 0dfb896be2
11 changed files with 110 additions and 37 deletions

View File

@ -147,7 +147,9 @@ lisp/ps-mule.el defines the *.bdf font files required for printing
each character set.
The intlfonts distribution contains its own installation instructions,
in the intlfonts/README file.
in the intlfonts/README file. See also the Emacs Frequently Asked
Questions info pages "(efaq) How to add fonts" for installation
instructions.
* Image support libraries

View File

@ -1173,31 +1173,34 @@ right-to-left paragraphs.
@cindex mode, display-fill-column-indicator
@findex display-fill-column-indicator-mode
@findex global-display-fill-column-indicator-mode
Emacs can add an indicator to display a fill column position. The
fill column indicator is a useful functionality especially in
@code{prog-mode} to indicate the position of a specific column.
Emacs can display an indication of the @code{fill-column} position
(@pxref{Fill Commands}). The fill-column indicator is a useful
functionality especially in @code{prog-mode} and its descendants
(@pxref{Major Modes}) to indicate the position of a specific column
that has some special meaning for formatting the source code of a
program.
You can set the buffer-local variables
To activate the fill-column indication display, use the minor modes
@w{@kbd{M-x display-fill-column-indicator-mode}} and
@w{@kbd{M-x global-display-fill-column-indicator-mode}}, which enable
the indicator locally or globally, respectively.
Alternatively, you can set the two buffer-local variables
@code{display-fill-column-indicator} and
@code{display-fill-column-indicator-character} to activate the
indicator and control how it looks, respectively.
indicator and control the character used for the indication. Note
that both variables must be non-@code{nil} for the indication to be
displayed. (Turning on the minor mode sets both these variables.)
Alternatively you can type @w{@kbd{M-x display-fill-column-indicator-mode}}
or @w{@kbd{M-x global-display-fill-column-indicator-mode}} which
enables the indicator locally or globally, respectively, and also
chooses the character to use if none is already set. It is possible
to use the first one to activate the indicator in a hook and the
second one to enable it globally.
There are 2 buffer local variables and 1 face to customize this mode:
There are 2 buffer local variables and a face to customize this mode:
@table @code
@item display-fill-column-indicator-column
@vindex display-fill-column-indicator-column
Specifies the column number where the indicator should be set. It can
take positive numerical values for the column or the special value
@code{t} which means that the variable @code{fill-column} will be
used.
take positive numerical values for the column, or the special value
@code{t}, which means that the value of the variable
@code{fill-column} will be used.
Any other value disables the indicator. The default value is @code{t}.
@ -1205,18 +1208,18 @@ Any other value disables the indicator. The default value is @code{t}.
@vindex display-fill-column-indicator-character
Specifies the character used for the indicator. This character can be
any valid character including Unicode ones if the font supports them.
When the mode is enabled through the functions
@code{display-fill-column-indicator-mode} or
@code{global-display-fill-column-indicator-mode}, the initialization
functions check if this variable is non-@code{nil}, otherwise the
initialization tries to set it to @code{U+2502} or @samp{|}.
The value @code{nil} disables the indicator. When the mode is enabled
through the functions @code{display-fill-column-indicator-mode} or
@code{global-display-fill-column-indicator-mode}, they will use the
character specified by this variable, if it is non-@code{nil};
otherwise Emacs will use the character @samp{U+2502 VERTICAL LINE},
falling back to @samp{|} if @code{U+2502} cannot be displayed.
@item fill-column-indicator
@vindex fill-column-indicator
Specifies the face used to display the indicator. It inherits its
default values from the face @code{shadow} but without background
color. To change the indicator color you need only set the foreground
default values from the face @code{shadow}, but without background
color. To change the indicator color, you need only set the foreground
color of this face.
@end table

View File

@ -2501,8 +2501,10 @@ frame is the buffer whose contents will be shown the next time that
window is redisplayed. The function is expected to fit the frame to
the buffer in some appropriate way.
Any other non-@code{nil} value means to resize minibuffer-only frames
by calling @code{fit-frame-to-buffer} (@pxref{Resizing Windows}).
Any other non-@code{nil} value means to resize minibuffer-only frames by
calling @code{fit-mini-frame-to-buffer}, a function that behaves like
@code{fit-frame-to-buffer} (@pxref{Resizing Windows}) but does not strip
leading or trailing empty lines from the buffer text.
@end defopt

View File

@ -21,10 +21,47 @@ Temporary note:
When you add a new item, use the appropriate mark if you are sure it
applies, and please also update docstrings as needed.
* Installation Changes in Emacs 27.2
* Startup Changes in Emacs 27.2
* Changes in Emacs 27.2
This is a bug-fix release with no new features.
* Lisp Changes in Emacs 27.2
*** The behavior of the user option 'resize-mini-frames' has changed.
If set to non-nil, resize the mini frame using the new function
'fit-mini-frame-to-buffer' which won't skip leading or trailing empty
lines of the buffer.
* Editing Changes in Emacs 27.2
* Changes in Specialized Modes and Packages in Emacs 27.2
** Tramp
*** The user option 'tramp-completion-reread-directory-timeout' is made obsolete.
* New Modes and Packages in Emacs 27.2
* Incompatible Lisp Changes in Emacs 27.2
* Lisp Changes in Emacs 27.2
* Changes in Emacs 27.2 on Non-Free Operating Systems
* Installation Changes in Emacs 27.1

View File

@ -1280,7 +1280,7 @@ Funktion set-language-environment). Mittels
C-x <Return> l latin-1 <Return>
können Sie z.B. in einer laufenden Emacs-Sitzung auf Latin-1
umzuschalten. Dadurch wird erreicht, dass Emacs beim Laden einer
umschalten. Dadurch wird erreicht, dass Emacs beim Laden einer
Datei (und Speichern derselben) standardmäßig die
Latin-1-Zeichenkodierung verwendet. Sie können an der Ziffer 1
unmittelbar vor dem Doppelpunkt links unten in der Statuszeile

View File

@ -324,9 +324,9 @@ Leaving \"Default\" unchecked is equivalent with specifying a default of
(resize-mini-frames
frames (choice
(const :tag "Never" nil)
(const :tag "Fit frame to buffer" t)
(const :tag "Fit mini frame to buffer" t)
(function :tag "User-defined function"))
"27.1")
"27.2")
(menu-bar-mode frames boolean nil
;; FIXME?
;; :initialize custom-initialize-default

View File

@ -51,6 +51,8 @@ This uses `display-fill-column-indicator' internally.
To change the position of the column displayed by default
customize `display-fill-column-indicator-column'. You can change the
character for the indicator setting `display-fill-column-indicator-character'.
The globalized version is `global-display-fill-column-indicator-mode',
which see.
See Info node `Displaying Boundaries' for details."
:lighter nil
(if display-fill-column-indicator-mode

View File

@ -3432,7 +3432,7 @@ routines."
"Resize minibuffer-only frame FRAME."
(if (functionp resize-mini-frames)
(funcall resize-mini-frames frame)
(fit-frame-to-buffer frame)))
(fit-mini-frame-to-buffer frame)))
(defun window--sanitize-window-sizes (horizontal)
"Assert that all windows on selected frame are large enough.
@ -8925,6 +8925,14 @@ Return 0 otherwise."
(declare-function tool-bar-height "xdisp.c" (&optional frame pixelwise))
(defun fit-mini-frame-to-buffer (&optional frame)
"Adjust size of minibuffer FRAME to display its contents.
FRAME should be a minibuffer-only frame and defaults to the
selected one. Unlike `fit-frame-to-buffer' FRAME will fit to the
contents of its buffer with any leading or trailing empty lines
included."
(fit-frame-to-buffer-1 frame))
(defun fit-frame-to-buffer (&optional frame max-height min-height max-width min-width only)
"Adjust size of FRAME to display the contents of its buffer exactly.
FRAME can be any live frame and defaults to the selected one.
@ -8943,8 +8951,18 @@ horizontally only.
The new position and size of FRAME can be additionally determined
by customizing the options `fit-frame-to-buffer-sizes' and
`fit-frame-to-buffer-margins' or setting the corresponding
parameters of FRAME."
parameters of FRAME.
Any leading or trailing empty lines of the buffer content are not
considered."
(interactive)
(fit-frame-to-buffer-1 frame max-height min-height max-width min-width only t t))
(defun fit-frame-to-buffer-1 (&optional frame max-height min-height max-width min-width only from to)
"Helper function for `fit-frame-to-buffer'.
FROM and TO are the buffer positions to determine the size to fit
to, see `window-text-pixel-size'. The remaining arguments are as
for `fit-frame-to-buffer'."
(unless (fboundp 'display-monitor-attributes-list)
(user-error "Cannot resize frame in non-graphic Emacs"))
(setq frame (window-normalize-frame frame))
@ -9079,7 +9097,7 @@ parameters of FRAME."
;; Note: Currently, for a new frame the sizes of the header
;; and mode line may be estimated incorrectly
(size
(window-text-pixel-size window t t max-width max-height))
(window-text-pixel-size window from to max-width max-height))
(width (max (car size) min-width))
(height (max (cdr size) min-height)))
;; Don't change height or width when the window's size is fixed

View File

@ -6188,7 +6188,7 @@ window of that frame is the buffer whose text will be eventually shown
in the minibuffer window.
Any other non-nil value means to resize minibuffer-only frames by
calling `fit-frame-to-buffer'. */);
calling `fit-mini-frame-to-buffer'. */);
resize_mini_frames = Qnil;
DEFVAR_LISP ("focus-follows-mouse", focus_follows_mouse,

View File

@ -35267,6 +35267,8 @@ It has no effect when set to 0, or when line numbers are not absolute. */);
DEFVAR_BOOL ("display-fill-column-indicator", display_fill_column_indicator,
doc: /* Non-nil means display the fill column indicator.
If you set this non-nil, make sure `display-fill-column-indicator-character'
is also non-nil.
See Info node `Displaying Boundaries' for details. */);
display_fill_column_indicator = false;
DEFSYM (Qdisplay_fill_column_indicator, "display-fill-column-indicator");
@ -35284,8 +35286,8 @@ See Info node `Displaying Boundaries' for details. */);
DEFVAR_LISP ("display-fill-column-indicator-character", Vdisplay_fill_column_indicator_character,
doc: /* Character to draw the indicator when `display-fill-column-indicator' is non-nil.
The default is U+2502 but a good alternative is (ascii 124)
if the font in fill-column-indicator face does not support Unicode characters.
A good candidate is U+2502, and an alternative is (ascii 124) if the
font of `fill-column-indicator' face does not support Unicode characters.
See Info node `Displaying Boundaries' for details. */);
Vdisplay_fill_column_indicator_character = Qnil;
DEFSYM (Qdisplay_fill_column_indicator_character, "display-fill-column-indicator-character");

View File

@ -114,6 +114,13 @@ Returns the newly constructed xwidget, or nil if construction fails. */)
if (EQ (xw->type, Qwebkit))
{
block_input ();
WebKitWebContext *webkit_context = webkit_web_context_get_default ();
# if WEBKIT_CHECK_VERSION (2, 26, 0)
if (!webkit_web_context_get_sandbox_enabled (webkit_context))
webkit_web_context_set_sandbox_enabled (webkit_context, TRUE);
# endif
xw->widgetwindow_osr = gtk_offscreen_window_new ();
gtk_window_resize (GTK_WINDOW (xw->widgetwindow_osr), xw->width,
xw->height);
@ -152,7 +159,7 @@ Returns the newly constructed xwidget, or nil if construction fails. */)
"load-changed",
G_CALLBACK (webkit_view_load_changed_cb), xw);
g_signal_connect (G_OBJECT (webkit_web_context_get_default ()),
g_signal_connect (G_OBJECT (webkit_context),
"download-started",
G_CALLBACK (webkit_download_cb), xw);