]> git.eshelyaron.com Git - emacs.git/log
emacs.git
2 years agoMake outline buttons work in NEWS
Stephen Berman [Tue, 9 Aug 2022 18:21:09 +0000 (20:21 +0200)]
Make outline buttons work in NEWS

* lisp/outline.el (outline-minor-mode-highlight-buffer): Fix
button insertion.
(outline-minor-mode): Ditto.
(outline--insert-open-button): Don't mark buffer as modified when
inserting buttons.
(outline--insert-close-button): Ditto.

* lisp/textmodes/emacs-news-mode.el (emacs-news--mode-common):
Adjust outline regexp.

2 years ago; * src/keyboard.c (timer_check_2): Restore run-time conditions.
Eli Zaretskii [Tue, 9 Aug 2022 18:26:21 +0000 (21:26 +0300)]
; * src/keyboard.c (timer_check_2): Restore run-time conditions.

2 years agoRevert "Make compat alias check-ispell-version obsolete"
Eli Zaretskii [Tue, 9 Aug 2022 17:51:42 +0000 (20:51 +0300)]
Revert "Make compat alias check-ispell-version obsolete"

This reverts commit 24795e45e5fab6e2f699582662f9be7c5c6e25f8.

That alias is in no way obsolete, and was added for a different
reason.

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Tue, 9 Aug 2022 17:42:39 +0000 (20:42 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years agoFurther lisp-current-defun-name tweaks
Lars Ingebrigtsen [Tue, 9 Aug 2022 17:19:29 +0000 (19:19 +0200)]
Further lisp-current-defun-name tweaks

* lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): Tweak so
that cl-defmethod and friends work again.

2 years agoAdd a faster seq-uniq for lists
Lars Ingebrigtsen [Tue, 9 Aug 2022 17:18:55 +0000 (19:18 +0200)]
Add a faster seq-uniq for lists

* lisp/emacs-lisp/seq.el (seq-uniq): Add a faster method for lists
(bug#57079).

2 years agoFix python escape code fontification for multi-line literals
Laurence Warne [Tue, 9 Aug 2022 07:33:18 +0000 (08:33 +0100)]
Fix python escape code fontification for multi-line literals

* lisp/progmodes/python.el (python--string-bytes-literal-matcher): Go
backward one char after a match so that consecutive escape codes are
highlighted
(python--not-raw-string-literal-start-regexp): Make regular expression
more comprehensive, so multi-line bytes literals are not caught
(python-rx): Accept one to three octal digits in octal escape codes
instead of always three

2 years agoMake ibuffer-aif obsolete in favor of if-let
Stefan Kangas [Tue, 9 Aug 2022 16:15:56 +0000 (18:15 +0200)]
Make ibuffer-aif obsolete in favor of if-let

* lisp/ibuf-macs.el (ibuffer-aif): Make obsolete in favor of 'if-let'.
* lisp/ibuffer.el (ibuffer-mouse-toggle-mark)
(ibuffer-mark-interactive, ibuffer-compile-format, process):
Prefer 'if-let' to above obsolete macro.
(ibuffer-toggle-marks, ibuffer-map-lines): Prefer 'when-let'
to above obsolete macro.

2 years agoFurther Tramp fixes for Android 12
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.

* test/lisp/net/tramp-tests.el (tramp-test22-file-times): Adapt test.

2 years agoImprove message regarding missing LEIM
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.

2 years agoImprove readability of list-input-methods
Stefan Kangas [Tue, 9 Aug 2022 15:47:50 +0000 (17:47 +0200)]
Improve readability of list-input-methods

* lisp/international/mule-diag.el: Make screen more readable by
improving the formatting.

2 years agoReplace utility functions with seq-uniq
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.

2 years agoMerge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Eli Zaretskii [Tue, 9 Aug 2022 15:52:25 +0000 (18:52 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs

2 years agoMake the loaddefs.el file slightly shorter
Lars Ingebrigtsen [Tue, 9 Aug 2022 14:36:41 +0000 (16:36 +0200)]
Make the loaddefs.el file slightly shorter

* 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.

2 years agoMake ibuffer-awhen obsolete in favor of when-let
Stefan Kangas [Tue, 9 Aug 2022 13:46:54 +0000 (15:46 +0200)]
Make ibuffer-awhen obsolete in favor of when-let

* lisp/ibuf-macs.el (ibuffer-awhen): Make obsolete in favor of
'when-let'.  Update callers.

2 years agoMake ibuffer-split-list obsolete in favor of seq-group-by
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.

2 years agoMake compat alias check-ispell-version obsolete
Stefan Kangas [Tue, 9 Aug 2022 13:36:13 +0000 (15:36 +0200)]
Make compat alias check-ispell-version obsolete

* lisp/textmodes/ispell.el (check-ispell-version): Make compat
alias obsolete.

2 years ago* lisp/ibuffer.el (ibuffer): Use substitute-command-keys for help.
Stefan Kangas [Tue, 9 Aug 2022 13:35:15 +0000 (15:35 +0200)]
* lisp/ibuffer.el (ibuffer): Use substitute-command-keys for help.

2 years ago; * etc/NEWS: Mention the new 'js-json-mode'.
Eli Zaretskii [Tue, 9 Aug 2022 12:11:12 +0000 (15:11 +0300)]
; * etc/NEWS: Mention the new 'js-json-mode'.

2 years agoMake compat alias image-refresh obsolete
Stefan Kangas [Tue, 9 Aug 2022 12:04:12 +0000 (14:04 +0200)]
Make compat alias image-refresh obsolete

* lisp/image.el (image-refresh): Make compat alias obsolete.
Update callers.

2 years ago; * src/xterm.c (xi_populate_device_from_info): Minor ifdef cleanup.
Po Lu [Tue, 9 Aug 2022 11:55:47 +0000 (19:55 +0800)]
; * src/xterm.c (xi_populate_device_from_info): Minor ifdef cleanup.

2 years agoMake compat aliases obsolete in fortran.el
Stefan Kangas [Tue, 9 Aug 2022 11:20:07 +0000 (13:20 +0200)]
Make compat aliases obsolete in fortran.el

* lisp/progmodes/fortran.el (fortran-indent-new-line)
(fortran-auto-fill-mode): Make compat aliases obsolete; update
callers.

2 years ago* lisp/isearch.el (isearch-mode-help): Make compat alias obsolete.
Stefan Kangas [Tue, 9 Aug 2022 10:16:15 +0000 (12:16 +0200)]
* lisp/isearch.el (isearch-mode-help): Make compat alias obsolete.

2 years ago; * lisp/hex-util.el: Mention ash instead of lsh.
Stefan Kangas [Tue, 9 Aug 2022 01:24:55 +0000 (03:24 +0200)]
; * lisp/hex-util.el: Mention ash instead of lsh.

2 years agoCC Mode: Allow the insertion of long strings of letters in reasonable time
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.

2 years ago; * src/xterm.c (xi_disable_devices): Fix portability typo.
Po Lu [Tue, 9 Aug 2022 08:30:45 +0000 (16:30 +0800)]
; * src/xterm.c (xi_disable_devices): Fix portability typo.

2 years agoFactor out some duplicate code from handle_one_xevent
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.

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

d91ffdbec2 Don't mention XEmacs toolbar in ediff manual

2 years agoFix handling of XI_DeviceChanged events
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)

2 years agoAnother lisp-current-defun-name tweak
Michael Heerdegen [Tue, 9 Aug 2022 01:55:14 +0000 (03:55 +0200)]
Another lisp-current-defun-name tweak

* lisp/emacs-lisp/lisp-mode.el (lisp-current-defun-name): Avoid error
when edebug spec is the symbol t.

2 years agoAdd separate tiny major mode for JSON
Dmitry Gutov [Tue, 9 Aug 2022 01:00:08 +0000 (04:00 +0300)]
Add separate tiny major mode for JSON

* lisp/progmodes/js.el (js-json-mode): New major mode.

* lisp/files.el (auto-mode-alist): Use it for JSON (bug#56682).

* lisp/progmodes/js.el (js--class-decl-matcher):
Skip work if there are no frameworks enabled.

2 years ago; Delete stale comment from prolog.el
Stefan Kangas [Mon, 8 Aug 2022 22:03:49 +0000 (00:03 +0200)]
; Delete stale comment from prolog.el

* lisp/progmodes/prolog.el: Delete stale comment; XEmacs support has
been removed.

2 years ago; Delete stale and incorrect comment in ezimage.el
Stefan Kangas [Mon, 8 Aug 2022 19:31:50 +0000 (21:31 +0200)]
; Delete stale and incorrect comment in ezimage.el

The below comment seems to have been incorrect since 2002 (see commit
5f1fbf6b35).

* lisp/ezimage.el (ezimage-insert-image-button-maybe): Delete stale
and incorrect comment.

2 years agoDon't mention XEmacs toolbar in ediff manual
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.

2 years ago; * lisp/gnus/gnus.el (gnus-user-agent): Fix typo.
Stefan Kangas [Mon, 8 Aug 2022 19:27:37 +0000 (21:27 +0200)]
; * lisp/gnus/gnus.el (gnus-user-agent): Fix typo.

2 years ago; * lisp/gnus/gnus-art.el: Delete stale comments.
Stefan Kangas [Mon, 8 Aug 2022 17:33:28 +0000 (19:33 +0200)]
; * lisp/gnus/gnus-art.el: Delete stale comments.

2 years ago* lisp/progmodes/antlr-mode.el: Remove remnants of XEmacs support.
Stefan Kangas [Mon, 8 Aug 2022 16:08:20 +0000 (18:08 +0200)]
* lisp/progmodes/antlr-mode.el: Remove remnants of XEmacs support.

2 years agoRemove XEmacs specific symbol from gnus-user-agent
Stefan Kangas [Mon, 8 Aug 2022 15:56:36 +0000 (17:56 +0200)]
Remove XEmacs specific symbol from gnus-user-agent

* lisp/gnus/gnus.el (gnus-user-agent): Remove XEmacs specific
'codename' symbol.

2 years ago; Delete stale comment in mh-utils.el
Stefan Kangas [Mon, 8 Aug 2022 15:48:10 +0000 (17:48 +0200)]
; Delete stale comment in mh-utils.el

* lisp/mh-e/mh-utils.el (mh-normalize-folder-name): Remove stale and
incorrect comment.

2 years agoRemove some XEmacs compat code from mh-alias.el
Stefan Kangas [Mon, 8 Aug 2022 15:32:33 +0000 (17:32 +0200)]
Remove some XEmacs compat code from mh-alias.el

* lisp/mh-e/mh-alias.el (crm): Don't require for autoloaded
function.
(multi-prompt): Don't require XEmacs specific library.

2 years ago; Unconditionally require built-in libraries
Stefan Kangas [Mon, 8 Aug 2022 15:11:52 +0000 (17:11 +0200)]
; Unconditionally require built-in libraries

2 years agoClean up fix_command code slightly
Lars Ingebrigtsen [Mon, 8 Aug 2022 15:46:48 +0000 (17:46 +0200)]
Clean up fix_command code slightly

* src/callint.c (fix_command): Remove superfluous check.

2 years agoselect-active-regions doc string improvement
Lars Ingebrigtsen [Mon, 8 Aug 2022 15:46:21 +0000 (17:46 +0200)]
select-active-regions doc string improvement

* src/keyboard.c (syms_of_keyboard): Mention
post-select-region-hook.

2 years agoDo some NEWS tagging
Lars Ingebrigtsen [Mon, 8 Aug 2022 15:45:41 +0000 (17:45 +0200)]
Do some NEWS tagging

2 years ago* lisp/obsolete/makesum.el: Add "Obsolete-since" header.
Stefan Kangas [Sat, 6 Aug 2022 18:13:11 +0000 (20:13 +0200)]
* lisp/obsolete/makesum.el: Add "Obsolete-since" header.

2 years agoMake makesum.el obsolete
Stefan Kangas [Sat, 6 Aug 2022 18:11:57 +0000 (20:11 +0200)]
Make makesum.el obsolete

* lisp/makesum.el: Move from here...
* lisp/obsolete/makesum.el: ...to here.  (Bug#56979)

* test/lisp/makesum-tests.el: Move from here...
* test/lisp/obsolete/makesum-tests.el: ...to here.

2 years ago* src/print.c (struct print_buffer): Revert gratuitous format change.
Mattias Engdegård [Mon, 8 Aug 2022 14:26:29 +0000 (16:26 +0200)]
* src/print.c (struct print_buffer): Revert gratuitous format change.

2 years agoAdd NEWS note about interactive-args
Lars Ingebrigtsen [Mon, 8 Aug 2022 14:07:23 +0000 (16:07 +0200)]
Add NEWS note about interactive-args

2 years agoUpdate TODO about fix_command
Lars Ingebrigtsen [Mon, 8 Aug 2022 14:02:24 +0000 (16:02 +0200)]
Update TODO about fix_command

* etc/TODO: Remove bit about fix_command, which has now been fixed.

2 years agoImprove collecting of citation keys
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.

2 years agoClean up fix_command slightly
Lars Ingebrigtsen [Mon, 8 Aug 2022 14:01:24 +0000 (16:01 +0200)]
Clean up fix_command slightly

* src/callint.c (fix_command): Remove now-unused parameter.
(Fcall_interactively): Ditto.

2 years agoFurther lisp-current-defun-name tweaks
Lars Ingebrigtsen [Mon, 8 Aug 2022 13:52:53 +0000 (15:52 +0200)]
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).

2 years agoAllow specifying how args are to be stored in `command-history'
Lars Ingebrigtsen [Mon, 8 Aug 2022 13:52:19 +0000 (15:52 +0200)]
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'.

2 years ago; Fix coding style in recently installed changes to print.c
Po Lu [Mon, 8 Aug 2022 12:56:41 +0000 (20:56 +0800)]
; 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.

2 years agoMake which-func-mode output less junk
Lars Ingebrigtsen [Mon, 8 Aug 2022 12:31:54 +0000 (14:31 +0200)]
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).

2 years ago; Fix typos
Stefan Kangas [Mon, 8 Aug 2022 12:08:47 +0000 (14:08 +0200)]
; Fix typos

2 years ago* test/lisp/emacs-lisp/nadvice-tests.el: Re-add no-byte-compile.
Stefan Kangas [Mon, 8 Aug 2022 11:37:43 +0000 (13:37 +0200)]
* test/lisp/emacs-lisp/nadvice-tests.el: Re-add no-byte-compile.

2 years agoRemove redundant local variables in tests
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.

2 years agoRevert "Don't autoload obsolete library tpu-extras.el"
Stefan Kangas [Mon, 8 Aug 2022 10:03:30 +0000 (12:03 +0200)]
Revert "Don't autoload obsolete library tpu-extras.el"

This reverts commit 77bf50cb330807039cc84138fb84870bd6d532e2.

2 years agoGroup print buffer state in a struct
Mattias Engdegård [Mon, 8 Aug 2022 11:09:39 +0000 (13:09 +0200)]
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.

2 years agoTurn large macros in print.c to functions
Mattias Engdegård [Mon, 8 Aug 2022 10:39:12 +0000 (12:39 +0200)]
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.

2 years agoRemove no-byte-compile cookie from some libraries
Stefan Kangas [Mon, 8 Aug 2022 09:50:33 +0000 (11:50 +0200)]
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.

2 years agoDon't autoload obsolete library tpu-extras.el
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.

2 years agoClean up some local variable sections
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.

2 years agoFix warnings outside XI2 builds
Po Lu [Mon, 8 Aug 2022 03:59:08 +0000 (11:59 +0800)]
Fix warnings outside XI2 builds

* src/xterm.c (x_query_pointer): Juggle some definitions around.

2 years agoImprove handling of pointer focus under the input extension
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'.

2 years agoMinor cleanups in ediff-*.el
Stefan Kangas [Sun, 7 Aug 2022 17:21:09 +0000 (19:21 +0200)]
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.

2 years agoMake ediff-window-display-p obsolete
Stefan Kangas [Sun, 7 Aug 2022 15:50:33 +0000 (17:50 +0200)]
Make ediff-window-display-p obsolete

* lisp/vc/ediff-init.el (ediff-window-display-p): Redefine as
obsolete function alias for 'display-graphic-p'.

2 years ago; * lisp/emacs-lisp/bytecomp.el: indentation fix
Mattias Engdegård [Sun, 7 Aug 2022 15:18:21 +0000 (17:18 +0200)]
; * lisp/emacs-lisp/bytecomp.el: indentation fix

2 years agoPacify a gcc warning in xi_handle_focus_change
Lars Ingebrigtsen [Sun, 7 Aug 2022 15:22:46 +0000 (17:22 +0200)]
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;
      |                   ~~~~~~^~~~~~

2 years agoImprove Tramp error message
Michael Albinus [Sun, 7 Aug 2022 14:35:50 +0000 (16:35 +0200)]
Improve Tramp error message

* lisp/net/tramp-sh.el (tramp-sh-handle-file-local-copy):
Simplify for empty files.  Better error message.  (Bug#56879)

2 years agoFix blank/comment line handling in python-nav-beginning-of-block
kobarity [Sun, 7 Aug 2022 14:10:26 +0000 (16:10 +0200)]
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).

2 years agoFix 'vertical-motion' in bidi-reordered text
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.

2 years agoMake ediff-file-remote-p obsolete in favor of file-remote-p
Stefan Kangas [Sun, 7 Aug 2022 12:28:38 +0000 (14:28 +0200)]
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.

2 years ago; Improve obsoletions in ediff-init.el
Stefan Kangas [Sun, 7 Aug 2022 12:19:19 +0000 (14:19 +0200)]
; 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.

2 years agoDeclare unused function ediff-user-grabbed-mouse obsolete
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.

2 years agoMake compat function custom-reset-variables obsolete
Stefan Kangas [Sun, 7 Aug 2022 11:46:00 +0000 (13:46 +0200)]
Make compat function custom-reset-variables obsolete

* lisp/custom.el (custom-reset-variables): Make unused XEmacs compat
function obsolete.

2 years agoRemove workaround for XEmacs bug in ediff-util.el
Stefan Kangas [Sun, 7 Aug 2022 11:43:47 +0000 (13:43 +0200)]
Remove workaround for XEmacs bug in ediff-util.el

* lisp/vc/ediff-util.el (ediff-make-empty-tmp-file): Remove
workaround for XEmacs bug.

2 years ago* lib-src/etags.c: Remove XEmacs support.
Stefan Kangas [Sun, 7 Aug 2022 11:32:45 +0000 (13:32 +0200)]
* lib-src/etags.c: Remove XEmacs support.

2 years agoClarify lisp/Makefile.in comment
Lars Ingebrigtsen [Sun, 7 Aug 2022 12:40:54 +0000 (14:40 +0200)]
Clarify lisp/Makefile.in comment

* lisp/Makefile.in: Clarify comment.

2 years agoCC Mode: Fix looping in patch from yesterday
Alan Mackenzie [Sun, 7 Aug 2022 12:26:16 +0000 (12:26 +0000)]
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.

2 years agoTweak autoloads lisp/Makefile.in dependencies
Lars Ingebrigtsen [Sun, 7 Aug 2022 12:02:42 +0000 (14:02 +0200)]
Tweak autoloads lisp/Makefile.in dependencies

* lisp/Makefile.in (autoloads): Adjust the dependencies to what
they were before, and update the comments.

2 years ago; Improve time-convert call in recently changed test
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>.

2 years agoImprove how url-http displays status messages
Stefan Kangas [Sun, 7 Aug 2022 11:14:20 +0000 (13:14 +0200)]
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'.

2 years agoMerge from origin/emacs-28
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.

2 years agoCease emitting negative file offsets for user variables
Mattias Engdegård [Sun, 7 Aug 2022 08:52:16 +0000 (10:52 +0200)]
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.

2 years agoUse struct for saved strings in the reader
Mattias Engdegård [Sat, 6 Aug 2022 14:39:42 +0000 (16:39 +0200)]
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.

2 years agoMake force-load-doc-strings work again
Mattias Engdegård [Sat, 6 Aug 2022 11:38:12 +0000 (13:38 +0200)]
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.

2 years agoRevert "Improve X event timestamp tracking"
Po Lu [Sun, 7 Aug 2022 03:47:26 +0000 (11:47 +0800)]
Revert "Improve X event timestamp tracking"

This reverts commit 4b98a79a508ebdc719abfcf51ee6de32e46d0e1c.

This change was installed without answering several important
questions.

2 years agoImprove X event timestamp tracking
Daniel Colascione [Sun, 7 Aug 2022 03:42:36 +0000 (23:42 -0400)]
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.

2 years agoCorrectly set user time on GTK+ for key press events
Po Lu [Sun, 7 Aug 2022 02:18:14 +0000 (10:18 +0800)]
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+.

2 years ago* lisp/transient.el: Update to package version v0.3.7-158-gc09b34e
Jonas Bernoulli [Sat, 6 Aug 2022 22:28:18 +0000 (00:28 +0200)]
* lisp/transient.el: Update to package version v0.3.7-158-gc09b34e

2 years agoCC Mode: Optimize font-locking stanzas for long raw strings.
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.

2 years agoFinish up obsoletion of mh-compat.el
Stefan Kangas [Sat, 6 Aug 2022 18:36:13 +0000 (20:36 +0200)]
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.

2 years agoMake mh-compat.el obsolete
Stefan Kangas [Sat, 6 Aug 2022 18:34:45 +0000 (20:34 +0200)]
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.

2 years agoMove mh-flet macro to mh-acros.el
Stefan Kangas [Sat, 6 Aug 2022 18:33:50 +0000 (20:33 +0200)]
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.

2 years agoMake compat macro mh-display-completion-list obsolete
Stefan Kangas [Sat, 6 Aug 2022 18:32:59 +0000 (20:32 +0200)]
Make compat macro mh-display-completion-list obsolete

* lisp/mh-e/mh-compat.el (mh-display-completion-list): Make compat
macro obsolete.  Update callers.

2 years ago* etc/PROBLEMS: Problems with Alacritty and Emoji. (Bug#56952)
Eli Zaretskii [Sat, 6 Aug 2022 16:19:01 +0000 (19:19 +0300)]
* etc/PROBLEMS: Problems with Alacritty and Emoji.  (Bug#56952)

2 years agoAdapt Tramp for Android 12
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.

* test/lisp/net/tramp-tests.el (tramp-test17-insert-directory)
(tramp-test22-file-times): Adapt tests.

2 years ago; * src/composite.c: Include stdlib.h.
Eli Zaretskii [Sat, 6 Aug 2022 15:37:57 +0000 (18:37 +0300)]
; * src/composite.c: Include stdlib.h.