Michael Albinus [Tue, 9 Aug 2022 16:12:27 +0000 (18:12 +0200)]
Further Tramp fixes for Android 12
* lisp/net/tramp-adb.el (tramp-adb-handle-file-attributes)
(tramp-adb-handle-directory-files-and-attributes)
(tramp-adb-handle-file-name-all-completions): Pipe "ls" output
through "cat", in order to avoid quoting special characters.
(tramp-adb-sh-fix-ls-output): Remove fix for file names with spaces.
Stefan Kangas [Tue, 9 Aug 2022 15:55:21 +0000 (17:55 +0200)]
Improve message regarding missing LEIM
* lisp/international/ja-dic-utl.el (skkdic-lookup-key):
* lisp/international/mule-diag.el (list-input-methods-1):
* lisp/international/quail.el (quail-use-package): Explain that LEIM
is installed together with Emacs.
Stefan Kangas [Tue, 9 Aug 2022 12:29:12 +0000 (14:29 +0200)]
Replace utility functions with seq-uniq
* lisp/gnus/gnus-util.el (gnus-delete-duplicates):
* lisp/ibuf-ext.el (ibuffer-remove-duplicates): Redefine as
obsolete function alias for 'seq-uniq'. Update callers.
* lisp/emacs-lisp/loaddefs-gen.el
(loaddefs-generate--shorten-autoload): New function.
(loaddefs-generate--make-autoload): Use it to drop optional nil
values from the `autoloads' forms. This makes the loaddefs.el
file about 12K shorter.
Stefan Kangas [Tue, 9 Aug 2022 13:37:53 +0000 (15:37 +0200)]
Make ibuffer-split-list obsolete in favor of seq-group-by
* lisp/ibuf-ext.el (ibuffer-split-list): Make obsolete in favor of
'seq-group-by'.
(ibuffer-generate-filter-groups): Don't use above obsolete
function.
Alan Mackenzie [Tue, 9 Aug 2022 10:46:21 +0000 (10:46 +0000)]
CC Mode: Allow the insertion of long strings of letters in reasonable time
This fix allows M-: (insert (make-string 1000000 ?y)) to work fast when
inserted between C++ raw string delimiters after (setq long-line-threshold
nil).
* lisp/progmodes/cc-langs.el (c-symbol-key): Replace a "*" by "\\{,1000\\}" in
a regexp.
Po Lu [Tue, 9 Aug 2022 07:43:30 +0000 (15:43 +0800)]
Factor out some duplicate code from handle_one_xevent
* src/xterm.c (xi_disable_devices): New function.
(handle_one_xevent): Use that to disable an array of device IDs
instead of copypasting the same block of code over and over
again.
Po Lu [Tue, 9 Aug 2022 03:06:06 +0000 (11:06 +0800)]
Fix handling of XI_DeviceChanged events
* src/xterm.c (xi_get_scroll_valuator): New function.
(xi_handle_device_changed): New function.
(handle_one_xevent): Factor out most of the device changed code
to that function, and make it specifically query for the device
information. (bug#57020)
Stefan Kangas [Mon, 8 Aug 2022 19:28:53 +0000 (21:28 +0200)]
Don't mention XEmacs toolbar in ediff manual
* doc/misc/ediff.texi (Other Session Commands): Don't mention XEmacs
specific toolbar support for now. This can be changed back once the
toolbar is ported to Emacs.
Arash Esbati [Mon, 8 Aug 2022 13:58:35 +0000 (15:58 +0200)]
Improve collecting of citation keys
* lisp/textmodes/reftex-cite.el (reftex-all-used-citation-keys):
Improve regexp for matching various cite commands incl. optional
arguments.
Recognize comments more robustly and don't interpret the control
symbol \% as a comment starter. (bug#56655)
* test/lisp/textmodes/reftex-tests.el
(reftex-all-used-citation-keys): New test.
Allow specifying how args are to be stored in `command-history'
* doc/lispref/functions.texi (Declare Form): Document
`interactive-args'
* lisp/replace.el (replace-string): Store the correct interactive
arguments (bug#45607).
* lisp/emacs-lisp/byte-run.el (byte-run--set-interactive-args):
New function.
(defun-declarations-alist): Use it.
* src/callint.c (fix_command): Remove the old hack (which now
longer works since interactive specs are byte-compiled) and
instead rely on `interactive-args'.
* lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): Use
edebug specs to find the name (if they exist), and default to
returning the top-level symbol if there isn't a define-like form
(bug#49592).
Stefan Kangas [Mon, 8 Aug 2022 11:18:36 +0000 (13:18 +0200)]
Remove redundant local variables in tests
* test/lisp/calc/calc-tests.el:
* test/lisp/progmodes/python-tests.el: Remove redundant local
variables.
* test/src/coding-tests.el: Pacify byte-compiler without using local
variable.
Stefan Kangas [Mon, 8 Aug 2022 09:13:58 +0000 (11:13 +0200)]
Don't autoload obsolete library tpu-extras.el
* lisp/obsolete/tpu-edt.el: Remove autoloads of obsolete library
tpu-extras.el.
* lisp/obsolete/tpu-extras.el: Don't set generated-autoload-file
to tpu-edt.el.
Stefan Kangas [Sun, 7 Aug 2022 17:23:36 +0000 (19:23 +0200)]
Clean up some local variable sections
* lisp/filesets.el:
* lisp/mh-e/mh-*.el:
* lisp/progmodes/python.el (python): Don't set options that are
already set in .dir-locals.el.
* lisp/textmodes/ispell.el: Remove redundant local variables.
* lisp/gnus/nnmaildir.el: Remove local variables that conflicts with
Emacs defaults.
Po Lu [Mon, 8 Aug 2022 03:44:53 +0000 (11:44 +0800)]
Improve handling of pointer focus under the input extension
* src/xfns.c (x_relative_mouse_position)
(Fx_mouse_absolute_pixel_position, compute_tip_xy): Use
x_query_pointer instead of XQueryPointer.
* src/xterm.c (xi_populate_device_from_info): Set new attachment
field.
(xi_handle_focus_change): Set client pointer.
(xi_focus_handle_for_device, xi_handle_interaction): Use
attached keyboard device to handle focus.
(x_query_pointer): New function.
(XTmouse_position, x_scroll_bar_report_motion)
(x_horizontal_scroll_bar_report_motion, handle_one_xevent): Use
x_query_pointer instead of XQueryPointer.
(x_term_init): Initialize client pointer device.
* src/xterm.h (struct xi_device_t): New field `attachment'.
(struct x_display_info): New field `client_pointer_device'.
* src/xterm.c (xi_handle_focus_change): Pacify a wrong warning on
gcc (Debian 10.2.1-6).
xterm.c: In function ‘xi_handle_focus_change’:
xterm.c:12564:25: warning: ‘source’ may be used uninitialized in
this function [-Wmaybe-uninitialized]
12564 | ie.device = source->name;
| ~~~~~~^~~~~~
Eli Zaretskii [Sun, 7 Aug 2022 14:03:52 +0000 (17:03 +0300)]
Fix 'vertical-motion' in bidi-reordered text
* src/xdisp.c (move_it_vertically_backward): Fix the case of long
bidi-reordered lines when starting from its last (top-most) screen
line.
(move_it_by_lines): Fix logic of detection when going by lines
overshoots.
Stefan Kangas [Sun, 7 Aug 2022 11:51:39 +0000 (13:51 +0200)]
Declare unused function ediff-user-grabbed-mouse obsolete
* lisp/vc/ediff-init.el (ediff-user-grabbed-mouse): Declare unused
function obsolete. As far as I can tell, this has been unused
since 1996.
* lisp/vc/ediff-wind.el (ediff-mouse-pixel-position): Make
variable obsolete. It is only used in the above obsolete funct
* lisp/vc/ediff-mult.el (ediff-filegroup-action)
(ediff-registry-action):
* lisp/vc/ediff-util.el (ediff-setup): Don't set above unused
variable.
* lisp/vc/ediff-init.el (ediff-spy-after-mouse): Make obsolete.
* lisp/vc/ediff-util.el (ediff-setup): Don't add above obsolete
function to pre-command-hook.
Stefan Kangas [Sun, 7 Aug 2022 11:16:53 +0000 (13:16 +0200)]
; Improve time-convert call in recently changed test
* test/lisp/eshell/em-pred-tests.el
(eshell-parse-file-name-attributes): Use t instead of nil as
second argument to 'time-convert'.
Suggested by Stefan Monnier <monnier@iro.umontreal.ca>.
Stefan Kangas [Sun, 7 Aug 2022 10:57:53 +0000 (12:57 +0200)]
Merge from origin/emacs-28
7ffcba4213 * etc/PROBLEMS: Problems with Alacritty and Emoji. (Bug#5... df95118e83 Link from (emacs)Init Syntax to (elisp)Introduction 7793cf0c3d Don't mention removed XEmacs support in reftex manual 3d1cf1b47a Don't mention removed XEmacs support in idlwave manual 7ff60c62a9 ; * admin/make-tarball.txt: Fix last change. 2fd5590d0c ; * lisp/play/fortune.el (fortune-ask-file): Doc fix.
When load-force-doc-strings is true, read (#$ . POS) as the (unibyte)
string referred to. This feature was lost by mistake in the recent
nonrecursive reader rewrite.
Noticed by Stefan Monnier.
* src/lread.c (get_lazy_string): New function (code mostly recycled
from an old version).
(read0): Detect (#$ . FIXNUM) and retrieve the string if appropriate.
* test/src/lread-resources/lazydoc.el:
* test/src/lread-tests.el (lread-force-load-doc-strings):
New test.
Fix two problems with our handling of X timestamps
1) We're not properly updating the X interaction timestamp after
receiving certain input events, and
2) X events sent in response to emacsclient commands get stale
timestamps because the timestamp tracking doesn't take into account
that interactions with the user can occur outside the X input
event channel.
* src/xterm.c:
(x_display_set_last_user_time_1): New function.
(x_display_set_last_user_time): Call it.
(x_ewmh_activate_frame): Refactor.
(x_focus_frame): Don't call XSetInputFocus if we can use EWMH activation.
(server_timestamp_predicate): New function.
(x_get_server_time): New function.
(x_note_oob_interaction): New function.
(x_create_terminal): Register new function as terminal hook.
* src/termhooks.h: New hook: note_oob_interaction_hook.
Alan Mackenzie [Sat, 6 Aug 2022 21:11:18 +0000 (21:11 +0000)]
CC Mode: Optimize font-locking stanzas for long raw strings.
Also replace some regexp searches which had caused regexp engine stack
overflows with simple end-of-line calls.
* lisp/progmodes/cc-fonts.el (c-make-syntactic-matcher)
(c-make-font-lock-search-form): Start the generated functions with a skipping
of comments and strings.
(c-make-font-lock-BO-decl-search-function): Start the generated function with
a (fast) movement to the start of any literal.
* lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings)
(c-after-change-mark-abnormal-strings): Replace complicated regexp searches
for end of logical line with basic Lisp functions.
Michael Albinus [Sat, 6 Aug 2022 16:09:35 +0000 (18:09 +0200)]
Adapt Tramp for Android 12
* lisp/net/tramp-adb.el (tramp-methods): Use "%d".
(tramp-adb-handle-directory-files-and-attributes): Fix "." and
".." in listing.
(tramp-adb-sh-fix-ls-output): Fix file names with spaces.
(tramp-adb-maybe-open-connection): Compute args from `tramp-login-args'.
* lisp/net/tramp.el (tramp-methods): Adapt docstring.
(tramp-handle-make-process): Check for adb device if indicated.
Stefan Kangas [Sat, 6 Aug 2022 15:00:13 +0000 (17:00 +0200)]
Fix namespacing problem in allout.el
* lisp/allout.el (allout-outlinify-sticky): Rename from
'outlineify-sticky'. Make old name into obsolete alias.
(outlinify-sticky): Make into obsolete function alias for
'allout-outlinify-sticky'.
(allout-mode): Doc fix.
Stefan Kangas [Sat, 6 Aug 2022 14:20:56 +0000 (16:20 +0200)]
Don't mention test failures on Ubuntu 16.04 in PROBLEMS
Ubuntu 16.04 LTS reached end of life on April 30th, 2021.
Furthermore, test failures don't seem significant enough to warrant an
entry. It's rather cosmetic.
* etc/PROBLEMS: Delete entry on test failures on Ubuntu 16.04.
Eventually we want to be able to generate "transient.texi" from
"transient.org", without having to either give up on idiomatic texinfo
or making it much more painful to maintain the org file.
We are much closer to that now, but there are still a few areas where
additional work is needed. This was mostly accomplished by using Org
macros.
The most significant outstanding issue is that the generated
references don't yet look like an experienced texinfo author like Eli
would like them to look. Additionally it is not yet possible to use a
macro that produces @dots{} in the places Eli added them, and in Org
code blocks it is not possible to use macros, so we cannot have
@var{...} appear in "@lisp ... @end lisp". The last issue probably
cannot be changed on Org's side, but since there are only two such
code blocks, this might be a situation where the compromise has to
come from the texinfo side. There are also three other very minor
and inconsequential differences.
For now I have regenerated the texinfo file from the org file and then
discarded the differences mentioned in the previous paragraph.
The process of merging (1) Eli's changes to the texinfo file
(including, but certainly not limited to markup), (2) changes to the
org source (updated content, formatting changes backported earlier,
fixes for formatting changes Eli did not fix, etc.) and (3) changes to
the code that converts the org source to texinfo, was very laborious
and painful. In essence, this amounted to a (at least) three-way
merge across three different languages and three repositories.
I tried very hard to not waste any of the effort Eli had put into
fixing up the generated texinfo file. I.e., I went back and forth
making improvements to the org source, implementing org macros,
regenerating the texinfo and comparing the remaining difference, and
creating commits on both sides. This resulted in a dozen commits on
both sides and took me well over a day. I could have put in even more
effort to absolutely ensure nothing at all is lost in the process, but
I think that would have amounted to a colossal waste of my time.
Going forward, if you find unidiomatic texinfo, then please don't fix
each instance. Instead write me an email, explaining what the problem
is. You are welcome to make limited fixes to the content or fix
one-of markup issue in the texinfo file; those are relatively simple
to backport in comparison.
Eli Zaretskii [Sat, 6 Aug 2022 13:55:51 +0000 (16:55 +0300)]
Speed up display of Arabic
* lisp/language/misc-lang.el (composition-function-table): Move
some of the Arabic composition rules to ZWJ and ZWNJ cells. This
speeds up display of Arabic by a factor of 2. (Bug#56682)
Eli Zaretskii [Sat, 6 Aug 2022 13:24:34 +0000 (16:24 +0300)]
Fix C-n/C-p inside bidirectional text
* src/xdisp.c (move_it_by_lines, try_cursor_movement): Handle
glyph rows whose direction of increasing buffer positions is
reverse of the normal: going down in the window makes buffer
positions higher.
* src/indent.c (Fvertical_motion): When looking for the last glyph
row occupied by point, take into account the bidi iteration
direction.