Jonas Bernoulli [Sun, 24 Oct 2021 13:35:05 +0000 (15:35 +0200)]
; lisp/transient.el: Revert some misguided stylistic fixes.
These aren't actual modes. Set checkdoc-symbol-words to avoid
false-positives. The first line of doc-strings of methods do
not need to end with period.
Eli Zaretskii [Sun, 24 Oct 2021 17:19:47 +0000 (20:19 +0300)]
Fix compilation errors with MinGW64 GCC 11
* lib-src/ntlib.c (_GL_ATTRIBUTE_MALLOC)
(_GL_ATTRIBUTE_DEALLOC_FREE): Define to avoid compilation errors
with MinGW64 GCC 11. Suggested by Andy Moreton
<andrewjmoreton@gmail.com>. Do not merge to master.
Stefan Kangas [Sat, 23 Oct 2021 17:20:31 +0000 (19:20 +0200)]
Improve documentation of cl-reduce
* doc/misc/cl.texi (Mapping over Sequences): Change the
explanation of 'cl-reduce' so you don't need to have a major in
mathematics to understand it. (Bug#24014)
Stefan Kangas [Sat, 23 Oct 2021 16:42:14 +0000 (18:42 +0200)]
Improve documentation of apply-partially
* doc/lispref/functions.texi (Calling Functions): Improve
documentation of 'apply-partially' to be slightly more clear with
regards to function arity. (Bug#17623)
Stephen Gildea [Fri, 22 Oct 2021 15:38:17 +0000 (08:38 -0700)]
time-stamp-tests: improvements to test macros
test/lisp/time-stamp-tests.el: Update macro declarations.
(formatz-generate-tests): Don't nconc onto a constant list.
Tests now run 12% faster in batch mode.
Stephen Gildea [Fri, 22 Oct 2021 03:10:53 +0000 (20:10 -0700)]
Update doc of Edebug specification for macros
doc/lispref/edebug.texi: Update documentation of Edebug specification:
- Do not document "0" as a recommended shortcut for non-instrumented
arguments; nobody knows about nor uses this, so don't encourage it.
- Add an example equivalent to (declare (debug (&rest sexp))).
Juri Linkov [Thu, 21 Oct 2021 17:22:15 +0000 (20:22 +0300)]
* test/lisp/dabbrev-tests.el: Use 'kbd' for readable keys.
(dabbrev-expand-test, dabbrev-completion-test)
(dabbrev-completion-test-with-argument):
Use 'kbd' to format keys for 'execute-kbd-macro'.
(dabbrev-expand-test): Fix docstring.
Juri Linkov [Wed, 20 Oct 2021 17:54:57 +0000 (20:54 +0300)]
* lisp/help.el (help--analyze-key): Add new arg BUFFER (bug#51173).
* lisp/help.el (describe-key): Use BUFFER as arg for help--analyze-key.
(describe-key-briefly): Change arg UNTRANSLATED deprecated in 27.1
to BUFFER.
* lisp/gnus/gnus-art.el (gnus-article-describe-key)
(gnus-article-describe-key-briefly): Call describe-key and
describe-key-briefly with first arg as a cons with raw keys,
and the BUFFER arg set to the current buffer.
Juri Linkov [Wed, 20 Oct 2021 16:50:29 +0000 (19:50 +0300)]
* lisp/tab-bar.el (tab-bar-menu-bar): New command (bug#51247).
(tab-bar-format): Rename option 'tab-bar-format-menu-global' to
'tab-bar-format-menu-bar'.
(tab-bar-format-menu-bar): Rename from 'tab-bar-format-menu-global'.
Po Lu [Wed, 20 Oct 2021 07:55:10 +0000 (15:55 +0800)]
Display a tab bar item as sunken when appropriate
When the mouse pointer is pressed on the tab bar, moved out of the tab
bar, and moved back in, it would be more appropriate to behave like
other programs by displaying the item as sunken.
* src/xdisp.c (note_tab_bar_highlight): Display item as sunken if the
mouse pointer returns to the tab bar down.
* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process): Adapt tests.
(tramp--test-supports-set-file-modes-p): Renamed from
`tramp--test-supports-file-modes-p'. Adapt all callees.
(tramp-test35-exec-path): Use it.
Michael Albinus [Tue, 19 Oct 2021 16:50:12 +0000 (18:50 +0200)]
Code cleanup in tramp-tests.el
* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process): Extend tests.
(tramp--test-out-of-band-p): New defun.
(tramp--test-windows-nt-and-out-of-band-p)
(tramp-test42-utf8-with-stat, tramp-test42-utf8-with-perl)
(tramp-test42-utf8-with-ls): Use it.
(tramp--test-windows-nt-or-smb-p): Use `tramp--test-windows-nt-p'.
Robert Pluim [Mon, 18 Oct 2021 09:51:10 +0000 (11:51 +0200)]
Handle VS-16 correctly for non-emoji codepoints
* admin/unidata/blocks.awk: Remove emoji overrides for codepoints with
Emoji_Presentation = No, they're no longer necessary.
* lisp/composite.el: Remove #xFE0F (VS-16) from the range handled by
`compose-gstring-for-variation-glyph' so it can be handled by
`font_range'.
* src/composite.c (syms_of_composite): New variable
`auto-composition-emoji-eligible-codepoints'.
* admin/unidata/emoji-zwj.awk: Generate value for
`auto-composition-emoji-eligible-codepoints'. Add
`composition-function-table' entries for 'codepoint + U+FE0F' for
them.
* src/font.c (codepoint_is_emoji_eligible): New function to check if
we should try to use the emoji font for a codepoint.
(font_range): Use it.
Tassilo Horn [Tue, 19 Oct 2021 05:05:18 +0000 (07:05 +0200)]
Adjust bug-reference-bug-regexp default values to match only at beg of word
Previously, the "bug 1" in "(debug 1)" has also been highlighted.
* lisp/progmodes/bug-reference.el (bug-reference-bug-regexp)
(bug-reference--setup-from-vc-alist,bug-reference-setup-from-mail-alist)
(bug-reference-setup-from-irc-alist): Adjust bug-reference-bug-regexp
default values to match only at the beginning of a word.
Michael Albinus [Mon, 18 Oct 2021 17:54:13 +0000 (19:54 +0200)]
Fix some Tramp problems
* lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist):
Use `tramp-adb-handle-file-executable-p' and
`tramp-adb-handle-file-readable-p'.
(tramp-adb-handle-file-executable-p)
(tramp-adb-handle-file-readable-p): New defuns.
(tramp-adb-handle-file-writable-p): Simplify.
(tramp-adb-handle-make-process): Handle :filter being t.
(tramp-adb-find-test-command): Remove.
* lisp/net/tramp-sh.el (tramp-sh-handle-file-readable-p):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-handle-file-readable-p):
* lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist):
Use `tramp-handle-file-readable-p'.
(tramp-gvfs-handle-file-executable-p): Do not check whether file
exists, this is done in `tramp-check-cached-permissions'.
(tramp-gvfs-handle-file-readable-p): Remove.
* lisp/net/tramp.el (tramp-error): Move binding of `inhibit-message' ...
(tramp-signal-hook-function): ... here.
(tramp-handle-access-file): Rewrite.
(tramp-handle-file-readable-p): New defun.
(tramp-handle-make-process): Setting :filter to t works since
Emacs 29.1 only.
Martin Rudalics [Mon, 18 Oct 2021 07:58:48 +0000 (09:58 +0200)]
Rewrites of Elisp manual including tab-bar and tab-line changes
* doc/lispref/buffers.texi (Current Buffer, Buffer List): Update
references to 'selected-window'.
* doc/lispref/elisp.texi (Top): Move up Selecting Windows section
in front of Window Sizes section.
* doc/lispref/frames.texi (Creating Frames): Say window system
instead of windowing system.
(Frame Layout): Add Tab Bar to layout.
(Layout Parameters): Add 'tab-bar-lines'.
(Input Focus): Say window system window instead of window
manager window. Fix reference to 'selected-window'.
* doc/lispref/objects.texi (Window Type): Minor rewrite.
* doc/lispref/windows.texi (Basic Windows): Rewrite. Settle on
term 'window system window' for disambiguation with our windows.
Move 'selected-window' description to Selecting Windows section.
Move schematic of window structure here. Use 'decorations' for
objects outside the window body. Say that the areas reserved
for continuation and truncation glyphs, vertical dividers and
line numbers are part of the window body.
(Windows and Frames): Minor rewrite, adding and fixing some
cross references. Move live window schematic to 'Basic Windows'
section.
(Selecting Windows): Move section in front of Window Sizes
section. Move description of 'selected-window' here. Move up
description of 'frame-selected-window' and
'set-frame-selected-window'. Update and move description of
'window-bump-use-time' here.
(Window Sizes): Throughout use the term 'decorations' instead of
enumerating them individually. Add 'window-tab-line-height'
description.
(Resizing Windows): Again use the term 'decorations' instead of
enumerating them individually.
(Splitting Windows): Minor fix.
(Cyclic Window Ordering): Improve descriptions of 'get-lru-window'
and 'get-mru-window'. Move 'window-bump-use-time' to Selecting
Windows section.
(Coordinates and Windows, Window Configurations): Once more use
the term 'decorations' instead of enumerating them individually.
* src/window.c (Fwindow_bump_use_time): Move after
'window-use-time'. Make it work for live windows only. Make
WINDOW argument optional. Update doc-string.
Martin Rudalics [Sun, 17 Oct 2021 17:48:45 +0000 (20:48 +0300)]
Add tab-bar-drag-maybe for indication of tab dragging (bug#50993)
* lisp/tab-bar.el (tab-bar--event-to-item)
(tab-bar-mouse-move-tab): Set tab-bar-drag-maybe to nil.
(tab-bar-mouse-down-1): Set tab-bar-drag-maybe to t.
* src/xdisp.c (note_mouse_highlight): Set cursor to 'hand_cursor'
when tab_bar_drag_maybe is true.
(syms_of_xdisp): New variable tab-bar-drag-maybe.
Juri Linkov [Sun, 17 Oct 2021 17:27:16 +0000 (20:27 +0300)]
* lisp/tab-bar.el: Add a new tab on [mouse-1] instead of [down-mouse-1]
* lisp/tab-bar.el (tab-bar-mouse-down-1): Rename from
tab-bar-mouse-select-tab. Ignore 'add-tab'.
(tab-bar-mouse-1): Rename from tab-bar-mouse-close-tab-from-button.
Use binding of 'add-tab'.
(tab-bar-map): Rebind [down-mouse-1] from tab-bar-mouse-select-tab to
tab-bar-mouse-down-1, and [mouse-1] from tab-bar-mouse-close-tab-from-button
to tab-bar-mouse-1 (bug#51246).
Po Lu [Fri, 15 Oct 2021 18:02:54 +0000 (19:02 +0100)]
Add tab bar support to the nextstep port
* src/nsfns.m (ns_change_tab_bar_height): New function.
(ns_set_tab_bar_lines): Check tab bar height and set tab bar
accordingly.
* src/nsterm.m (ns_clear_under_internal_border): Clear internal border
correctly when there is a tab bar.
(ns_create_terminal): Add ns_change_tab_bar_height.
(mouseDown): Handle tab bar mouse click events.
Alan Third [Mon, 4 Oct 2021 21:35:41 +0000 (22:35 +0100)]
Fix potential buffer overflow (bug#50767)
* src/image.c (svg_load_image): Check how many bytes were actually
written to the buffer. Don't check xmalloc return value as xmalloc
doesn't return if it fails.
Stefan Kangas [Sun, 17 Oct 2021 01:00:10 +0000 (03:00 +0200)]
Fix a semantic test on some macOS machines
* test/lisp/cedet/semantic/bovine/gcc-tests.el
(semantic-gcc-test-output-parser-this-machine): Fix test on some macOS
machines where running "gcc" runs "llvm" instead.
Eli Zaretskii [Sat, 16 Oct 2021 11:47:32 +0000 (14:47 +0300)]
Avoid aborts when a thread is signaled while "waiting for input".
* src/process.c (kbd_is_ours): New function.
(wait_reading_process_output): Set 'waiting_for_input' only if the
current thread is monitoring the keyboard descriptor. See also
https://lists.gnu.org/archive/html/emacs-devel/2021-10/msg01180.html.
(Bug#51229)
Stefan Kangas [Fri, 15 Oct 2021 18:22:11 +0000 (20:22 +0200)]
Prefer "graphical displays" to "X terminals" in documentation
* doc/lispref/objects.texi (Ctl-Char Syntax): Fix incorrect remark;
some text terminals can generate ASCII control characters.
(Other Char Bits):
* lisp/bindings.el:
* lisp/gnus/gnus-undo.el (gnus-undo-mode-map): Say "graphical display"
and "GUI display" instead of "X terminal"; the latter term is
archaic. (Bug#51217)
Michael Albinus [Fri, 15 Oct 2021 14:29:11 +0000 (16:29 +0200)]
Precise documentation of file-notify-add-watch
* doc/lispref/os.texi (File Notifications):
* lisp/filenotify.el (file-notify-add-watch): Precise, that
watching a directory includes reports on file changes for some
backends. (Bug#51146)
Martin Rudalics [Fri, 15 Oct 2021 08:21:05 +0000 (10:21 +0200)]
Fixes to account for windows' tab lines
* doc/lispref/display.texi (Size of Displayed Text): Fix entry
on 'window-text-pixel-size'.
* lisp/window.el (window--dump-window): Dump tab-line-height and
scroll-bar-height too.
(window--min-size-1): Take 'window-tab-line-height' into account.
* src/xdisp.c (Fwindow_text_pixel_size): Fix doc-string of
'window-text-pixel-size'. Rename last argument to 'MODE-LINES'.
Michael Albinus [Thu, 14 Oct 2021 12:32:47 +0000 (14:32 +0200)]
Accept process-filter t in Tramp
* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-adb.el (tramp-adb-handle-make-process):
* lisp/net/tramp-sh.el (tramp-sh-handle-make-process): Filter can be t.
* test/lisp/net/tramp-tests.el (tramp-test29-start-file-process)
(tramp-test30-make-process): Test filter equal t.