1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2024-12-04 08:47:11 +00:00

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
This commit is contained in:
Glenn Morris 2021-10-14 07:50:29 -07:00
commit a6dea09a15
15 changed files with 116 additions and 48 deletions

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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
+++

View File

@ -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

View File

@ -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))))

View File

@ -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.

View File

@ -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

View File

@ -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)))

View File

@ -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)))

View File

@ -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)))

View File

@ -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)

View File

@ -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

View File

@ -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