1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-04 02:51:31 -08:00
Commit graph

158926 commits

Author SHA1 Message Date
Arash Esbati
7331ee112c 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.
2022-08-08 16:02:18 +02:00
Lars Ingebrigtsen
7f8a3d4e91 Clean up fix_command slightly
* src/callint.c (fix_command): Remove now-unused parameter.
(Fcall_interactively): Ditto.
2022-08-08 16:01:24 +02:00
Lars Ingebrigtsen
909931cb9a Further lisp-current-defun-name tweaks
* lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): Further
tweaks to finding the symbol being defined (defalias).
2022-08-08 15:53:41 +02:00
Lars Ingebrigtsen
ffc81ebc4b 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'.
2022-08-08 15:53:41 +02:00
Po Lu
498c5d26bb ; Fix coding style in recently installed changes to print.c
* src/print.c (struct print_buffer, struct print_context): Fix
brace position and make comments more like what is in
lisp.h/xterm.c/etc.
2022-08-08 20:56:50 +08:00
Lars Ingebrigtsen
55cc8b040b Make which-func-mode output less junk
* 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).
2022-08-08 14:32:33 +02:00
Stefan Kangas
3d7d8ddc5a ; Fix typos 2022-08-08 14:23:29 +02:00
Stefan Kangas
cf30432a14 * test/lisp/emacs-lisp/nadvice-tests.el: Re-add no-byte-compile. 2022-08-08 13:47:15 +02:00
Stefan Kangas
d8d13f2fcc 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.
2022-08-08 13:47:15 +02:00
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