emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 0dfb896 5/5: Merge from origin/emacs-27


From: Glenn Morris
Subject: master 0dfb896 5/5: Merge from origin/emacs-27
Date: Tue, 27 Oct 2020 11:25:08 -0400 (EDT)

branch: master
commit 0dfb896be2d84e069831faf3499fe6add629af62
Merge: dcd1095 e0de9f3
Author: Glenn Morris <rgm@gnu.org>
Commit: Glenn Morris <rgm@gnu.org>

    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
---
 INSTALL                               |  4 ++-
 doc/emacs/display.texi                | 51 ++++++++++++++++++-----------------
 doc/lispref/minibuf.texi              |  6 +++--
 etc/NEWS.27                           | 37 +++++++++++++++++++++++++
 etc/tutorials/TUTORIAL.de             |  2 +-
 lisp/cus-start.el                     |  4 +--
 lisp/display-fill-column-indicator.el |  2 ++
 lisp/window.el                        | 24 ++++++++++++++---
 src/frame.c                           |  2 +-
 src/xdisp.c                           |  6 +++--
 src/xwidget.c                         |  9 ++++++-
 11 files changed, 110 insertions(+), 37 deletions(-)

diff --git a/INSTALL b/INSTALL
index f1ceb2c..e880b4e 100644
--- a/INSTALL
+++ b/INSTALL
@@ -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
 
diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 6f1bc80..dd2c6e2 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -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.
+
+  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.
 
-  You can set the buffer-local variables
+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
 
diff --git a/doc/lispref/minibuf.texi b/doc/lispref/minibuf.texi
index d00acd0..e5a0233 100644
--- a/doc/lispref/minibuf.texi
+++ b/doc/lispref/minibuf.texi
@@ -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
 
 
diff --git a/etc/NEWS.27 b/etc/NEWS.27
index e793133..f0b5dd0 100644
--- a/etc/NEWS.27
+++ b/etc/NEWS.27
@@ -21,11 +21,48 @@ 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
 
 ** Emacs now uses GMP, the GNU Multiple Precision library.
diff --git a/etc/tutorials/TUTORIAL.de b/etc/tutorials/TUTORIAL.de
index f146156..ae58fc9 100644
--- a/etc/tutorials/TUTORIAL.de
+++ b/etc/tutorials/TUTORIAL.de
@@ -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
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 3fd6ac0..6927b6d 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -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
diff --git a/lisp/display-fill-column-indicator.el 
b/lisp/display-fill-column-indicator.el
index 3ba4191..5fd9f07 100644
--- a/lisp/display-fill-column-indicator.el
+++ b/lisp/display-fill-column-indicator.el
@@ -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
diff --git a/lisp/window.el b/lisp/window.el
index 1fcfffc..865f6fd 100644
--- a/lisp/window.el
+++ b/lisp/window.el
@@ -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
diff --git a/src/frame.c b/src/frame.c
index 5d967a5..7c377da 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -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,
diff --git a/src/xdisp.c b/src/xdisp.c
index c657978..5c80e37 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -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");
diff --git a/src/xwidget.c b/src/xwidget.c
index e63191e..031975f 100644
--- a/src/xwidget.c
+++ b/src/xwidget.c
@@ -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);
 



reply via email to

[Prev in Thread] Current Thread [Next in Thread]