]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoFix "C-x C-d" with wildcard arguments
Eli Zaretskii [Sun, 12 Jun 2022 10:03:32 +0000 (13:03 +0300)]
Fix "C-x C-d" with wildcard arguments

* lisp/files.el (list-directory): Make sure 'default-directory' is
set to a valid value if the argument DIRNAME included wildcards.
(Bug#55877)

2 years agoFix phantom drag-and-drop targets showing up in some programs
Po Lu [Sun, 12 Jun 2022 08:41:40 +0000 (16:41 +0800)]
Fix phantom drag-and-drop targets showing up in some programs

* src/xterm.c (x_dnd_cleanup_drag_and_drop)
(x_dnd_begin_drag_and_drop): Delete XdndTypeList if it was set
after the DND operation completes.  Some programs apparently
think its presence on the drag source means there are more than
3 targets.

2 years agobindat (str, strz): Reject non-ASCII, non-`eight-bit' characters
Richard Hansen [Sun, 12 Jun 2022 05:19:43 +0000 (01:19 -0400)]
bindat (str, strz): Reject non-ASCII, non-`eight-bit' characters

* lisp/emacs-lisp/bindat.el (str) (strz): Signal an error if the user
attempts to pack a multibyte string containing characters other than
ASCII and `eight-bit' characters (bug#55897).
* doc/lispref/processes.texi (Bindat Types): Update documentation.
* test/lisp/emacs-lisp/bindat-tests.el (str) (strz): Add tests.

2 years agoDon't repetitively initialize type lists during DND
Po Lu [Sun, 12 Jun 2022 05:45:18 +0000 (13:45 +0800)]
Don't repetitively initialize type lists during DND

* src/xterm.c (x_dnd_send_enter): Only set XdndTypeList once.
(x_dnd_begin_drag_and_drop): Clear type list flag.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sun, 12 Jun 2022 04:30:25 +0000 (06:30 +0200)]
Merge from origin/emacs-28

cbd2c87a5d ; Fix last change in whitespace.el.
52ad2b53cb Fix doc strings in whitespace.el

2 years ago* lisp/emacs-lisp/find-func.el (find-function-advised-original): Simplify
Stefan Monnier [Sun, 12 Jun 2022 03:50:35 +0000 (23:50 -0400)]
* lisp/emacs-lisp/find-func.el (find-function-advised-original): Simplify

2 years agoUse cached monitor info during DND if available
Po Lu [Sun, 12 Jun 2022 02:17:19 +0000 (10:17 +0800)]
Use cached monitor info during DND if available

* src/xterm.c (x_dnd_begin_drag_and_drop): Use previously cached
monitor attributes if they exist.

2 years ago* src/nsfns.m (ns_move_tooltip_to_mouse_location): Handle invisible frames.
Po Lu [Sun, 12 Jun 2022 02:13:04 +0000 (10:13 +0800)]
* src/nsfns.m (ns_move_tooltip_to_mouse_location): Handle invisible frames.

2 years agoDon't rely on XdndAware on frames for dropping to work
Po Lu [Sun, 12 Jun 2022 01:32:30 +0000 (09:32 +0800)]
Don't rely on XdndAware on frames for dropping to work

* src/xterm.c (x_dnd_get_target_window): New parameter
WAS_FRAME.  If toplevel is a frame, set it and clear proto and
motif.
(x_dnd_send_enter, x_dnd_send_position, x_dnd_send_leave)
(x_dnd_send_drop): Remove special-cased self dropping code.
(x_dnd_note_self_position, x_dnd_note_self_drop): New functions.

(x_dnd_begin_drag_and_drop, x_dnd_update_state):
(handle_one_xevent): Handle our own frames using those functions
instead.

2 years ago* src/fns.c (internal_equal): Use BASE_EQ where possible.
Mattias Engdegård [Sat, 11 Jun 2022 16:44:37 +0000 (18:44 +0200)]
* src/fns.c (internal_equal): Use BASE_EQ where possible.

2 years agoRecognize processes as a CL type again
Basil L. Contovounesios [Sat, 11 Jun 2022 12:50:09 +0000 (15:50 +0300)]
Recognize processes as a CL type again

For discussion, see:
https://lists.gnu.org/r/emacs-devel/2022-06/msg00567.html

* lisp/emacs-lisp/cl-macs.el (cl-deftype-satisfies): Include process
as a type, to avoid cl-typep complaining about process objects.

2 years agoMake new fileio test more reliable
Lars Ingebrigtsen [Sat, 11 Jun 2022 16:15:35 +0000 (18:15 +0200)]
Make new fileio test more reliable

* test/src/fileio-tests.el: Use a unibyte buffer to avoid length
confusion.

2 years agoBump sh-imenu-generic-expression defcustom version
Lars Ingebrigtsen [Sat, 11 Jun 2022 16:13:06 +0000 (18:13 +0200)]
Bump sh-imenu-generic-expression defcustom version

* lisp/progmodes/sh-script.el (sh-imenu-generic-expression): Bump
the :version since we changed the value.

2 years agoFix loaddefs installation of packages with no autoloads
Lars Ingebrigtsen [Sat, 11 Jun 2022 15:59:23 +0000 (17:59 +0200)]
Fix loaddefs installation of packages with no autoloads

* lisp/emacs-lisp/loaddefs-gen.el (loaddefs-generate): Always
generate an output file if we have EXTRA-DATA.  This fixes package
installation of packages with no ;;;###autoload forms.

2 years agofileio-tests.el (test-non-regular-insert): Fix thinko
Stefan Monnier [Sat, 11 Jun 2022 15:57:25 +0000 (11:57 -0400)]
fileio-tests.el (test-non-regular-insert): Fix thinko

* test/src/fileio-tests.el (fileio-tests--non-regular-insert): Rename
from `test-non-regular-insert` and make it into a test rather than
a broken function.  Oh, and make it work while at it.

2 years agoBindat: Document `sint`; add `le` arg to `uint`; deprecate `uintr`
Stefan Monnier [Sat, 11 Jun 2022 15:55:27 +0000 (11:55 -0400)]
Bindat: Document `sint`; add `le` arg to `uint`; deprecate `uintr`

* lisp/emacs-lisp/bindat.el (bindat--type) <uint>: Add `le` optional arg.
(bindat--type) <uintr>: Delete method.
(uintr): Re-define as a bindat-macro instead.
(bindat-type): Update docstring accordingly.
(bindat--primitives): Update.
(sint): Simplify.

* doc/lispref/processes.texi (Bindat Types): Update `uint`, add `sint`,
and remove `uintr`.

* test/lisp/emacs-lisp/bindat-tests.el (data-bindat-spec): Use the new
`le` arg of `uint` instead of `uintr`.

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Sat, 11 Jun 2022 13:17:37 +0000 (16:17 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years agoImprove Lepcha composition rules and rename its native name
समीर सिंह Sameer Singh [Sat, 11 Jun 2022 11:18:44 +0000 (16:48 +0530)]
Improve Lepcha composition rules and rename its native name

* lisp/language/indian.el ("Lepcha"): Rename lepcha script
native name and improve composition rules.  (Bug#55869)

* etc/HELLO: Rename Lepcha script native name.

2 years agoFix timestamp of special drop events
Po Lu [Sat, 11 Jun 2022 13:16:30 +0000 (21:16 +0800)]
Fix timestamp of special drop events

* src/xterm.c (x_dnd_send_drop): Set special event timestamp
to the timestamp of the drop instead of CurrentTime.

2 years ago; * src/fileio.c (Finsert_file_contents): Fix a typo. (Bug#18370)
Eli Zaretskii [Sat, 11 Jun 2022 13:12:10 +0000 (16:12 +0300)]
; * src/fileio.c (Finsert_file_contents): Fix a typo.  (Bug#18370)

2 years agoAllow inserting parts of /dev/urandom with insert-file-contents
Lars Ingebrigtsen [Sat, 11 Jun 2022 12:39:54 +0000 (14:39 +0200)]
Allow inserting parts of /dev/urandom with insert-file-contents

* doc/lispref/files.texi (Reading from Files): Document it.
* src/fileio.c (Finsert_file_contents): Allow specifying END for
special files (bug#18370).

2 years agoFix some drag-and-drop handling on Haiku
Po Lu [Sat, 11 Jun 2022 12:01:01 +0000 (12:01 +0000)]
Fix some drag-and-drop handling on Haiku

* lisp/term/haiku-win.el (haiku-drag-and-drop): Don't raise
frame for some types of drags.

* src/haikuselect.c (haiku_unwind_drag_message): Don't hide
tooltip here.
(Fhaiku_drag_message): Only clear grab and hide tooltip if the
drag was successful.

2 years agoFix initializers for Haiku scroll bars
Po Lu [Sat, 11 Jun 2022 11:55:42 +0000 (11:55 +0000)]
Fix initializers for Haiku scroll bars

* src/haiku_support.cc (class Emacs):
(class EmacsScrollBar): Fix initializers.

2 years agoSupport mksh-specific function names in imenu
Visuwesh [Sat, 11 Jun 2022 11:05:17 +0000 (13:05 +0200)]
Support mksh-specific function names in imenu

* lisp/progmodes/sh-script.el (sh-imenu-generic-expression): Add
mksh-specific function names to imenu-generic-expression
(bug#55889).

2 years ago; Fix last change in whitespace.el.
Eli Zaretskii [Sat, 11 Jun 2022 11:02:29 +0000 (14:02 +0300)]
; Fix last change in whitespace.el.

2 years agoFurther tweaks to how remapped commands are described
Lars Ingebrigtsen [Sat, 11 Jun 2022 10:34:18 +0000 (12:34 +0200)]
Further tweaks to how remapped commands are described

* lisp/help.el (describe-map): Rework how remapped commands are
output to avoid repetitions.

They're now shown as:

C-x 4 C-o ido-display-buffer
  (Remapped via <remap> <display-buffer>)
C-x 5 C-o ido-display-buffer-other-frame
  (Remapped via <remap> <display-buffer-other-frame>)
C-x x i ido-insert-buffer
  (Remapped via <remap> <insert-buffer>)

2 years agoFix doc strings in whitespace.el
Eli Zaretskii [Sat, 11 Jun 2022 10:30:07 +0000 (13:30 +0300)]
Fix doc strings in whitespace.el

* lisp/whitespace.el (whitespace-style, whitespace-action):
Untabify the doc strings.  (Bug#55904)

2 years agoAdd support for the Lepcha script (bug#55869)
समीर सिंह Sameer Singh [Thu, 9 Jun 2022 14:24:10 +0000 (19:54 +0530)]
Add support for the Lepcha script (bug#55869)

* lisp/language/indian.el ("Lepcha"): New language environment.
Add composition rules for Lepcha. Add sample text and input method.
* lisp/language/misc-lang.el ("Kharoshthi"): Fix whitespace.
* lisp/international/fontset.el (script-representative-chars)
(setup-default-fontset): Support Lepcha.
* lisp/leim/quail/indian.el ("lepcha"): New input method.

* etc/HELLO: Add a Lepcha greeting.
* etc/NEWS: Announce the new language environment.

2 years agoFix queuing already-present selection requests
Po Lu [Sat, 11 Jun 2022 06:11:28 +0000 (14:11 +0800)]
Fix queuing already-present selection requests

* src/xterm.c (x_defer_selection_requests): Move kbd_fetch_ptr
if possible and fix counter increment order.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Sat, 11 Jun 2022 04:30:30 +0000 (06:30 +0200)]
Merge from origin/emacs-28

0705705ebf Improve documentation of "etags -I"
0ad8cd40ce Merge branch 'emacs-28' of git.savannah.gnu.org:/srv/git/e...
22a832ad82 Mention the #f syntax from cl-prin1
3fd0854378 Fix file name quoting in tramp-smb.el (do not merge)

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Sat, 11 Jun 2022 04:30:30 +0000 (06:30 +0200)]
; Merge from origin/emacs-28

The following commit was skipped:

8436e0bee9 Update error message to reflect variable rename

2 years agoHandle allocation errors when interning large amounts of atoms
Po Lu [Sat, 11 Jun 2022 03:13:48 +0000 (11:13 +0800)]
Handle allocation errors when interning large amounts of atoms

* src/xfns.c (Fx_begin_drag): Catch BadAlloc errors around
XInternAtoms.

2 years agoPrevent crash handling keyboard input from non-frame windows
Po Lu [Sat, 11 Jun 2022 01:19:05 +0000 (09:19 +0800)]
Prevent crash handling keyboard input from non-frame windows

* src/xterm.c (handle_one_xevent): Use `dpyinfo' to access xkb
desc.  (bug#55890)

2 years agoFix cancelling DND upon a regular X error
Po Lu [Sat, 11 Jun 2022 01:12:44 +0000 (09:12 +0800)]
Fix cancelling DND upon a regular X error

* src/xterm.c (x_connection_closed): The display isn't dead upon
a non-IO error, so don't avoid sending messages to clean stuff
up.

2 years agoelisp-completion-at-point: Replace last usage of 'read'
Dmitry Gutov [Sat, 11 Jun 2022 00:45:46 +0000 (03:45 +0300)]
elisp-completion-at-point: Replace last usage of 'read'

* lisp/progmodes/elisp-mode.el (elisp-completion-at-point):
Replace the last remaining usage of 'read' (bug#55491).

2 years agoNew function isearch-search-fun-in-text-property (bug#14013).
Juri Linkov [Fri, 10 Jun 2022 16:43:31 +0000 (19:43 +0300)]
New function isearch-search-fun-in-text-property (bug#14013).

* lisp/dired-aux.el (dired-isearch-search-filenames): Move most of the body
to the new function isearch-search-fun-in-text-property.

* lisp/isearch.el (isearch-search-fun-in-text-property):
New function refactored from dired-isearch-search-filenames.

2 years agoDon't use 'list' command in Eshell command forms
Jim Porter [Thu, 9 Jun 2022 16:50:20 +0000 (09:50 -0700)]
Don't use 'list' command in Eshell command forms

When executed like a command, 'list' looks for external programs named
'list' first before falling back to the Lisp function of the same
name.  This causes unexpected behavior, since the Lisp function is
what we want in these tests.

* test/lisp/eshell/esh-var-tests.el (esh-var-test/interp-cmd-indices)
(esh-var-test/quoted-interp-cmd-indices): Use 'listify' instead of
'list'.

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Fri, 10 Jun 2022 13:13:56 +0000 (16:13 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years ago; * etc/NEWS: Fix last change.
Eli Zaretskii [Fri, 10 Jun 2022 13:13:16 +0000 (16:13 +0300)]
; * etc/NEWS: Fix last change.

2 years ago; Minor copyedits of --with-small-ja-dic option
Eli Zaretskii [Fri, 10 Jun 2022 13:12:00 +0000 (16:12 +0300)]
; Minor copyedits of --with-small-ja-dic option

* etc/NEWS: Document the new configuration option.

* lisp/international/ja-dic-cnv.el (skkdic-convert-okuri-nasi):
Fix whitespace.
(skkdic-convert): Doc fix.
(batch-skkdic-convert): Fix Help message.

* configure.ac: Tweak the description of --with-small-ja-dic.

2 years agoRemove extra call to XTranslateCoordinates when performing "xterm" drop
Po Lu [Fri, 10 Jun 2022 12:51:45 +0000 (20:51 +0800)]
Remove extra call to XTranslateCoordinates when performing "xterm" drop

* src/xterm.c (x_dnd_do_unsupported_drop): Signal error when
XdndSelection is lost, set subwindow, and simplify
XTranslateCoordinates loop.

2 years agoDon't reduce vocabulary in ja-dic.el by default
Taiju HIGASHI [Tue, 7 Jun 2022 12:46:14 +0000 (21:46 +0900)]
Don't reduce vocabulary in ja-dic.el by default

* configure.ac: Add the "--with-small-ja-dic" configure option.
* leim/Makefile.in (${leimdir}/ja-dic/ja-dic.el): Change the build
method depending on whether or not the --with-small-ja-dic option
is specified.
* lisp/international/ja-dic-cnv.el (skkdic-convert-okuri-nasi): Add
the "no-reduction" optional argument.  When it is specified, then
generate a Japanese dictionary without reduced vocabulary.
(skkdic-convert): Add the "no-reduction" optional argument.
(batch-skkdic-convert): Add the "--no-reduction" command line argument.

2 years ago; Fix documentation of 'completing-read' and friends
Eli Zaretskii [Fri, 10 Jun 2022 11:22:18 +0000 (14:22 +0300)]
; Fix documentation of 'completing-read' and friends

* src/minibuf.c (Fcompleting_read):
* lisp/minibuffer.el (read-file-name):
* doc/lispref/minibuf.texi (Minibuffer Completion):
* etc/NEWS: Fix typos and wording of the description of the
REQUIRE-MATCH argument to 'completing-read'.

2 years ago; bindat (bindat--length-group): Fix indentation
Richard Hansen [Thu, 2 Jun 2022 20:33:16 +0000 (16:33 -0400)]
; bindat (bindat--length-group): Fix indentation

2 years ago; bindat (strz): Consistent length type check, take two
Richard Hansen [Sun, 29 May 2022 03:53:51 +0000 (23:53 -0400)]
; bindat (strz): Consistent length type check, take two

Commit 30ec4a7347b2944818c6fc469ae871374ce7caa4 is incorrect -- the
length computation logic uses a simple nilness test, not `numberp'.
The `numberp' case is just an optimization if `len' is a literal
number; it does not affect the behavior.

Revert that commit, add some comments to help future readers avoid the
same mistake, and update the pack logic to use the same optimization
as the length computation for consistency.

2 years ago; bindat-tests (str, strz): Refine tests
Richard Hansen [Sun, 29 May 2022 21:15:04 +0000 (17:15 -0400)]
; bindat-tests (str, strz): Refine tests

str and strz:
  * Add tests for packing into a pre-allocated string.

strz:
  * Add test cases to probe more boundary conditions.
  * Delete comments that no longer apply.
  * Add tests to ensure that truncated packed strings are rejected.
  * Keep the legacy spec tests in sync with the modern spec tests.

2 years agobindat (strz): Fix documentation for strz with pre-allocated string
Richard Hansen [Thu, 9 Jun 2022 23:58:56 +0000 (19:58 -0400)]
bindat (strz): Fix documentation for strz with pre-allocated string

* doc/lispref/processes.texi (Bindat Types): Document that a null
terminator is not written if `bindat-pack' is given a pre-allocated
string.

2 years agoLink find-sibling-file to ff-find-related-file in manual
Lars Ingebrigtsen [Fri, 10 Jun 2022 09:48:57 +0000 (11:48 +0200)]
Link find-sibling-file to ff-find-related-file in manual

* doc/emacs/files.texi (Visiting): Link to ff-find-related-file
documentation.

2 years agoFix find-sibling-file doc string
Lars Ingebrigtsen [Fri, 10 Jun 2022 09:45:28 +0000 (11:45 +0200)]
Fix find-sibling-file doc string

* lisp/files.el (find-sibling-file): Remove incorrect statement
from doc string (bug#55879).

2 years agoMake describe-prefix-bindings say when there are no matches
Lars Ingebrigtsen [Fri, 10 Jun 2022 09:39:51 +0000 (11:39 +0200)]
Make describe-prefix-bindings say when there are no matches

* lisp/help.el (describe-prefix-bindings): Say when there are no
bindings under a prefix (bug#55875), for instance in `C-c C-h' in
a buffer with no `C-c' commands.

2 years agoFix issues with loading autoloaded defcustoms while bound
Ignacio Casso [Fri, 10 Jun 2022 09:13:20 +0000 (11:13 +0200)]
Fix issues with loading autoloaded defcustoms while bound

* doc/lispref/customize.texi (Variable Definitions)
(Variable Definitions): Update documentation.

* lisp/custom.el (custom-initialize-set)
(custom-initialize-reset): Update doc string.
(custom-initialize-changed): Use set-default-toplevel-value.  This
fixes issues with (let ((custom-variable ...))  (autoload-function ...)).
(custom-set-default): Ditto.

* src/data.c (Fdefault_boundp): Update doc string.

2 years agoDon't put trailing optional nil values into `command-history'
Lars Ingebrigtsen [Fri, 10 Jun 2022 08:51:34 +0000 (10:51 +0200)]
Don't put trailing optional nil values into `command-history'

* src/callint.c (fix_command): Don't put trailing optional nil
values into `command-history' (bug#45333).

2 years agoFix macOS parallel bootstrap error (bug#55846)
Mattias Engdegård [Fri, 10 Jun 2022 08:22:24 +0000 (10:22 +0200)]
Fix macOS parallel bootstrap error (bug#55846)

* nextstep/Makefile.in (${ns_appdir}):
Change to a single-target rule to avoid the same actions being
executed in parallel.

2 years agoMention the REQUIRE-MATCH extension in NEWS
Lars Ingebrigtsen [Fri, 10 Jun 2022 08:21:30 +0000 (10:21 +0200)]
Mention the REQUIRE-MATCH extension in NEWS

2 years agoAllow specifying a wildcard argument to list-directory again
Lars Ingebrigtsen [Fri, 10 Jun 2022 08:19:15 +0000 (10:19 +0200)]
Allow specifying a wildcard argument to list-directory again

* lisp/files.el (list-directory): Allow specifying a wildcard
argument interactively again (bug#55877).

2 years agoAllow REQUIRE-MATCH to be a function
Lars Ingebrigtsen [Fri, 10 Jun 2022 08:16:57 +0000 (10:16 +0200)]
Allow REQUIRE-MATCH to be a function

* doc/lispref/minibuf.texi (Minibuffer Completion): Document it.

* lisp/minibuffer.el (completion--complete-and-exit): Allow
REQUIRE-MATCH to be a function.
(read-file-name): Mention it.

* src/minibuf.c (Fcompleting_read): Mention it.

2 years agoFix receiving drops from drop-only Motif programs
Po Lu [Fri, 10 Jun 2022 07:27:07 +0000 (15:27 +0800)]
Fix receiving drops from drop-only Motif programs

* lisp/x-dnd.el (x-dnd-xm-read-targets-table): Fix doc string.
(x-dnd-handle-motif): Recompute types and state on XmDROP_START
if no state already exists.

2 years agoImprove documentation of "etags -I"
Eli Zaretskii [Fri, 10 Jun 2022 07:06:06 +0000 (10:06 +0300)]
Improve documentation of "etags -I"

* doc/man/etags.1:
* doc/emacs/maintaining.texi (Create Tags Table): Elaborate on the
importance of the '-I' option to 'etags'.  (Bug#45246)

2 years agoMerge branch 'emacs-28' of git.savannah.gnu.org:/srv/git/emacs into emacs-28
Eli Zaretskii [Fri, 10 Jun 2022 07:04:28 +0000 (10:04 +0300)]
Merge branch 'emacs-28' of git.savannah.gnu.org:/srv/git/emacs into emacs-28

2 years agoEliminate extra call to XTranslateCoordinates looking for drop target
Po Lu [Fri, 10 Jun 2022 06:47:40 +0000 (14:47 +0800)]
Eliminate extra call to XTranslateCoordinates looking for drop target

* src/xterm.c (x_dnd_get_target_window): Translate coordinates
starting from the root window and avoid extra sync.

2 years agoMerge from origin/emacs-28
Stefan Kangas [Fri, 10 Jun 2022 06:17:35 +0000 (08:17 +0200)]
Merge from origin/emacs-28

22a832ad82 Mention the #f syntax from cl-prin1

2 years ago; Merge from origin/emacs-28
Stefan Kangas [Fri, 10 Jun 2022 06:17:35 +0000 (08:17 +0200)]
; Merge from origin/emacs-28

The following commit was skipped:

3fd0854378 Fix file name quoting in tramp-smb.el (do not merge)

2 years agoMerge from origin/emacs-28
Stefan Kangas [Fri, 10 Jun 2022 06:17:35 +0000 (08:17 +0200)]
Merge from origin/emacs-28

d02c94090c Fix error reporting in process-async-https-with-delay
9a4862a973 * doc/misc/org.org: Remove spurious markup.
768ed1476a Make Tramp version check more robust
7f778c6943 Fix debugging with GDB when a breakpoint has multiple loca...
25e53e9391 ; * lisp/files.el (file-expand-wildcards): Doc fix.
3ea9357d10 Update documentation of 'aset' and 'store-substring'

# Conflicts:
# lisp/files.el

2 years agoAdd tests for x-dnd Motif value parsing logic
Po Lu [Fri, 10 Jun 2022 05:11:20 +0000 (13:11 +0800)]
Add tests for x-dnd Motif value parsing logic

* test/lisp/x-dnd-tests.el: New file.

2 years agoDon't rely on TARGETS to read selection targets for Motif DND
Po Lu [Fri, 10 Jun 2022 03:45:27 +0000 (11:45 +0800)]
Don't rely on TARGETS to read selection targets for Motif DND

* lisp/x-dnd.el (x-dnd-types-alist):
(x-dnd-known-types): Fix formatting.
(x-dnd-xm-unpack-targets-table-header):
(x-dnd-xm-read-single-rec):
(x-dnd-xm-read-targets-table):
(x-dnd-xm-read-targets): New functions.
(x-dnd-handle-motif): Read targets from the targets table
of the drag window instead of the selection's TARGET target.

2 years agoFix crashes in x_tooltip_window_to_frame on GTK
Po Lu [Fri, 10 Jun 2022 01:28:45 +0000 (09:28 +0800)]
Fix crashes in x_tooltip_window_to_frame on GTK

* src/xterm.c (x_tooltip_window_to_frame): Ignore all non-X
frames instead of trying to get their tooltip window.

2 years ago* src/haikuselect.c (haiku_note_drag_motion): Only handle visible tip_f.
Po Lu [Fri, 10 Jun 2022 01:15:25 +0000 (01:15 +0000)]
* src/haikuselect.c (haiku_note_drag_motion): Only handle visible tip_f.

2 years agoFix DND tooltip handling with tooltip-reuse-hidden-frame
Po Lu [Fri, 10 Jun 2022 00:58:51 +0000 (08:58 +0800)]
Fix DND tooltip handling with tooltip-reuse-hidden-frame

* src/xterm.c (x_dnd_update_tooltip_position): Don't move window
if tip_f is not visible.

2 years agoUpdate the 'etags' test suite
Eli Zaretskii [Thu, 9 Jun 2022 17:33:43 +0000 (20:33 +0300)]
Update the 'etags' test suite

* ETAGS.good_1:
* ETAGS_good_2:
* ETAGS_good_3:
* ETAGS_good_4:
* ETAGS_good_5:
* ETAGS_good_6: Adapt to recent changes in test sources.

* lib-src/etags.c (C_entries): Add commentary for resetting
bracelev.  (Bug#45246)

2 years ago; * src/window.c (window_body_unit_from_symbol): Fix Lisp EQ.
Eli Zaretskii [Thu, 9 Jun 2022 16:40:25 +0000 (19:40 +0300)]
; * src/window.c (window_body_unit_from_symbol): Fix Lisp EQ.

2 years agoAdjust browse-url test after previous browse-url change
Lars Ingebrigtsen [Thu, 9 Jun 2022 15:13:58 +0000 (17:13 +0200)]
Adjust browse-url test after previous browse-url change

2 years agoMake browse-url-encode-url encode even less
Lars Ingebrigtsen [Thu, 9 Jun 2022 15:11:54 +0000 (17:11 +0200)]
Make browse-url-encode-url encode even less

* lisp/net/browse-url.el (browse-url-encode-url): Don't encode
dollar signs, because that's out of spec (bug#55873).

2 years agoImprove `C-h b' output for remapped commands.
Lars Ingebrigtsen [Thu, 9 Jun 2022 14:41:03 +0000 (16:41 +0200)]
Improve `C-h b' output for remapped commands.

* lisp/help.el (describe-map): Include the bindings of the
remapped commands (bug#14084).

This will result in output like this, instead of just listing the
remapped commands:

<remap> <display-buffer>                ido-display-buffer
C-x 4 C-o                               display-buffer
<remap> <display-buffer-other-frame>    ido-display-buffer-other-frame
C-x 5 C-o                               display-buffer-other-frame
<remap> <insert-buffer>                 ido-insert-buffer
C-x x i                                 insert-buffer
<remap> <kill-buffer>                   ido-kill-buffer
C-x k                                   kill-buffer
<remap> <switch-to-buffer>              ido-switch-buffer
C-x b                                   switch-to-buffer
<remap> <switch-to-buffer-other-frame>  ido-switch-buffer-other-frame
C-x 5 b                                 switch-to-buffer-other-frame
<remap> <switch-to-buffer-other-window> ido-switch-buffer-other-window
C-x 4 b                                 switch-to-buffer-other-window

2 years agoNew setting for mouse-drag-copy-region to not put "" onto kill ring
Lars Ingebrigtsen [Thu, 9 Jun 2022 13:57:04 +0000 (15:57 +0200)]
New setting for mouse-drag-copy-region to not put "" onto kill ring

* doc/emacs/frames.texi (Mouse Commands): Document it.
* lisp/mouse.el (mouse-drag-copy-region): Add value (bug#17211)
for not putting "" strings onto the kill ring.
(mouse-set-region, mouse-save-then-kill): Use the new value.

2 years agoFix recalculation of `icon-title-format' after a frame is iconified
Po Lu [Thu, 9 Jun 2022 13:48:19 +0000 (21:48 +0800)]
Fix recalculation of `icon-title-format' after a frame is iconified

Previously it would only happen upon the next mode line
redisplay, meaning that just pressing C-z would not update the
implicit title, since C-z doesn't cause a redisplay.

* src/dispextern.h: Update prototypes.
* src/frame.h (SET_FRAME_ICONIFIED): De-slugify.  Call
`gui_consider_frame_title', since `icon-title-format' might be
different from the current frame title.
* src/xdisp.c (gui_consider_frame_title): Export (also in
dispextern.h).  (bug#55850)

2 years agoMention the #f syntax from cl-prin1
Lars Ingebrigtsen [Thu, 9 Jun 2022 13:22:11 +0000 (15:22 +0200)]
Mention the #f syntax from cl-prin1

* doc/lispref/objects.texi (Special Read Syntax): Mention #f,
which is in cl-prin1 output (bug#55853).

2 years agoFix file name quoting in tramp-smb.el (do not merge)
Michael Albinus [Thu, 9 Jun 2022 12:44:00 +0000 (14:44 +0200)]
Fix file name quoting in tramp-smb.el (do not merge)

* lisp/net/tramp-smb.el (tramp-smb-handle-write-region): Quote tmpfile.
(tramp-smb-get-localname): Remove superfluous test.  (Bug#55855)

* test/lisp/net/tramp-tests.el (tramp-test03-file-name-method-rules):
Remove superfluous checks.

2 years agoMake `line-number-at-pos' work more like in earlier Emacs versions
Lars Ingebrigtsen [Thu, 9 Jun 2022 12:42:31 +0000 (14:42 +0200)]
Make `line-number-at-pos' work more like in earlier Emacs versions

* src/fns.c (Fline_number_at_pos): Allow calling with position
outside the region if called with ABSOLUTE non-nil (bug#55847).
This isn't announced in the doc string, but makes function
compatible with the version in earlier Emacs versions.

2 years agoMerge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Po Lu [Thu, 9 Jun 2022 11:44:31 +0000 (19:44 +0800)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs

2 years agoNever return tooltip frames from ns-begin-drag
Po Lu [Thu, 9 Jun 2022 11:42:56 +0000 (19:42 +0800)]
Never return tooltip frames from ns-begin-drag

* src/nsterm.m ([EmacsWindow draggedImage:movedTo:]):
([EmacsWindow beginDrag:forPasteboard...]): Don't return frame
if tooltip.

2 years ago; Fix typos in Kharoshthi script support
Eli Zaretskii [Thu, 9 Jun 2022 10:27:34 +0000 (13:27 +0300)]
; Fix typos in Kharoshthi script support

* etc/HELLO:
* lisp/leim/quail/misc-lang.el ("kharoshthi"):
* lisp/language/misc-lang.el ("Kharoshthi"): Fix typos.

2 years agoHandle monitor attribute updates during drag-and-drop
Po Lu [Thu, 9 Jun 2022 10:20:59 +0000 (18:20 +0800)]
Handle monitor attribute updates during drag-and-drop

* src/xterm.c (x_monitors_changed_cb):
(handle_one_xevent): Set x_dnd_monitors during monitor changes.

2 years agoAdd support for the Kharoshthi script
Stefan Baums [Sun, 5 Jun 2022 17:18:23 +0000 (19:18 +0200)]
Add support for the Kharoshthi script

* etc/NEWS: Announce the new language environment and script.
* etc/HELLO: Add Kharoshthi greeting.

* lisp/leim/quail/misc-lang.el ("kharoshthi"): New input method.
* lisp/language/misc-lang.el ("Kharoshthi"): New language
environment.  Set up composition rules for Kharoshthi.
(Bug#55539)

2 years agoSatisfy GCC warnings on the GNUstep build
Po Lu [Thu, 9 Jun 2022 08:48:17 +0000 (16:48 +0800)]
Satisfy GCC warnings on the GNUstep build

* src/nsfns.m (ns_move_tooltip_to_mouse_location):
* src/nsterm.m ([EmacsWindow draggedImage:movedTo:]): Pacify GCC.

2 years agoDisable tooltip timeouts for drag-and-drop tooltips
Po Lu [Thu, 9 Jun 2022 08:43:29 +0000 (16:43 +0800)]
Disable tooltip timeouts for drag-and-drop tooltips

* lisp/mouse.el (mouse-drag-and-drop-region-display-tooltip):
Don't time out the created tooltip.

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Thu, 9 Jun 2022 08:38:08 +0000 (11:38 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years agoImplement `follow-tooltip' on NS as well
Po Lu [Thu, 9 Jun 2022 08:34:18 +0000 (16:34 +0800)]
Implement `follow-tooltip' on NS as well

* lisp/term/ns-win.el (x-begin-drag): Pass `follow-tooltip'.
* src/nsfns.m (Fx_show_tip): Record last dx and dy.
(syms_of_nsfns): New staticpros.
* src/nsmenu.m ([EmacsTooltip moveTo:]): New method.

* src/nsselect.m (Fns_begin_drag): New parameter
`follow-tooltip'.

* src/nsterm.h (@interface EmacsWindow):
(EmacsTooltip): Update prototypes.
* src/nsterm.m ([EmacsWindow draggedImage:movedTo:]): Move any
tooltip to the right location.
([EmacsWindow beginDrag:forPasteboard...]): New parameter
`followTooltip'.

2 years agoNote caveats of `follow-tooltip' with system tooltips
Po Lu [Thu, 9 Jun 2022 07:44:51 +0000 (15:44 +0800)]
Note caveats of `follow-tooltip' with system tooltips

* lisp/mouse.el (mouse-drag-and-drop-region): Turn off system
tooltips inside.
* src/xfns.c (Fx_begin_drag): Say that follow-tooltip doesn't
work with system tooltips.

2 years ago; * doc/lispref/processes.texi (Bindat Types): Fix wording. (Bug#55815)
Eli Zaretskii [Thu, 9 Jun 2022 07:28:25 +0000 (10:28 +0300)]
; * doc/lispref/processes.texi (Bindat Types): Fix wording.  (Bug#55815)

2 years agobindat: Improve str, strz documentation
Richard Hansen [Fri, 3 Jun 2022 01:05:40 +0000 (21:05 -0400)]
bindat: Improve str, strz documentation

* doc/lispref/processes.texi (Bindat Types): Expand the documentation
for the `str' and `strz' types to clarify expectations and explain
edge case behavior.

2 years agoImplement `follow-tooltip' for DND on Haiku
Po Lu [Thu, 9 Jun 2022 07:20:22 +0000 (07:20 +0000)]
Implement `follow-tooltip' for DND on Haiku

* lisp/term/haiku-win.el (x-begin-drag): Implement
`follow-tooltip'.
* src/haikufns.c (Fx_show_tip): Record last dx and dy.
(syms_of_haikufns): New staticpros.

* src/haikuselect.c (haiku_unwind_drag_message): Clear new flag.
(Fhaiku_drag_message): New argument `follow-tooltip'.  Set new
flag.
(haiku_dnd_compute_tip_xy): New function.
(haiku_note_drag_motion): Move tooltip if flag is true.

* src/haikuterm.c (haiku_read_socket): Don't generate help event
if mouse moves onto a tooltip during DND.
* src/haikuterm.h: Update prototypes.

2 years agoAccount for remapped faces in $COLUMNS and $LINES in Eshell
Jim Porter [Fri, 3 Jun 2022 04:12:04 +0000 (21:12 -0700)]
Account for remapped faces in $COLUMNS and $LINES in Eshell

* src/window.h (window_body_unit): New enum...
(window_body_width): ... use it.

* src/window.c (window_body_unit_from_symbol): New function.
(window_body_height, window_body_width): Make PIXELWISE a
'window_body_unit'.
(window-body-height, window-body-width): Accept 'remap' for PIXELWISE.
(window-lines-pixel-dimensions, window_change_record_windows)
(run_window_change_functions, resize_frame_windows, grow_mini_window)
(shrink_mini_window, scroll-left, scroll-right): Update calls to
'window_body_height' and 'window_body_width'.

* src/indent.c (compute_motion): Update calls to 'window_body_width'.

* lisp/eshell/em-ls.el (eshell-ls-find-column-widths)
(eshell-ls-find-column-lengths): Use 'window-body-width'.

* lisp/eshell/esh-var.el (eshell-variable-aliases-list): Use
'window-body-width' and 'window-body-height'.

* test/lisp/eshell/esh-var-tests.el (esh-var-test/window-height)
(esh-var-test/window-width): Rename to...
(esh-var-test/lines-var, esh-var-test/columns-var): ... and update
expected value.

* doc/lispref/windows.texi (Window Sizes): Document new behavior of
PIXELWISE argument for 'window-body-width' and 'window-body-height'.

* etc/NEWS: Announce this change (bug#55696).

2 years agoRevert "* src/comp.c (Fcomp_el_to_eln_filename): Update error message."
Eli Zaretskii [Thu, 9 Jun 2022 06:56:59 +0000 (09:56 +0300)]
Revert "* src/comp.c (Fcomp_el_to_eln_filename): Update error message."

This reverts commit ec987e3e1786d06ffd306e5717b4d7fd118f05ac.
This change was installed on the emacs-28 branch instead.

2 years agoAllow C-x 4 4, C-x 5 5, C-x t t to handle commands that use switch-to-buffer
Juri Linkov [Thu, 9 Jun 2022 06:40:52 +0000 (09:40 +0300)]
Allow C-x 4 4, C-x 5 5, C-x t t to handle commands that use switch-to-buffer

* lisp/window.el (display-buffer-override-next-command):
Temporarily set switch-to-buffer-obey-display-actions to t,
and revert back to the original value afterwards.
This allows other-window-prefix, other-frame-prefix, other-tab-prefix,
windmove-display-in-direction to override the default behavior of
commands that use switch-to-buffer.
https://lists.gnu.org/archive/html/emacs-devel/2022-06/msg00483.html

2 years ago* src/comp.c (Fcomp_el_to_eln_filename): Update error message.
Jeff Walsh [Thu, 9 Jun 2022 00:02:01 +0000 (10:02 +1000)]
* src/comp.c (Fcomp_el_to_eln_filename): Update error message.

2 years agoUpdate error message to reflect variable rename
Jeff Walsh [Thu, 9 Jun 2022 00:02:01 +0000 (10:02 +1000)]
Update error message to reflect variable rename

* src/comp.c (Fcomp_el_to_eln_filename): Update error message.  (Bug#55861)

2 years agoAlso show mouse DND tooltip contents during interprogram drag-and-drop
Po Lu [Thu, 9 Jun 2022 05:11:08 +0000 (13:11 +0800)]
Also show mouse DND tooltip contents during interprogram drag-and-drop

* doc/lispref/frames.texi (Drag and Drop): Document new
parameter to `x-begin-drag'.
* lisp/mouse.el (mouse-drag-and-drop-region): Don't hide tooltip
when initiating interprogram drag-and-drop.
* lisp/term/haiku-win.el (x-begin-drag):
* lisp/term/ns-win.el (x-begin-drag): Add stubs for new
parameter.
* src/xfns.c (Fx_begin_drag): New parameter `follow-tooltip'.
(Fx_show_tip, syms_of_xfns): Add records of the last dx and dy
given to `x-show-tip'.
* src/xterm.c (x_clear_dnd_monitors): New function.
(x_dnd_begin_drag_and_drop): Save monitor attributes list if
appropriate.
(x_dnd_compute_tip_xy, x_dnd_update_tooltip_position): New
function.
(x_dnd_update_state, handle_one_xevent): Update tooltip position
during DND mouse movement.
(syms_of_xterm): Update staticpros.
* src/xterm.h: Update prototypes.

2 years agoFix dnd-tests on builds without X
Po Lu [Thu, 9 Jun 2022 02:22:14 +0000 (10:22 +0800)]
Fix dnd-tests on builds without X

* test/lisp/dnd-tests.el (x-get-selection-internal): New
function declaration.

2 years agoIgnore tooltip frames when looking for DND target
Po Lu [Thu, 9 Jun 2022 02:05:54 +0000 (10:05 +0800)]
Ignore tooltip frames when looking for DND target

* src/xterm.c (x_dnd_get_target_window): When not using client
lists, look beneath any tooltip frame.

2 years agoMake use of faster atom intern functions in xselect.c
Po Lu [Thu, 9 Jun 2022 01:52:21 +0000 (09:52 +0800)]
Make use of faster atom intern functions in xselect.c

* src/xselect.c (symbol_to_x_atom):
(x_atom_to_symbol): Use x_get_atom_name and
x_intern_cached_atom.