Martin Rudalics [Mon, 24 Jan 2022 09:33:15 +0000 (10:33 +0100)]
Orderly inhibit frame resizing when activating tool or tab bar (Bug#52986)
* src/xdisp.c (redisplay_tab_bar, redisplay_tool_bar): If we do
not display a tool or tab bar in these functions, still set
f->tool/tab_bar_redisplayed and f->tool/tab_bar_resized. This
avoids that when one of these are initially turned off, a later
activation resizes the frame despite of the fact that
'frame-inhibit-implied-resize' should prevent it (Bug#52986).
* src/xterm.c (x_xr_ensure_picture): New function.
(FRAME_CR_CONTEXT, FRAME_CR_CONTEXT):
(FRAME_CR_SURFACE_DESIRED_WIDTH)
(FRAME_CR_SURFACE_DESIRED_HEIGHT): Move to separate USE_CAIRO
block so the ext data code can be used on builds with XRender as
well.
(x_xr_apply_ext_clip):
(x_xr_reset_ext_clip): New functions.
(x_set_clip_rectangles):
(x_reset_clip_rectangles): Set ext data on XRender as well.
(x_term_init): Look for a picture format appropriate for our
purposes.
(x_clear_area): Use XRenderFillRectangle to draw backgrounds if
available.
(x_xrender_color_from_gc_foreground):
(x_xrender_color_from_gc_background): New functions.
* src/xterm.h (FRAME_X_PICTURE):
(FRAME_X_PICTURE_FORMAT)
(FRAME_CHECK_XR_VERSION): New macros.
(struct x_gc_ext_data): Define on XRender as well.
(struct x_display_info): Define ext_codes when using XRender and
add new field `pict_format'.
(struct x_output): New field `picture'.
Alan Mackenzie [Mon, 24 Jan 2022 01:08:03 +0000 (01:08 +0000)]
Expunge read-with-symbol-position and read-symbol-positions-list
These are remnants of the old way of determining byte compiler warning
positions.
* src/lread.c (read_internal_start, read1): Remove initializations amd
manipulations of these variables.
(syms_of_lread): Remove the declarations of the variables.
* lisp/emacs-list/bytecomp.el (compile-defun, byte-compile-from-buffer):
Remove bindings of the variables.
* tabulated-list.el (tabulated-list-widen-current-column): Use correct
comparison operation when checking if point is within the column
bounds (bug#53375).
Allow using outline minor mode in `M-x apropos-value'
* lisp/apropos.el (apropos-mode): Set up outline minor mode
(bug#31094).
(apropos-value): Don't add "---" separators, because it doesn't
really seem to add anything much.
(apropos-value-internal): Escape newlines so that no values can be
confused for headings.
Alan Mackenzie [Sun, 23 Jan 2022 13:47:38 +0000 (13:47 +0000)]
Fix position argument to macroexp--warn-wrap in cconv--convert-funcbody
* lisp/emacs-lisp/cconv.el (cconv--convert-funcbody): Change the position
argument to macroexp--warn-wrap from BODY to ARG, to give correct positions in
warning messages.
Improve `M-x speedbar' under emacs -nw very slightly
* lisp/speedbar.el (speedbar-frame-mode): `M-x speedbar' doesn't
seem to do anything visible under -nw, so issue a message in that
case to tell the user how to proceed (bug#32597).
Po Lu [Sun, 23 Jan 2022 11:34:39 +0000 (19:34 +0800)]
Fix menus on the no-toolkit build when using XI2
* src/xmenu.c (x_activate_menubar):
(create_and_show_popup_menu): Only ungrab the device if it is
actually grabbed.
(x_menu_show): Release XI2 passive grab.
Alan Mackenzie [Sat, 22 Jan 2022 17:48:46 +0000 (17:48 +0000)]
Don't use 'load-read-function' in byte-compile-from-buffer
* lisp/emacs-lisp/bytecomp.el (byte-compile-from-buffer): Call
read-positioning-symbols directly, rather than binding load-read-function to
it. This is so that a lower level use of load-read-function will not return a
form containing symbols with position.
Michael Albinus [Sat, 22 Jan 2022 16:12:14 +0000 (17:12 +0100)]
Add direct remote copying in Tramp's scp support
* doc/misc/tramp.texi: Use @trampfn{} function where possible.
(Top, Configuration): Insert section 'Ssh setup' and remove
section 'Windows setup hints' in menu.
(Default Method): Mention tramp-use-scp-direct-remote-copying.
(Ssh setup): New node.
(Windows setup hints): Move it to that new node.
(Frequently Asked Questions): Move items about ssh config to that node.
* etc/NEWS: Add Tramp's direct remote copying feature. Fix typos.
* lisp/net/tramp-sh.el (tramp-use-scp-direct-remote-copying):
New defcustom.
(tramp-methods) <scp, scpx>: Add "%y" marker.
(tramp-scp-direct-remote-copying): New defun.
(tramp-do-copy-or-rename-file-out-of-band): Extend for direct
remote copying.
* lisp/net/tramp.el (tramp-methods): Extend docstring.
(tramp-password-prompt-not-unique): New defvar.
(tramp-read-passwd): Adapt docstring.
(tramp-read-passwd-without-cache): New defun.
(tramp-action-password): Call it.
* lisp/net/shr.el (shr-descend): Use a marker (because we may be
altering the text later for indentation), and mark the start, not
the end of the tag (bug#53409).
(shr-tag-a): Ditto.
Alan Mackenzie [Sat, 22 Jan 2022 09:59:05 +0000 (09:59 +0000)]
Miscellaneous amendments to the scratch/correct-warning-pos branch
* lisp/cedet/semantic/fw.el (semantic-alias-obsolete)
(semantic-varalias-obsolete): Replace calls to byte-compile-warn with calls to
byte-compile-warn-x (when it exists).
* lisp/emacs-lisp/bytecomp.el (byte-compile-log-warning-function)
(byte-compile--log-warning-for-byte-compile): Make the POSITION parameter no
longer &optional (for the benefit of flymake on *.el).
(byte-compile-log-warning): Replace a nil POSITION argument with an actual
position.
(byte-compile-file-form-require): Push the required symbol onto
byte-compile-form-stack, for the benefit of `do-after-load-evaluation'.
* lisp/keymap.el (define-keymap--compile): Replace four calls to
byte-compile-warn with byte-compile-warn-x.
* doc/lispref/elisp.texi (master menu): Add entries for Shorthands and Symbols
with position.
Eli Zaretskii [Sat, 22 Jan 2022 09:58:05 +0000 (11:58 +0200)]
Improve detection of suspicious uses of bidi controls
* lisp/international/textsec.el
(textsec-bidi-controls-suspicious-p): New function.
(textsec-name-suspicious-p): Use it.
* test/lisp/international/textsec-tests.el (test-suspicious-name):
Enable the test that was previously failing with
'bidi-find-overridden-directionality'.
Po Lu [Sat, 22 Jan 2022 02:25:06 +0000 (10:25 +0800)]
Fix recent changes to visible bell code
* src/gtkutil.c (xg_create_scroll_bar):
(xg_create_horizontal_scroll_bar): Stop ensuring an X window
before the widget is realized.
(xg_update_scrollbar_pos):
(xg_update_horizontal_scrollbar_pos): Ensure such a window here
instead.
Po Lu [Sat, 22 Jan 2022 02:12:18 +0000 (10:12 +0800)]
Clean up visible bell code on X
* src/gtkutil.c (xg_create_scroll_bar):
(xg_create_horizontal_scroll_bar): Ensure that the scroll bars
have their own X windows.
* src/xterm.c (XTflash): Remove use of GDK functions for
drawing.
Improve the completion-category-overrides doc string
* lisp/minibuffer.el (completion-category-overrides): Clarify what
this variable does (bug#22324).
(completion-category-defaults): Mention the overrides variable.
Jim Porter [Fri, 21 Jan 2022 03:51:39 +0000 (19:51 -0800)]
Don't use 'eshell-eval-using-options' for 'eshell/source' or 'eshell/.'
This makes 'source' and '.' in Eshell more compatible with regular
shells, which just treat the first argument as the file to source and
all subsequent arguments as arguments to that file.
* lisp/eshell/em-script.el (eshell/source, eshell/.): Don't use
'eshell-eval-using-options'.
Interpret a "" value of EMACS_TEST_VERBOSE as "off"
* doc/misc/ert.texi (Running Tests in Batch Mode): Adjust doc.
* lisp/emacs-lisp/ert.el (ert-run-tests-batch): Allow overriding
the EMACS_TEST_VERBOSE variable by setting it to "" (bug#53313).
Make the edebug-all-defs user option work more reliably
* lisp/emacs-lisp/edebug.el (edebug-all-defs): This user option
has no effect unless edebug is loaded (because that loads the
advice needed for the commands in question) (bug#53331).