emacs-diffs
[Top][All Lists]
Advanced

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

master b44505d6ec 3/5: Merge branch 'master' of git.savannah.gnu.org:/sr


From: Eli Zaretskii
Subject: master b44505d6ec 3/5: Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Date: Sat, 22 Jan 2022 02:07:42 -0500 (EST)

branch: master
commit b44505d6eca8b0029fff166090abf0d7f7e3ce27
Merge: 87107b05a1 643985e8b6
Author: Eli Zaretskii <eliz@gnu.org>
Commit: Eli Zaretskii <eliz@gnu.org>

    Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
---
 admin/emake           |  3 ++-
 lisp/cus-start.el     |  2 +-
 lisp/gnus/message.el  |  6 +++++-
 lisp/minibuffer.el    |  8 ++++++--
 lisp/url/url-queue.el | 17 +++++++++++------
 lisp/vc/diff-mode.el  |  3 +--
 src/gtkutil.c         | 12 +++++++++++-
 src/keyboard.c        |  4 +++-
 src/pgtkterm.c        | 16 +++++++++-------
 src/verbose.mk.in     | 32 ++++++++++++++++++++++++--------
 src/xterm.c           | 48 ------------------------------------------------
 11 files changed, 73 insertions(+), 78 deletions(-)

diff --git a/admin/emake b/admin/emake
index bfada1eb3e..6c778c85d4 100755
--- a/admin/emake
+++ b/admin/emake
@@ -79,8 +79,9 @@ The GNU allocators don't work|\
 ^git config |\
 ^'\.git/|\
 ^\^\(\(|\
+^ANCIENT=yes make|\
+^touch -t|\
 ^'build-aux/git-hooks\
-^ANCIENT=yes make\
 " | \
 while read
 do
diff --git a/lisp/cus-start.el b/lisp/cus-start.el
index 7f639240f5..afdbd82457 100644
--- a/lisp/cus-start.el
+++ b/lisp/cus-start.el
@@ -370,7 +370,7 @@ Leaving \"Default\" unchecked is equivalent with specifying 
a default of
             (auto-save-timeout auto-save (choice (const :tag "off" nil)
                                                  (integer :format "%v")))
             (echo-keystrokes minibuffer number)
-            (polling-period keyboard integer)
+            (polling-period keyboard float)
             (double-click-time mouse (restricted-sexp
                                       :match-alternatives (integerp 'nil 't)))
             (double-click-fuzz mouse integer "22.1")
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 3cd1b7eefe..a6c6a16653 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -4357,7 +4357,11 @@ it is left unchanged."
 (defun message-update-smtp-method-header ()
   "Insert an X-Message-SMTP-Method header according to `message-server-alist'."
   (unless (message-fetch-field "X-Message-SMTP-Method")
-    (let ((from (cadr (mail-extract-address-components (message-fetch-field 
"From"))))
+    (let ((from (cadr (mail-extract-address-components
+                       (save-restriction
+                         (widen)
+                         (message-narrow-to-headers-or-head)
+                         (message-fetch-field "From")))))
           method)
       (catch 'exit
         (dolist (server message-server-alist)
diff --git a/lisp/minibuffer.el b/lisp/minibuffer.el
index ab760a42d1..d58c23af8f 100644
--- a/lisp/minibuffer.el
+++ b/lisp/minibuffer.el
@@ -1004,7 +1004,9 @@ an association list that can specify properties such as:
 - `styles': the list of `completion-styles' to use for that category.
 - `cycle': the `completion-cycle-threshold' to use for that category.
 Categories are symbols such as `buffer' and `file', used when
-completing buffer and file names, respectively.")
+completing buffer and file names, respectively.
+
+Also see `completion-category-overrides'.")
 
 (defcustom completion-category-overrides nil
   "List of category-specific user overrides for completion styles.
@@ -1014,7 +1016,9 @@ an association list that can specify properties such as:
 - `cycle': the `completion-cycle-threshold' to use for that category.
 Categories are symbols such as `buffer' and `file', used when
 completing buffer and file names, respectively.
-This overrides the defaults specified in `completion-category-defaults'."
+
+If a property in a category is specified by this variable, it
+overrides the default specified in `completion-category-defaults'."
   :version "25.1"
   :type `(alist :key-type (choice :tag "Category"
                                  (const buffer)
diff --git a/lisp/url/url-queue.el b/lisp/url/url-queue.el
index 8741bca942..d353f0c011 100644
--- a/lisp/url/url-queue.el
+++ b/lisp/url/url-queue.el
@@ -155,14 +155,19 @@ The variable `url-queue-timeout' sets a timeout."
 (defun url-queue-start-retrieve (job)
   (setf (url-queue-buffer job)
        (ignore-errors
-          (with-current-buffer (if (buffer-live-p (url-queue-context-buffer 
job))
+          (with-current-buffer (if (buffer-live-p
+                                    (url-queue-context-buffer job))
                                    (url-queue-context-buffer job)
                                  (current-buffer))
-          (let ((url-request-noninteractive t))
-             (url-retrieve (url-queue-url job)
-                           #'url-queue-callback-function (list job)
-                           (url-queue-silentp job)
-                           (url-queue-inhibit-cookiesp job)))))))
+           (let ((url-request-noninteractive t)
+                  ;; This will disable querying the user for
+                  ;; credentials if one of the things we're fetching
+                  ;; in the background return a header requesting it.
+                  (url-request-extra-headers '(("Authorization" . ""))))
+              (url-retrieve (url-queue-url job)
+                            #'url-queue-callback-function (list job)
+                            (url-queue-silentp job)
+                            (url-queue-inhibit-cookiesp job)))))))
 
 (defun url-queue-prune-old-entries ()
   (let (dead-jobs)
diff --git a/lisp/vc/diff-mode.el b/lisp/vc/diff-mode.el
index ae2f545966..731d1e8256 100644
--- a/lisp/vc/diff-mode.el
+++ b/lisp/vc/diff-mode.el
@@ -2270,8 +2270,7 @@ Return new point, if it was moved."
 
 (defun diff--iterate-hunks (max fun)
   "Iterate over all hunks between point and MAX.
-Call FUN with two args (BEG and END) for each hunk.
-If INHIBIT-ERROR, ignore malformed hunks."
+Call FUN with two args (BEG and END) for each hunk."
   (save-excursion
     (catch 'malformed
       (let* ((beg (or (ignore-errors (diff-beginning-of-hunk))
diff --git a/src/gtkutil.c b/src/gtkutil.c
index 3cb8cd1533..eb14856062 100644
--- a/src/gtkutil.c
+++ b/src/gtkutil.c
@@ -4534,6 +4534,12 @@ xg_update_scrollbar_pos (struct frame *f,
           gtk_widget_show_all (wparent);
           gtk_widget_set_size_request (wscroll, width, height);
         }
+
+#if !defined HAVE_PGTK && GTK_CHECK_VERSION (2, 18, 0)
+       if (!gdk_window_ensure_native (gtk_widget_get_window (wscroll)))
+         emacs_abort ();
+#endif
+
       if (oldx != -1 && oldw > 0 && oldh > 0)
         {
           /* Clear under old scroll bar position.  */
@@ -4587,7 +4593,6 @@ xg_update_horizontal_scrollbar_pos (struct frame *f,
                                    int width,
                                    int height)
 {
-
   GtkWidget *wscroll = xg_get_widget_from_map (scrollbar_id);
 
   if (wscroll)
@@ -4634,6 +4639,11 @@ xg_update_horizontal_scrollbar_pos (struct frame *f,
         pgtk_clear_area (f, oldx, oldy, oldw, oldh);
 #endif
 
+#if !defined HAVE_PGTK && GTK_CHECK_VERSION (2, 18, 0)
+       if (!gdk_window_ensure_native (gtk_widget_get_window (wscroll)))
+         emacs_abort ();
+#endif
+
       /* GTK does not redraw until the main loop is entered again, but
          if there are no X events pending we will not enter it.  So we sync
          here to get some events.  */
diff --git a/src/keyboard.c b/src/keyboard.c
index 6f1614a7df..70e055a9df 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -1941,7 +1941,7 @@ start_polling (void)
         a different interval, start a new one.  */
       if (NUMBERP (Vpolling_period)
          && (poll_timer == NULL
-             || !Fequal (Vpolling_period, poll_timer_time)))
+             || NILP (Fequal (Vpolling_period, poll_timer_time))))
        {
          struct timespec interval = dtotimespec (XFLOATINT (Vpolling_period));
 
@@ -12082,8 +12082,10 @@ syms_of_keyboard (void)
   help_form_saved_window_configs = Qnil;
   staticpro (&help_form_saved_window_configs);
 
+#ifdef POLL_FOR_INPUT
   poll_timer_time = Qnil;
   staticpro (&poll_timer_time);
+#endif
 
   defsubr (&Scurrent_idle_time);
   defsubr (&Sevent_symbol_parse_modifiers);
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index 4c38ff5a59..8073f51c61 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -3734,6 +3734,9 @@ pgtk_flash (struct frame *f)
   block_input ();
 
   {
+    if (!FRAME_CR_CONTEXT (f))
+      return;
+
     cairo_surface_t *surface_orig = FRAME_CR_SURFACE (f);
 
     int width = FRAME_CR_SURFACE_DESIRED_WIDTH (f);
@@ -7041,13 +7044,12 @@ If set to a non-float value, there will be no wait at 
all.  */);
 }
 
 /* Cairo does not allow resizing a surface/context after it is
- * created, so we need to trash the old context, create a new context
- * on the next cr_clip_begin with the new dimensions and request a
- * re-draw.
- *
- * This Will leave the active context available to present on screen
- * until a redrawn frame is completed.
- */
+   created, so we need to trash the old context, create a new context
+   on the next cr_clip_begin with the new dimensions and request a
+   re-draw.
+
+   This will leave the active context available to present on screen
+   until a redrawn frame is completed.  */
 void
 pgtk_cr_update_surface_desired_size (struct frame *f, int width, int height, 
bool force)
 {
diff --git a/src/verbose.mk.in b/src/verbose.mk.in
index 01076df946..eb99e42695 100644
--- a/src/verbose.mk.in
+++ b/src/verbose.mk.in
@@ -33,29 +33,45 @@ AM_V_GLOBALS =
 AM_V_NO_PD =
 AM_V_RC =
 else
+
+# Whether $(info ...) works.  This is to work around a bug in GNU Make
+# 4.3 and earlier, which implements $(info MSG) via two system calls
+# { write (..., "MSG", 3); write (..., "\n", 1); }
+# which looks bad when make -j interleaves two of these at about the same time.
+#
+# Later versions of GNU Make have the 'notintermediate' feature,
+# so assume that $(info ...) works if this feature is present.
+#
+have_working_info = $(filter notintermediate,$(value .FEATURES))
+#
+# The workaround is to use the shell and 'echo' rather than $(info ...).
+# The workaround is done only for AM_V_ELC and AM_V_ELN,
+# since the bug is not annoying elsewhere.
+
 AM_V_AR      = @$(info $   AR       $@)
 AM_V_at = @
 AM_V_CC      = @$(info $   CC       $@)
 AM_V_CXX     = @$(info $   CXX      $@)
 AM_V_CCLD    = @$(info $   CCLD     $@)
 AM_V_CXXLD   = @$(info $   CXXLD    $@)
-ifeq ($(HAVE_NATIVE_COMP),yes)
-ifneq ($(NATIVE_DISABLED),1)
-ifneq ($(ANCIENT),yes)
+
+ifeq ($(HAVE_NATIVE_COMP)-$(NATIVE_DISABLED)-$(ANCIENT),yes--)
+ifdef have_working_info
 AM_V_ELC     = @$(info $   ELC+ELN  $@)
 AM_V_ELN     = @$(info $   ELN      $@)
 else
-AM_V_ELC     = @$(info $   ELC      $@)
-AM_V_ELN =
+AM_V_ELC     = @echo "  ELC+ELN " $@;
+AM_V_ELN     = @echo "  ELN     " $@;
 endif
 else
+ifdef have_working_info
 AM_V_ELC     = @$(info $   ELC      $@)
-AM_V_ELN =
-endif
 else
-AM_V_ELC     = @$(info $   ELC      $@)
+AM_V_ELC     = @echo "  ELC     " $@;
+endif
 AM_V_ELN =
 endif
+
 AM_V_GEN     = @$(info $   GEN      $@)
 AM_V_GLOBALS = @$(info $   GEN      globals.h)
 AM_V_NO_PD = --no-print-directory
diff --git a/src/xterm.c b/src/xterm.c
index 0f98cc7bec..81baeddbca 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -4650,38 +4650,6 @@ XTflash (struct frame *f)
   block_input ();
 
   {
-#ifdef USE_GTK
-    /* Use Gdk routines to draw.  This way, we won't draw over scroll bars
-       when the scroll bars and the edit widget share the same X window.  */
-    GdkWindow *window = gtk_widget_get_window (FRAME_GTK_WIDGET (f));
-#ifdef HAVE_GTK3
-#if GTK_CHECK_VERSION (3, 22, 0)
-    cairo_region_t *region = gdk_window_get_visible_region (window);
-    GdkDrawingContext *context = gdk_window_begin_draw_frame (window, region);
-    cairo_t *cr = gdk_drawing_context_get_cairo_context (context);
-#else
-    cairo_t *cr = gdk_cairo_create (window);
-#endif
-    cairo_set_source_rgb (cr, 1, 1, 1);
-    cairo_set_operator (cr, CAIRO_OPERATOR_DIFFERENCE);
-#define XFillRectangle(d, win, gc, x, y, w, h) \
-    do {                                       \
-      cairo_rectangle (cr, x, y, w, h);        \
-      cairo_fill (cr);                         \
-    }                                          \
-    while (false)
-#else /* ! HAVE_GTK3 */
-    GdkGCValues vals;
-    GdkGC *gc;
-    vals.foreground.pixel = (FRAME_FOREGROUND_PIXEL (f)
-                             ^ FRAME_BACKGROUND_PIXEL (f));
-    vals.function = GDK_XOR;
-    gc = gdk_gc_new_with_values (window,
-                                 &vals, GDK_GC_FUNCTION | GDK_GC_FOREGROUND);
-#define XFillRectangle(d, win, gc, x, y, w, h) \
-    gdk_draw_rectangle (window, gc, true, x, y, w, h)
-#endif /* ! HAVE_GTK3 */
-#else /* ! USE_GTK */
     GC gc;
 
     /* Create a GC that will use the GXxor function to flip foreground
@@ -4696,7 +4664,6 @@ XTflash (struct frame *f)
       gc = XCreateGC (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f),
                      GCFunction | GCForeground, &values);
     }
-#endif
     {
       /* Get the height not including a menu bar widget.  */
       int height = FRAME_PIXEL_HEIGHT (f);
@@ -4772,22 +4739,7 @@ XTflash (struct frame *f)
        XFillRectangle (FRAME_X_DISPLAY (f), FRAME_X_WINDOW (f), gc,
                        flash_left, FRAME_INTERNAL_BORDER_WIDTH (f),
                        width, height - 2 * FRAME_INTERNAL_BORDER_WIDTH (f));
-
-#ifdef USE_GTK
-#ifdef HAVE_GTK3
-#if GTK_CHECK_VERSION (3, 22, 0)
-      gdk_window_end_draw_frame (window, context);
-      cairo_region_destroy (region);
-#else
-      cairo_destroy (cr);
-#endif
-#else
-      g_object_unref (G_OBJECT (gc));
-#endif
-#undef XFillRectangle
-#else
       XFreeGC (FRAME_X_DISPLAY (f), gc);
-#endif
       x_flush (f);
     }
   }



reply via email to

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