emacs-diffs
[Top][All Lists]
Advanced

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

master a6dea09: Merge from origin/emacs-28


From: Glenn Morris
Subject: master a6dea09: Merge from origin/emacs-28
Date: Thu, 14 Oct 2021 11:20:34 -0400 (EDT)

branch: master
commit a6dea09a15549d4091d6a4f2e764074195847276
Merge: 64f9fdc 9ff6999
Author: Glenn Morris <rgm@gnu.org>
Commit: Glenn Morris <rgm@gnu.org>

    Merge from origin/emacs-28
    
    9ff6999a06 (origin/emacs-28) Accept process-filter t in Tramp
    cf95962092 ; * doc/lispref/processes.texi (Filter Functions): Fix las...
    1ad4ad0c11 Document the t value for set-process-filter in the manual
    b014efa1e5 * doc/misc/tramp.texi (Frequently Asked Questions): Add re...
    b9b78b2631 Fix Help functions for clicks on tool bar and tab bar
    74deafe921 ; * etc/DEBUG: Add a section about debugging native-compil...
    8153f70b9c In make_lispy_position fix Bug#50993 in rudimentary fashion
    0aa52e94f3 Mark vc-switch-backend as obsolete
    568e479c59 Add missing parentheses in the Emacs manual
    44ce50b0df Improve tooltip of mode-line-position again
    9b1adf8b4f Use browse-url-button-regexp for rcirc-url-regexp
    9ed53b022d * lisp/help.el (help--analyze-key): Avoid mouse-set-point ...
    
    # Conflicts:
    #   etc/NEWS
---
 doc/emacs/maintaining.texi   |  4 ++--
 doc/lispref/processes.texi   |  9 ++++++---
 doc/misc/tramp.texi          |  8 +++++---
 etc/DEBUG                    | 31 ++++++++++++++++++++++---------
 etc/NEWS.28                  |  4 ++++
 lisp/bindings.el             |  2 +-
 lisp/help.el                 |  8 +++++---
 lisp/mouse.el                |  3 ++-
 lisp/net/rcirc.el            | 21 +++------------------
 lisp/net/tramp-adb.el        |  2 +-
 lisp/net/tramp-sh.el         |  2 +-
 lisp/net/tramp.el            |  2 +-
 lisp/vc/vc.el                | 13 +++++++++----
 src/keyboard.c               | 15 ++++++++++++++-
 test/lisp/net/tramp-tests.el | 40 ++++++++++++++++++++++++++++++++++++++++
 15 files changed, 116 insertions(+), 48 deletions(-)

diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi
index d1380bc..5b66031 100644
--- a/doc/emacs/maintaining.texi
+++ b/doc/emacs/maintaining.texi
@@ -2283,12 +2283,12 @@ the match with @var{replacement}.  @xref{Identifier 
Search}.
 @item g
 @findex xref-revert-buffer
 Refresh the contents of the @file{*xref*} buffer
-(@code{xref-revert-buffer}.
+(@code{xref-revert-buffer}).
 
 @item M-,
 @findex xref-quit-and-pop-marker-stack
 Quit the window showing the @file{*xref*} buffer, and then jump to the
-previous Xref stack location (@code{xref-quit-and-pop-marker-stack}.
+previous Xref stack location (@code{xref-quit-and-pop-marker-stack}).
 
 @item q
 @findex xref-quit
diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi
index d90097d..8a9cb2a 100644
--- a/doc/lispref/processes.texi
+++ b/doc/lispref/processes.texi
@@ -1779,9 +1779,12 @@ or more batches of output; one way to do this is to 
insert the
 received text into a temporary buffer, which can then be searched.
 
 @defun set-process-filter process filter
-This function gives @var{process} the filter function @var{filter}.  If
-@var{filter} is @code{nil}, it gives the process the default filter,
-which inserts the process output into the process buffer.
+This function gives @var{process} the filter function @var{filter}.
+If @var{filter} is @code{nil}, it gives the process the default
+filter, which inserts the process output into the process buffer.  If
+@var{filter} is @code{t}, Emacs stops accepting output from the
+process, unless it's a network server process that listens for
+incoming connections.
 @end defun
 
 @defun process-filter process
diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi
index 5fdd9a4..8cc3eaf 100644
--- a/doc/misc/tramp.texi
+++ b/doc/misc/tramp.texi
@@ -5193,11 +5193,13 @@ tramp-compat-with-mutex}
 @value{tramp} comes with compatibility code for different Emacs
 versions.  When you see such a message (the text might differ), you
 don't use the Emacs built-in version of @value{tramp}.  In case you
-have installed @value{tramp} from GNU ELPA, see the package README
-file for instructions how to recompile it.
+have installed @value{tramp} from GNU ELPA,
 @ifset installchapter
-@xref{Recompilation}.
+@xref{ELPA Installation}.
 @end ifset
+@ifclear installchapter
+see the package README file for instructions how to recompile it.
+@end ifclear
 
 
 @item
diff --git a/etc/DEBUG b/etc/DEBUG
index fae8726..a1c0634 100644
--- a/etc/DEBUG
+++ b/etc/DEBUG
@@ -573,6 +573,28 @@ debugging did not (yet) happen.  Here are some useful 
techniques for that:
    GET_FROM_IMAGE for displaying an image, etc.  See 'enum it_method' in
    dispextern.h for the full list of values.
 
+** Debugging problems with native-compiled Lisp.
+
+When you encounter problems specific to native-compilation of Lisp, we
+recommend to follow the procedure below to try to identify the cause:
+
+ . Reduce the problematic .el file to the minimum by bisection, and
+   try identifying the function that causes the problem.
+
+ . Reduce the problematic function to the minimal code that still
+   reproduces the problem.
+
+ . Study the problem's artifacts, like Lisp or C backtraces, to try
+   identifying the cause of the problem.
+
+If you cannot figure out the cause for the problem using the above,
+native-compile the problematic file after setting the variable
+'comp-libgccjit-reproducer' to a non-nil value.  That should produce a
+file names ELNFILENAME_libgccjit_repro.c, where ELNFILENAME is the
+name of the problematic .eln file, in the same directory where the
+.eln file is produced.  Then attach that reproducer C file to your bug
+report.
+
 ** Following longjmp call.
 
 Recent versions of glibc (2.4+?) encrypt stored values for setjmp/longjmp which
@@ -875,15 +897,6 @@ It is also useful to look at the corrupted object or data 
structure in
 a fresh Emacs session and compare its contents with a session that you
 are debugging.
 
-** Debugging problems with non-ASCII characters
-
-If you experience problems which seem to be related to non-ASCII
-characters, such as \201 characters appearing in the buffer or in your
-files, set the variable byte-debug-flag to t.  This causes Emacs to do
-some extra checks, such as look for broken relations between byte and
-character positions in buffers and strings; the resulting diagnostics
-might pinpoint the cause of the problem.
-
 ** Debugging the TTY (non-windowed) version
 
 The most convenient method of debugging the character-terminal display
diff --git a/etc/NEWS.28 b/etc/NEWS.28
index 791248f..b7c4346 100644
--- a/etc/NEWS.28
+++ b/etc/NEWS.28
@@ -1937,6 +1937,10 @@ tags to be considered as well.
 *** New user option 'vc-git-log-switches'.
 String or list of strings specifying switches for Git log under VC.
 
+*** Command 'vc-switch-backend' is now obsolete.
+If you are still using it with any regularity, please file a bug
+report with some details.
+
 ** Gnus
 
 +++
diff --git a/lisp/bindings.el b/lisp/bindings.el
index e397e44..2c45710 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -505,7 +505,7 @@ mouse-1: Display Line and Column Mode Menu"))
      local-map ,mode-line-column-line-number-mode-map
      mouse-face mode-line-highlight
      ;; XXX needs better description
-     help-echo "Buffer Position
+     help-echo "Window Scroll Percentage
 mouse-1: Display Line and Column Mode Menu")
     (size-indication-mode
      (8 ,(propertize
diff --git a/lisp/help.el b/lisp/help.el
index fa4eaee..9666ef9 100644
--- a/lisp/help.el
+++ b/lisp/help.el
@@ -695,11 +695,13 @@ Returns a list of the form (BRIEF-DESC DEFN EVENT 
MOUSE-MSG)."
         (mouse-msg (if (or (memq 'click modifiers) (memq 'down modifiers)
                            (memq 'drag modifiers))
                         " at that spot" ""))
-         ;; Use mouse-set-point to handle the case when a menu item
+         ;; Use `mouse-set-point' to handle the case when a menu item
          ;; is selected from the context menu that should describe KEY
          ;; at the position of mouse click that opened the context menu.
-         ;; When no mouse was involved, it defaults to window-point.
-        (defn (save-excursion (mouse-set-point event) (key-binding key t))))
+         ;; When no mouse was involved, don't use `mouse-set-point'.
+         (defn (if (consp event)
+                   (save-excursion (mouse-set-point event) (key-binding key t))
+                 (key-binding key t))))
     ;; Handle the case where we faked an entry in "Select and Paste" menu.
     (when (and (eq defn nil)
               (stringp (aref key (1- (length key))))
diff --git a/lisp/mouse.el b/lisp/mouse.el
index 1cbdaaf..1036f10 100644
--- a/lisp/mouse.el
+++ b/lisp/mouse.el
@@ -571,7 +571,8 @@ This is the keyboard interface to \\[context-menu-map]."
 
 (defun mouse-minibuffer-check (event)
   (let ((w (posn-window (event-start event))))
-    (and (window-minibuffer-p w)
+    (and (windowp w)
+         (window-minibuffer-p w)
         (not (minibuffer-window-active-p w))
         (user-error "Minibuffer window is not active")))
   ;; Give temporary modes such as isearch a chance to turn off.
diff --git a/lisp/net/rcirc.el b/lisp/net/rcirc.el
index c18748a..52d74a3 100644
--- a/lisp/net/rcirc.el
+++ b/lisp/net/rcirc.el
@@ -2827,24 +2827,9 @@ keywords when no KEYWORD is given."
     string))
 
 (defvar rcirc-url-regexp
-  (concat
-   "\\b\\(\\(www\\.\\|\\(s?https?\\|ftp\\|file\\|gopher\\|"
-   "nntp\\|news\\|telnet\\|wais\\|mailto\\|info\\):\\)"
-   "\\(//[-a-z0-9_.]+:[0-9]*\\)?"
-   (if (string-match "[[:digit:]]" "1") ;; Support POSIX?
-       (let ((chars "-a-z0-9_=#$@~%&*+\\/[:word:]")
-            (punct "!?:;.,"))
-        (concat
-         "\\(?:"
-         ;; Match paired parentheses, e.g. in Wikipedia URLs:
-         "[" chars punct "]+" "(" "[" chars punct "]+" ")" "[" chars "]"
-         "\\|"
-         "[" chars punct     "]+" "[" chars "]"
-         "\\)"))
-     (concat ;; XEmacs 21.4 doesn't support POSIX.
-      "\\([-a-z0-9_=!?#$@~%&*+\\/:;.,]\\|\\w\\)+"
-      "\\([-a-z0-9_=#$@~%&*+\\/]\\|\\w\\)"))
-   "\\)")
+  (eval-when-compile
+    (require 'browse-url)
+    browse-url-button-regexp)
   "Regexp matching URLs.  Set to nil to disable URL features in rcirc.")
 
 ;; cf cl-remove-if-not
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 63ffb2d..6d8bed1 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -947,7 +947,7 @@ implementation will be used."
            (setq connection-type 'pty))
          (unless (memq connection-type '(nil pipe pty))
            (signal 'wrong-type-argument (list #'symbolp connection-type)))
-         (unless (or (null filter) (functionp filter))
+         (unless (or (null filter) (eq filter t) (functionp filter))
            (signal 'wrong-type-argument (list #'functionp filter)))
          (unless (or (null sentinel) (functionp sentinel))
            (signal 'wrong-type-argument (list #'functionp sentinel)))
diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el
index 8fa53cb..6984dd8 100644
--- a/lisp/net/tramp-sh.el
+++ b/lisp/net/tramp-sh.el
@@ -2785,7 +2785,7 @@ implementation will be used."
            (setq connection-type 'pty))
          (unless (memq connection-type '(nil pipe pty))
            (signal 'wrong-type-argument (list #'symbolp connection-type)))
-         (unless (or (null filter) (functionp filter))
+         (unless (or (null filter) (eq filter t) (functionp filter))
            (signal 'wrong-type-argument (list #'functionp filter)))
          (unless (or (null sentinel) (functionp sentinel))
            (signal 'wrong-type-argument (list #'functionp sentinel)))
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index a8ae71b..318b4e4 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -4141,7 +4141,7 @@ substitution.  SPEC-LIST is a list of char/value pairs 
used for
          (setq connection-type 'pty))
        (unless (memq connection-type '(nil pipe pty))
          (signal 'wrong-type-argument (list #'symbolp connection-type)))
-       (unless (or (null filter) (functionp filter))
+       (unless (or (null filter) (eq filter t) (functionp filter))
          (signal 'wrong-type-argument (list #'functionp filter)))
        (unless (or (null sentinel) (functionp sentinel))
          (signal 'wrong-type-argument (list #'functionp sentinel)))
diff --git a/lisp/vc/vc.el b/lisp/vc/vc.el
index edc4169..927a241 100644
--- a/lisp/vc/vc.el
+++ b/lisp/vc/vc.el
@@ -2861,6 +2861,7 @@ permanent, only for the current session.  This function 
only changes
 VC's perspective on FILE, it does not register or unregister it.
 By default, this command cycles through the registered backends.
 To get a prompt, use a prefix argument."
+  (declare (obsolete nil "28.1"))
   (interactive
    (list
     (or buffer-file-name
@@ -2915,7 +2916,8 @@ backend to NEW-BACKEND, and unregister FILE from the 
current backend.
     (if registered
        (set-file-modes file (logior (file-modes file) 128))
       ;; `registered' might have switched under us.
-      (vc-switch-backend file old-backend)
+      (with-suppressed-warnings ((obsolete vc-switch-backend))
+        (vc-switch-backend file old-backend))
       (let* ((rev (vc-working-revision file))
             (modified-file (and edited (make-temp-file file)))
             (unmodified-file (and modified-file (vc-version-backup-file 
file))))
@@ -2934,16 +2936,19 @@ backend to NEW-BACKEND, and unregister FILE from the 
current backend.
                    (vc-revert-file file))))
              (vc-call-backend new-backend 'receive-file file rev))
          (when modified-file
-           (vc-switch-backend file new-backend)
+            (with-suppressed-warnings ((obsolete vc-switch-backend))
+              (vc-switch-backend file new-backend))
            (unless (eq (vc-checkout-model new-backend (list file)) 'implicit)
              (vc-checkout file))
            (rename-file modified-file file 'ok-if-already-exists)
            (vc-file-setprop file 'vc-checkout-time nil)))))
     (when move
-      (vc-switch-backend file old-backend)
+      (with-suppressed-warnings ((obsolete vc-switch-backend))
+        (vc-switch-backend file old-backend))
       (setq comment (vc-call-backend old-backend 'comment-history file))
       (vc-call-backend old-backend 'unregister file))
-    (vc-switch-backend file new-backend)
+    (with-suppressed-warnings ((obsolete vc-switch-backend))
+      (vc-switch-backend file new-backend))
     (when (or move edited)
       (vc-file-setprop file 'vc-state 'edited)
       (vc-mode-line file new-backend)
diff --git a/src/keyboard.c b/src/keyboard.c
index ce3b900..be9fad3 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -5110,7 +5110,20 @@ make_lispy_position (struct frame *f, Lisp_Object x, 
Lisp_Object y,
 #endif
       )
     {
-      posn = EQ (window_or_frame, f->tab_bar_window) ? Qtab_bar : Qtool_bar;
+      /* FIXME: While track_mouse is non-nil, we do not report this
+        event as something that happened on the tool or tab bar since
+        that would break mouse dragging operations that originate from
+        an ordinary window beneath and expect the window to auto-scroll
+        as soon as the mouse cursor appears above or beneath it
+        (Bug#50993).  Since this "fix" might break track_mouse based
+        operations originating from the tool or tab bar itself, such
+        operations should set track_mouse to some special value that
+        would be recognized by the following check.
+
+        This issue should be properly handled by 'mouse-drag-track' and
+        friends, so the below is only a temporary workaround.  */
+      if (NILP (track_mouse))
+       posn = EQ (window_or_frame, f->tab_bar_window) ? Qtab_bar : Qtool_bar;
       /* Kludge alert: for mouse events on the tab bar and tool bar,
         keyboard.c wants the frame, not the special-purpose window
         we use to display those, and it wants frame-relative
diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el
index ebedbaf..da15401 100644
--- a/test/lisp/net/tramp-tests.el
+++ b/test/lisp/net/tramp-tests.el
@@ -4562,6 +4562,24 @@ This tests also `make-symbolic-link', `file-truename' 
and `add-name-to-file'."
        ;; Cleanup.
        (ignore-errors (delete-process proc)))
 
+      (unwind-protect
+         (with-temp-buffer
+           (setq proc (start-file-process "test3" (current-buffer) "cat"))
+           (should (processp proc))
+           (should (equal (process-status proc) 'run))
+           (set-process-filter proc t)
+           (process-send-string proc "foo\n")
+           (process-send-eof proc)
+           ;; Read output.
+           (with-timeout (10 (tramp--test-timeout-handler))
+             (while (process-live-p proc)
+               (while (accept-process-output proc 0 nil t))))
+           ;; No output due to process filter.
+           (should (= (point-min) (point-max))))
+
+       ;; Cleanup.
+       (ignore-errors (delete-process proc)))
+
       ;; Process connection type.
       (when (and (tramp--test-sh-p)
                 (not (tramp-direct-async-process-p))
@@ -4735,6 +4753,28 @@ If UNSTABLE is non-nil, the test is tagged as 
`:unstable'."
        ;; Cleanup.
        (ignore-errors (delete-process proc)))
 
+      (unwind-protect
+         (with-temp-buffer
+           (setq proc
+                 (with-no-warnings
+                   (make-process
+                    :name "test3" :buffer (current-buffer) :command '("cat")
+                    :filter t
+                    :file-handler t)))
+           (should (processp proc))
+           (should (equal (process-status proc) 'run))
+           (process-send-string proc "foo\n")
+           (process-send-eof proc)
+           ;; Read output.
+           (with-timeout (10 (tramp--test-timeout-handler))
+             (while (process-live-p proc)
+               (while (accept-process-output proc 0 nil t))))
+           ;; No output due to process filter.
+           (should (= (point-min) (point-max))))
+
+       ;; Cleanup.
+       (ignore-errors (delete-process proc)))
+
       ;; Process sentinel.
       (unwind-protect
          (with-temp-buffer



reply via email to

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