1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-13 23:10:26 -08:00
Commit graph

158917 commits

Author SHA1 Message Date
Stefan Kangas
25636fcf52 Revert "Don't autoload obsolete library tpu-extras.el"
This reverts commit 77bf50cb33.
2022-08-08 13:47:15 +02:00
Mattias Engdegård
8c8ae51640 Group print buffer state in a struct
* src/print.c (print_buffer, print_buffer_size, print_buffer_pos)
(print_buffer_pos_byte): Replace with...
(struct print_buffer, print_buffer): ...this.
* src/print.c: (print_free_buffer, print_unwind)
(print_prepare, print_finish, printchar, strout): Adapt users.
2022-08-08 13:26:13 +02:00
Mattias Engdegård
14f0ebc9ac Turn large macros in print.c to functions
This is easier to read and maintain, and makes the state explicit.
It is a pure refactoring; the compiled code should be equivalent.

* src/print.c (PRINTPREPARE, PRINTFINISH): Replace with...
(struct print_context, print_prepare, print_finish): ...these new
functions and explicit state in a struct.
(Fwrite_char, write_string, Fterpri, Fprin1, Fprin1_to_string)
(Fprinc, Fprint): Adapt callers.
2022-08-08 13:12:47 +02:00
Stefan Kangas
60738e569d Remove no-byte-compile cookie from some libraries
This gives us back byte-compiler warnings for these files.
* lisp/mh-e/mh-acros.el:
* test/lisp/comint-tests.el:
* test/lisp/emacs-lisp/nadvice-tests.el:
* test/lisp/emacs-lisp/syntax-tests.el:
* test/lisp/xml-tests.el:
* test/src/font-tests.el: Remove no-byte-compile cookie.
* test/src/font-tests.el (font-parse-explain): Fix warning.
2022-08-08 11:50:33 +02:00
Stefan Kangas
77bf50cb33 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.
2022-08-08 11:15:33 +02:00
Stefan Kangas
4b5414abbc 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.
2022-08-08 11:15:33 +02:00
Po Lu
9b661ff1a8 Fix warnings outside XI2 builds
* src/xterm.c (x_query_pointer): Juggle some definitions around.
2022-08-08 11:59:08 +08:00
Po Lu
16b8948d79 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'.
2022-08-08 11:44:53 +08:00
Stefan Kangas
7dab52dfbc Minor cleanups in ediff-*.el
* lisp/vc/ediff-init.el (ediff-window-visible-p):
(ediff-nonempty-string-p): Simplify.
(stipple-pixmap): Don't try XEmacs specific(?) variable.
(ediff-frame-unsplittable-p): Make obsolete.  Update callers.
(ediff-has-gutter-support-p): Redefine as obsolete function alias for
'ignore'.
(ediff-mouse-event-p): Redefine as obsolete function alias for
'mouse-event-p'.  Update callers.
* lisp/vc/ediff-util.el (ediff-submit-report): Simplify.
(ediff-filename-magic-p): Make obsolete.  Update callers.
(ediff-activate-mark): Make obsolete.  Update callers.
* lisp/vc/ediff-help.el:
* lisp/vc/ediff-hook.el:
* lisp/vc/ediff-util.el:
* lisp/vc/ediff-wind.el: Remove superfluous defvars.
2022-08-07 19:21:09 +02:00
Stefan Kangas
6b4f6dfb4e Make ediff-window-display-p obsolete
* lisp/vc/ediff-init.el (ediff-window-display-p): Redefine as
obsolete function alias for 'display-graphic-p'.
2022-08-07 17:50:33 +02:00
Mattias Engdegård
c3e99a870a ; * lisp/emacs-lisp/bytecomp.el: indentation fix 2022-08-07 17:36:45 +02:00
Lars Ingebrigtsen
af90a31629 Pacify a gcc warning in xi_handle_focus_change
* 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;
      |                   ~~~~~~^~~~~~
2022-08-07 17:22:54 +02:00
Michael Albinus
82d22ef8db Improve Tramp error message
* lisp/net/tramp-sh.el (tramp-sh-handle-file-local-copy):
Simplify for empty files.  Better error message.  (Bug#56879)
2022-08-07 16:35:50 +02:00
kobarity
11e6c12def Fix blank/comment line handling in python-nav-beginning-of-block
* lisp/progmodes/python.el (python-nav-beginning-of-block): Fix
handling of blank/comment line right after block start (bug#57038).
2022-08-07 16:10:58 +02:00
Eli Zaretskii
7592953553 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.
2022-08-07 17:03:52 +03:00
Stefan Kangas
b65a2d1d99 Make ediff-file-remote-p obsolete in favor of file-remote-p
* lisp/vc/ediff-init.el (ediff-file-remote-p): Make into obsolete
function alias for file-remote-p.  Update callers.
2022-08-07 14:51:43 +02:00
Stefan Kangas
e672cad231 ; Improve obsoletions in ediff-init.el
* lisp/vc/ediff-init.el (ediff-convert-standard-filename): Convert
to obsolete function alias.
(ediff-device-type, ediff-last-command-char): Better document
obsoletion.
2022-08-07 14:51:43 +02:00
Stefan Kangas
1f4f1358e6 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.
2022-08-07 14:50:05 +02:00
Stefan Kangas
4439a80407 Make compat function custom-reset-variables obsolete
* lisp/custom.el (custom-reset-variables): Make unused XEmacs compat
function obsolete.
2022-08-07 14:50:05 +02:00
Stefan Kangas
c6abfb32d7 Remove workaround for XEmacs bug in ediff-util.el
* lisp/vc/ediff-util.el (ediff-make-empty-tmp-file): Remove
workaround for XEmacs bug.
2022-08-07 14:50:05 +02:00
Stefan Kangas
cf98a395d0 * lib-src/etags.c: Remove XEmacs support. 2022-08-07 14:50:05 +02:00
Lars Ingebrigtsen
4252cea163 Clarify lisp/Makefile.in comment
* lisp/Makefile.in: Clarify comment.
2022-08-07 14:41:01 +02:00
Alan Mackenzie
a332034160 CC Mode: Fix looping in patch from yesterday
* lisp/progmodes/cc-mode.el (c-before-change-check-unbalanced-strings)
(c-after-change-mark-abnormal-strings): Check (eobp) in loops advancing over
escaped newlines.
2022-08-07 12:26:16 +00:00
Lars Ingebrigtsen
c8833ba365 Tweak autoloads lisp/Makefile.in dependencies
* lisp/Makefile.in (autoloads): Adjust the dependencies to what
they were before, and update the comments.
2022-08-07 14:02:51 +02:00
Stefan Kangas
9c0da894b9 ; 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>.
2022-08-07 13:16:53 +02:00
Stefan Kangas
321f33a2b1 Improve how url-http displays status messages
* lisp/url/url-util.el (url-display-message): New function.
(url-display-percentage): Make obsolete in favor of
url-display-message.

* lisp/url/url-http.el
(url-http-content-length-after-change-function):
Prefer 'url-display-message' to 'url-display-percentage'.
(url-http-content-length-after-change-function)
(url-http-chunked-encoding-after-change-function):
Remove ineffectual calls to 'url-display-percentage'.
2022-08-07 13:14:20 +02:00
Stefan Kangas
91f4ea2fa4 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.
2022-08-07 12:57:53 +02:00
Mattias Engdegård
08a74ab05a Cease emitting negative file offsets for user variables
'User variables' were made obsolete in Emacs 24 along with
user-variable-p; the sign of the position in (#$ . POS) hasn't
mattered since.

* lisp/emacs-lisp/bytecomp.el (byte-compile-output-docform):
Don't emit negative position when doc string starts with `*`.
* src/lread.c (get_lazy_string): Explain.
2022-08-07 10:52:16 +02:00
Mattias Engdegård
7778f83b3e Use struct for saved strings in the reader
* src/lread.c (saved_doc_string, saved_doc_string_size)
(saved_doc_string_length, saved_doc_string_position)
(prev_saved_doc_string, prev_saved_doc_string_size)
(prev_saved_doc_string_length, prev_saved_doc_string_position):
Replace with...
(struct saved_string, saved_strings): ...this.
* src/lread.c (Fload, skip_lazy_string, get_lazy_string):
Adapt code.
2022-08-07 10:25:03 +02:00
Mattias Engdegård
c46863d9bb Make force-load-doc-strings work again
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.
2022-08-07 10:25:03 +02:00
Po Lu
6fd4ab250b Revert "Improve X event timestamp tracking"
This reverts commit 4b98a79a50.

This change was installed without answering several important
questions.
2022-08-07 11:47:26 +08:00
Daniel Colascione
4b98a79a50 Improve X event timestamp tracking
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.

* src/gtkutil.h:
(xg_set_user_timestamp): Declare.

* src/gtkutil.c:
(xg_set_user_timestamp): New function.

* src/frame.c:
(Fframe_note_oob_interaction): New function.
(syms_of_frame): Register it.

* lisp/server.el:
(server-switch-buffer): Call frame-note-oob-interaction when user
requests frame be raised.
2022-08-06 23:44:07 -04:00
Po Lu
02ee025487 Correctly set user time on GTK+ for key press events
* src/xterm.c (x_set_gtk_user_time): New function.
(handle_one_xevent): Call that after key press event on GTK+.
2022-08-07 10:18:14 +08:00
Jonas Bernoulli
6706506c2b
* lisp/transient.el: Update to package version v0.3.7-158-gc09b34e 2022-08-07 00:28:18 +02:00
Alan Mackenzie
e43fa98a71 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.
2022-08-06 21:11:18 +00:00
Stefan Kangas
b459e275c3 Finish up obsoletion of mh-compat.el
* lisp/obsolete/mh-compat.el: Add "Obsolete-since" header.
* lisp/mh-e/mh-e.el (mh-compat): Don't require.
* lisp/mh-e/mh-utils.el (mailabbrev): Require.
2022-08-06 21:04:53 +02:00
Stefan Kangas
0a060a2bfe Make mh-compat.el obsolete
This used to be for XEmacs and old version compatibility, but nowadays
everything in this file is obsolete.

* lisp/mh-e/mh-compat.el: Move from here...
* lisp/obsolete/mh-compat.el: ...to here.
2022-08-06 20:34:45 +02:00
Stefan Kangas
f8354d1935 Move mh-flet macro to mh-acros.el
* lisp/mh-e/mh-compat.el (mh-flet): Move from here...
* lisp/mh-e/mh-acros.el (mh-flet): ...to here.
2022-08-06 20:33:50 +02:00
Stefan Kangas
db2b5e784b Make compat macro mh-display-completion-list obsolete
* lisp/mh-e/mh-compat.el (mh-display-completion-list): Make compat
macro obsolete.  Update callers.
2022-08-06 20:32:59 +02:00
Eli Zaretskii
7ffcba4213 * etc/PROBLEMS: Problems with Alacritty and Emoji. (Bug#56952) 2022-08-06 19:19:01 +03:00
Michael Albinus
b9c65203d0 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.

* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory)
(tramp-test22-file-times): Adapt tests.
2022-08-06 18:09:35 +02:00
Eli Zaretskii
a2127251a5 ; * src/composite.c: Include stdlib.h. 2022-08-06 18:37:57 +03:00
Stefan Kangas
7c8332e096 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.
2022-08-06 17:17:50 +02:00
Stefan Kangas
a3e894810a Fix defvar-keymap example in elisp manual
* lisp/textmodes/text-mode.el (text-mode-map): Convert to
defvar-keymap.
* doc/lispref/modes.texi (Example Major Modes): Fix example to
match code.
2022-08-06 17:17:38 +02:00
Stefan Kangas
56783e605c Make indented-text-mode alias obsolete
* lisp/textmodes/text-mode.el (indented-text-mode): Make compat
alias obsolete.
* lisp/allout.el (allout-use-hanging-indents):
* lisp/emulation/viper.el (viper-vi-state-mode-list):
* lisp/textmodes/remember.el (remember-mode):
* lisp/textmodes/text-mode.el (text-mode-map):
* lisp/vc/ediff-util.el (ediff-choose-syntax-table): Don't mention or
use above obsolete alias.
2022-08-06 17:05:22 +02:00
Stefan Kangas
2bbc5c5974 Make {close,replace}-rectangle compat aliases obsolete
* lisp/rect.el (close-rectangle, replace-rectangle): Make compat
aliases obsolete.
2022-08-06 17:03:47 +02:00
Stefan Kangas
fad87d84df 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.
2022-08-06 17:03:47 +02:00
Eli Zaretskii
6223e251a5 ; * src/composite.c (Fcomposition_sort_rules): Fix last change. 2022-08-06 18:00:16 +03:00
Eli Zaretskii
315b00ff8d New function 'composition-sort-rules'
* src/composite.c (Fcomposition_sort_rules)
(compare_composition_rules): New functions.
2022-08-06 17:58:08 +03:00
Jonas Bernoulli
bee6ee9de1 * doc/misc/transient.texi: Update to transient v0.3.7-156-ga5562cb
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.
2022-08-06 16:03:51 +02:00