Andrea Corallo [Fri, 8 Jul 2022 08:27:45 +0000 (10:27 +0200)]
Mark async worker tmp file as utf-8-emacs-unix (bug#48029)
* lisp/emacs-lisp/comp.el (comp-final): Mark async worker tmp file
as utf-8.
* test/src/comp-tests.el (48029-1): New test.
* test/src/comp-resources/comp-test-funcs.el
(comp-test-48029-nonascii-žžž-f): New function.
Alan Mackenzie [Thu, 7 Jul 2022 15:38:09 +0000 (15:38 +0000)]
Remove obscure, obsolete code from do_switch_frame
This is relevant for bug #56305, and might solve that bug. The code being
removed went into Emacs between 1992 and 1994, and looks to have been a
workaround for switching frames, before the command 'other-frame' had been
written. Nowadays, that code has harmful effects, causing frames' focus to be
redirected at random, sometimes back to the frame itself.
* src/frame.c (do_switch_frame): Remove 53 lines of code.
Stefan Kangas [Thu, 7 Jul 2022 12:54:16 +0000 (14:54 +0200)]
Make net-utils-url at point funs obsolete in favor of ffap
* lisp/net/net-utils.el (net-utils-machine-at-point)
(net-utils-url-at-point): Redefine as obsolete function alias for
'ffap-machine-at-point' and 'ffap-url-at-point'. Update callers.
* lisp/ffap.el (ffap-machine-at-point, ffap-url-at-point): Autoload.
Stefan Kangas [Thu, 7 Jul 2022 11:18:01 +0000 (13:18 +0200)]
Make two XEmacs related variables obsolete
* lisp/net/browse-url.el (browse-url-gnudoit-program)
(browse-url-gnudoit-args): Make obsolete. The corresponding command
'browse-url-w3-gnudoit' is already obsolete since 25.1.
Po Lu [Thu, 7 Jul 2022 10:36:56 +0000 (18:36 +0800)]
Fix quitting out of selection converters during drag and drop
* src/xterm.c (x_dnd_process_quit): New function.
(x_dnd_begin_drag_and_drop): Use it instead. Also quit if
quit-flag is true immediately after a selection converter is
run.
Stefan Kangas [Thu, 7 Jul 2022 09:11:34 +0000 (11:11 +0200)]
Make 'run-dig' command obsolete in favor of 'dig'
* lisp/net/net-utils.el (run-dig): Redefine in terms of `dig' and make
obsolete. (Bug#56432).
(dig-program): Delete duplicate defcustom; it is also in dig.el.
(dig-program-options): Move from here...
* lisp/net/dig.el (dig-program-options): ...to here.
(dig-invoke): Respect 'dig-program-options'.
(dig): Prompt for DNS server when given double prefix argument.
Eli Zaretskii [Thu, 7 Jul 2022 08:56:31 +0000 (11:56 +0300)]
Fix undo of changes in cloned indirect buffers
* lisp/simple.el (primitive-undo): If the visited-modtime of the
indirect buffer's file is bogus, use the modtime of the file
visited by its base buffer.
* src/undo.c (record_first_change): Call
'buffer_visited_file_modtime' with the correct buffer, instead of
always calling 'Fvisited_file_modtime', which returns possibly
bogus values for indirect buffers.
* src/fileio.c (Fset_visited_file_modtime): Signal a meaningful
error for indirect buffers.
(buffer_visited_file_modtime): New function, with implementation
taken from 'Fvisited_file_modtime'.
(Fvisited_file_modtime): Call 'buffer_visited_file_modtime'.
* src/lisp.h: Add prototype for 'buffer_visited_file_modtime'.
(Bug#56397)
The characters ऋ and ॠ are pronunced as ru in languages such as
Marathi, Gujarati, Telugu, etc. so add new translation rules that
reflects this sound. (bug#56414)
* lisp/language/ind-util.el (indian-itrans-v5-table): Add new
translation rules to make the input method more phonetic.
(indian-tml-base-table, indian-tml-base-digits-table): Fix typo.
Juri Linkov [Thu, 7 Jul 2022 06:31:02 +0000 (09:31 +0300)]
Don't accumulate trailing newlines on every save of .dir-locals.el
* lisp/files-x.el (modify-dir-local-variable): Insert a newline
only after creating a new file.
(dir-locals-to-string): Remove newline to not add more newlines
on every save.
* src/haiku_support.h (enum haiku_event_type): New event
`CLIPBOARD_CHANGED_EVENT'.
(struct haiku_clipboard_changed_event): New struct.
* src/haikuselect.c (haiku_handle_selection_clear)
(haiku_selection_disowned, haiku_start_watching_selections): New
functions.
(syms_of_haikuselect): New defsym and defvar.
Stefan Kangas [Thu, 7 Jul 2022 00:09:30 +0000 (02:09 +0200)]
End new .dir-locals.el files with a newline
* lisp/files-x.el (dir-locals-to-string): Add newline at the end of
newly created .dir-locals.el files. This avoids git complaining about
"No newline at end of file".
* lisp/emacs-lisp/backtrace.el (backtrace-line-length):
* lisp/doc-view.el (doc-view-conversion-refresh-interval):
Use defcustom :type natnum and allow the nil value.
* lisp/gnus/spam-stat.el (spam-stat-process-directory-age):
Use defcustom :type integer.
Manuel Giraud [Wed, 6 Jul 2022 11:18:09 +0000 (13:18 +0200)]
Remove soft newlines in longlines-mode
* lisp/longlines.el (longlines-mode, longlines-encode-string): Update
from `buffer-substring-filters' to `filter-buffer-substring-function'.
Remove soft newlines in substring (bug#56335).
Martin Rudalics [Wed, 6 Jul 2022 07:25:43 +0000 (09:25 +0200)]
Fix 'fit-frame-to-buffer' (Bug#56102)
* lisp/window.el (fit-frame-to-buffer-sizes): Fix doc-string.
Give calls to 'max' a second argument so they do something
useful. If ONLY equals 'vertically', call
'window-text-pixel-size' with X-LIMIT nil (Bug#56102). For
minimum sizes of the window to fit, use 'window-safe-min-size' by
default.
* doc/lispref/windows.texi (Resizing Windows): Fix descriptions of
'fit-frame-to-buffer' and 'fit-frame-to-buffer-sizes'.
Po Lu [Wed, 6 Jul 2022 06:09:51 +0000 (14:09 +0800)]
Fix the MS-DOS build
* msdos/sedlibmk.inp: Define GL_GNULIB_RAWMEMCHR.
* src/process.c (Fsignal_names): Disable on MS-DOS and use
SIGNUM_BOUND, which is always provided by gnulib.
Po Lu [Wed, 6 Jul 2022 02:42:12 +0000 (10:42 +0800)]
Reduce duplicate code cleaning up DND processes
* src/xterm.c (x_restore_events_after_dnd): New function.
(x_dnd_cleanup_drag_and_drop, x_dnd_begin_drag_and_drop): Use
that instead of manually cleaning up properties and events.
Po Lu [Tue, 5 Jul 2022 13:56:50 +0000 (21:56 +0800)]
Fix announcements of XDND mouse rectangles
* lisp/x-dnd.el (x-dnd-handle-xdnd): Use correct meaning of "2",
which isn't well documented.
* src/xterm.c (handle_one_xevent): Likewise. Also fix unpacking
of mouse rects.
Stefan Kangas [Tue, 5 Jul 2022 17:37:55 +0000 (19:37 +0200)]
Rename new option to remote-file-name-inhibit-auto-save-visited
* lisp/files.el (remote-file-name-inhibit-auto-save-visited):
Rename from 'auto-save-visited-remote-files' and invert logic.
(auto-save-visited-mode): Adjust accordingly. (Bug#41333)
Suggested by Michael Albinus <michael.albinus@gmx.de>.
* lisp/replace.el (read-regexp-map): New map.
(read-regexp--case-fold, read-regexp-toggle-case-folding)
(read-regexp): Factor out to avoid hard-coding `M-c'.
Stefan Kangas [Tue, 5 Jul 2022 12:16:08 +0000 (14:16 +0200)]
New user option auto-save-visited-remote-files
* lisp/files.el (auto-save-visited-remote-files): New user option.
(auto-save-visited-mode): Use above new variable to decide whether
or not to save remote files. (Bug#41333)
Stefan Kangas [Tue, 5 Jul 2022 11:34:24 +0000 (13:34 +0200)]
New user option auto-save-visited-mode-predicate
* lisp/files.el (auto-save-visited-mode-predicate): New defcustom.
(auto-save-visited-mode): Use above new variable as a predicate to
decide whether or not to save a buffer.
* lisp/international/emoji.el (emoji-insert): Remove the prefix
action from this command, since the same is already available on
`C-x 8 e s', and we're considering using the prefix to copy to the
kill ring.
Po Lu [Tue, 5 Jul 2022 06:55:24 +0000 (14:55 +0800)]
Allow immediately saving XDS drops
This fixes things with programs that have a very timeout, such
as Chromium, within which it isn't practical for the user to
confirm the default file name.
* lisp/x-dnd.el (x-dnd-direct-save-function): Add new choices to
defcustom.
(x-dnd-init-frame): Use fast protocol requests.
(x-dnd-save-direct-immediately): New function.
(x-dnd-handle-xds-drop): Fix nil values of selected file name.
Paul Eggert [Tue, 5 Jul 2022 04:12:45 +0000 (23:12 -0500)]
Quote configure.ac arguments more consistently
This should help avoid further Autoconf portability gotchas such as
the one recently fixed in 2022-06-27T04:26:01Z!meyering@fb.com.
* autogen.sh (autoconf_min): Adjust pattern to match
updated configure.ac.
* configure.ac: Quote arguments more consistently,
as per the Autoconf manual.
Po Lu [Tue, 5 Jul 2022 03:03:11 +0000 (11:03 +0800)]
Don't take XCB socket every time we want the no of the next request
* src/xterm.c (x_ignore_errors_for_next_request, x_uncatch_errors)
(x_check_errors, x_had_errors_p): Don't call XNextRequest
redundantly. Use NextRequest if it was immediately preceded by
XNextRequest, which updates dpy->request.
Alexander Adolf [Sat, 2 Jul 2022 15:27:55 +0000 (17:27 +0200)]
Add reverse mapping for EUDC attribute names
* lisp/net/eudc.el (eudc-translate-query): new optional parameter to
reverse the mapping direction
(eudc-translate-attribute-list): new optional parameter to
reverse the mapping direction
Paul Eggert [Mon, 4 Jul 2022 21:21:35 +0000 (16:21 -0500)]
Fix core dump with x-get-local-selection
* src/xselect.c (Fx_get_local_selection): Check that VALUE has 4
elements, since x_get_local_selection can dump core otherwise.
This pacifies gcc -Wanalyzer-null-dereference, which found the
problem.