]> git.eshelyaron.com Git - emacs.git/log
emacs.git
21 months agoUpdate Android port
Po Lu [Fri, 24 Mar 2023 02:43:34 +0000 (10:43 +0800)]
Update Android port

* src/sfnt.c (sfnt_table_names): Add fvar, gvar, cvar.
(sfnt_read_maxp_table): Call xmalloc, not malloc.
(sfnt_read_simple_glyph): Avoid use-after-free if simple is
invalid.
(sfnt_fill_span): Fix max coverage.
(sfnt_normalize_vector): Fail if magnitude is zero.
(sfnt_measure_distance): Fix opcode order.
(sfnt_dot_fix_14): Fix implementation.
(struct sfnt_variation_axis, struct sfnt_instance)
(struct sfnt_fvar_table, struct sfnt_gvar_table)
(sfnt_read_fvar_table, sfnt_read_gvar_table, struct sfnt_blend)
(sfnt_init_blend, sfnt_free_blend, sfnt_normalize_blend)
(struct sfnt_tuple_header, struct sfnt_gvar_glyph_header)
(sfnt_read_packed_points, sfnt_read_packed_deltas)
(sfnt_compute_tuple_scale, sfnt_infer_deltas_1, sfnt_infer_deltas)
(sfnt_vary_glyph): Add WIP variation glyph implementation.
* src/sfnt.h (enum sfnt_table, struct sfnt_simple_glyph):
Likewise.

21 months ago; * java/INSTALL: Fix typo.
Po Lu [Mon, 20 Mar 2023 07:37:07 +0000 (15:37 +0800)]
; * java/INSTALL: Fix typo.

21 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Mon, 20 Mar 2023 06:48:13 +0000 (14:48 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

21 months agoUpdate Android port
Po Lu [Mon, 20 Mar 2023 06:47:39 +0000 (14:47 +0800)]
Update Android port

* configure.ac: Add support for HarfBuzz on Android.
* java/INSTALL: Document where to get Emacs with HarfBuzz.
* lisp/subr.el (overriding-text-conversion-style, y-or-n-p):
Correctly set text conversion style if y-or-n-p is called inside
the minibuffer.
* src/sfnt.c (sfnt_read_cmap_format_8)
(sfnt_read_cmap_format_12): Fix typos.
(sfnt_read_24, sfnt_read_cmap_format_14): New function.
(sfnt_read_cmap_table_1, sfnt_read_cmap_table): Handle format 14
cmap tables.
(sfnt_read_default_uvs_table, sfnt_read_nondefault_uvs_table)
(sfnt_compare_table_offsets, sfnt_create_uvs_context)
(sfnt_free_uvs_context, sfnt_compare_uvs_mapping)
(sfnt_variation_glyph_for_char, sfnt_map_table, sfnt_unmap_table)
(sfnt_read_table, sfnt_test_uvs): New functions.
(main): Add UVS tests.
* src/sfnt.h (struct sfnt_cmap_format_14)
(struct sfnt_variation_selector_record)
(struct sfnt_default_uvs_table, struct sfnt_unicode_value_range)
(struct sfnt_nondefault_uvs_table, struct sfnt_uvs_mapping)
(struct sfnt_mapped_variation_selector_record)
(struct sfnt_table_offset_rec, struct sfnt_uvs_context)
(struct sfnt_mapped_table): New structures.  Update prototypes.
* src/sfntfont-android.c (android_sfntfont_driver): Register
HarfBuzz callbacks where required.
* src/sfntfont.c (sfntfont_select_cmap): Look for a format 14
table.  Save it in new arg FORMAT14.
(sfntfont_read_cmap): Adjust accordingly.
(struct sfnt_font_info): New field `uvs'.  New fields `hb_font',
`fd' and `directory'.
(sfntfont_open): Open uvs context.  Under HarfBuzz, don't close
the fd or subtable, but save them in the font info instead.
(sfntfont_close): Free UVS context.  Close font fd and table
directory and HarfBuzz font.
(sfntfont_draw): Handle case where s->padding_p.
(sfntfont_get_variation_glyphs): New function.
(sfntfont_unmap_blob, sfntfont_get_font_table)
(sfntfont_begin_hb_font): New functions.
* src/sfntfont.h: Update prototypes.
* src/textconv.c (Fset_text_conversion_style): Fix doc string.

21 months agoMerge from origin/emacs-29
Stefan Kangas [Mon, 20 Mar 2023 05:30:40 +0000 (06:30 +0100)]
Merge from origin/emacs-29

b7f03333551 Improve warning about changing the string returned by sym...
e62f8b0239d Fix visiting XBM/XPM files when 'c-ts-mode' is active
94d1c81cf07 * lisp/mpc.el (mpc-format): Fix oversight in commit 48b6c...
a4d97811ed4 Bail early from eglot--apply-text-edits if nothing to do
61d571760b3 ; Clarify in-code commentary of eglot--after-change
5bbbd70f56e Improve ergonomics of Eglot's inlay hints
c3a543123ab Protect against too large size of 'recent-keys' vector
231190b37f8 * lisp/net/tramp.el (tramp-yn-prompt-regexp): Fix regexp.
0bebd0e5f09 ; Remove 'build-module' and 'html-manual' directories fro...
6674c362ad9 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
829e5dfabea Update to Org 9.6.1-48-g92471e
e84f878e19a ; * admin/notes/tree-sitter/starter-guide: Update starter...
ea0949853f8 Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/...
11592bcfda6 ; * lisp/nxml/xmltok.el (xmltok-scan-attributes): Fix las...
e388a77cf0b ; Minor copyedits of recent changes in ELisp reference ma...
33a26703689 ; Minor fixes in recent Eglot changes
d2cf1386fa4 ; * doc/misc/eglot.texi (Eglot Commands): Improve indexing.
b75e489362b ; Again correct node reference casing in doc/misc/eglot.texi
a55d2edc5a9 ; Remove overly verbose commentary
22a70451f34 Merge confusing duplicate sections on commands in Eglot m...
3293f939882 Don't take over mouse-1 binding on Eglot diagnostics (bug...
013057e3512 ; Prefer "language server" to "LSP server" in Eglot manual
94a21c88647 * lisp/progmodes/eglot.el (eglot--connect): Improve Tramp...
0eddfa28ebd Avoid slowdowns in xmltok-scan-attributes
647c6bf2a6c ; * test/lisp/abbrev-tests.el (abbrev--possibly-save-test...
531f8f7103a ; * admin/git-bisect-start: Update failing commits

# Conflicts:
# admin/notes/tree-sitter/build-module/batch.sh
# admin/notes/tree-sitter/build-module/build.sh

21 months ago; Merge from origin/emacs-29
Stefan Kangas [Mon, 20 Mar 2023 05:30:39 +0000 (06:30 +0100)]
; Merge from origin/emacs-29

The following commits were skipped:

147773a1ef2 CC Mode: Eliminate duplicate function c-list-of-strings
f77ea400db0 CC Mode: Allow lists of strings as safe values for *-font...

21 months agoMerge from origin/emacs-29
Stefan Kangas [Mon, 20 Mar 2023 05:30:39 +0000 (06:30 +0100)]
Merge from origin/emacs-29

aedb9e3ec37 Add tests for Bug#62207
faee8d50738 ; Fix 'make-obsolete-variable' forms

21 months ago; Merge from origin/emacs-29
Stefan Kangas [Mon, 20 Mar 2023 05:30:39 +0000 (06:30 +0100)]
; Merge from origin/emacs-29

The following commit was skipped:

f0b4ebbaf62 Fix 'find-ls-option-default-ls' for BSD/MacOS (bug#62096)

21 months agoMerge from origin/emacs-29
Stefan Kangas [Mon, 20 Mar 2023 05:30:32 +0000 (06:30 +0100)]
Merge from origin/emacs-29

ea87c54f359 ; * lisp/subr.el (setq-local): Add missing period (bug#62...
90362f87d58 ; Correct last commit, downcase node reference
38067f05b92 Enhance section about troubleshooting in Eglot manual.
6f82596b490 Fix Eglot's snippet insertion to follow the manual
c54bda15e35 Reset abbrevs-changed after saving abbrevs (bug#62208)
e8cee15f780 ; Fix markup in previous change
e4a7d0cd6ea Document `keymap-unset' in lispref
bb3e0ded9eb Don't add a key binding when REMOVE is non-nil
a4a9ffdd80a Fix the documentation of various aspects of adding Xref h...
a2222b9a9bf ; Minor wording fix in ELisp reference manual
5cf1de683b2 Fix python-fill-paragraph problems on filling strings (bu...
7385c991dff Also exempt eglot-inlay-hints-mode from desktop.el's fumb...
1961bdb52ed ; Add WebDAV entry to index in Tramp manual
dfb36d36230 Refer to EWW instead of w3 and w3m
9d3fdf7e0d4 Fix Eglot's command generation for code actions

# Conflicts:
# etc/NEWS

21 months ago; Merge from origin/emacs-29
Stefan Kangas [Mon, 20 Mar 2023 05:30:30 +0000 (06:30 +0100)]
; Merge from origin/emacs-29

The following commit was skipped:

e10144c1568 Emphasize emacs-29-specificity in this version of lisp/pr...

21 months agoMerge from origin/emacs-29
Stefan Kangas [Mon, 20 Mar 2023 05:30:30 +0000 (06:30 +0100)]
Merge from origin/emacs-29

028f1102738 Fix quoting of font-family in 'hfy-family'
4cb8a850b08 ; Tweak doc/misc/eglot.texi
d5d4959ed7d Document how to construct JSONRPC arrays in Eglot manual
078cf512eef * test/infra/Dockerfile.emba: Use debian:bullseye.
61adb44318a * configure.ac: Fix native comp compatibility check (bug#...
d814c249f44 * test/infra/Dockerfile.emba: Install clangd.
27edd7f88cb Remove 'package-vc--query-spec'
39fea115515 Do not store :lisp-dir in package descriptors
168165178f3 Use 'package-vc-selected-packages' to store package specs

21 months ago; Merge from origin/emacs-29
Stefan Kangas [Mon, 20 Mar 2023 05:30:30 +0000 (06:30 +0100)]
; Merge from origin/emacs-29

The following commit was skipped:

d3ad6c5e161 ; Auto-commit of loaddefs files.

21 months agoImprove warning about changing the string returned by symbol-name
Gregory Heytings [Sat, 18 Mar 2023 22:41:33 +0000 (22:41 +0000)]
Improve warning about changing the string returned by symbol-name

* src/data.c (Fsymbol_name): Add warning.  See bug#62009.

* doc/lispref/symbols.texi (Creating Symbols): Improve warning.

21 months agoFix visiting XBM/XPM files when 'c-ts-mode' is active
Eli Zaretskii [Sun, 19 Mar 2023 20:19:52 +0000 (22:19 +0200)]
Fix visiting XBM/XPM files when 'c-ts-mode' is active

* lisp/progmodes/c-ts-mode.el (treesit-ready-p): Fix association
for XBM/XPM files in 'auto-mode-alist'.  (Bug#62276)

21 months ago* lisp/mpc.el (mpc-format): Fix oversight in commit 48b6cec61cf
Stefan Monnier [Sun, 19 Mar 2023 20:02:52 +0000 (16:02 -0400)]
* lisp/mpc.el (mpc-format): Fix oversight in commit 48b6cec61cf

21 months agoBail early from eglot--apply-text-edits if nothing to do
João Távora [Sun, 19 Mar 2023 19:44:31 +0000 (19:44 +0000)]
Bail early from eglot--apply-text-edits if nothing to do

* lisp/progmodes/eglot.el (eglot--apply-text-edits): Early return.

21 months ago; Clarify in-code commentary of eglot--after-change
João Távora [Sun, 19 Mar 2023 01:03:47 +0000 (01:03 +0000)]
; Clarify in-code commentary of eglot--after-change

* lisp/progmodes/eglot.el (eglot--after-change): Minor
clarification to commentary.

21 months agoImprove ergonomics of Eglot's inlay hints
João Távora [Sun, 19 Mar 2023 00:47:55 +0000 (00:47 +0000)]
Improve ergonomics of Eglot's inlay hints

Instead of deleting inlay hints instantly as soon as the affected
changes, make hint overlays span one character (instead of being
length 0).  Give the overlays an "evaporate" property.

Given an inlay hints at position POS, its attached to [POS, POS+1] if
it's kind=1 (usually type hints) and [POS-1, POS] otherwise.  For
kind=1 hints, the 'cursor position of the first such overlay is also
tweaked, so that's it's less akward to edit around it.

* lisp/progmodes/eglot.el (eglot--before-change): Don't delete hints
  here.
  (eglot--update-hints-1): Rework.

21 months ago(textsec-bidi-controls-suspicious-p): Minor tweak
Stefan Monnier [Sat, 21 Jan 2023 13:51:54 +0000 (08:51 -0500)]
(textsec-bidi-controls-suspicious-p): Minor tweak

* lisp/international/textsec.el (textsec-bidi-controls-suspicious-p):
Don't assume point-min==1 (and point-min is marginally more
efficient, to boot).

21 months ago* lisp/frame.el (handle-move-frame): Fix corner case error
Stefan Monnier [Sat, 21 Jan 2023 13:49:48 +0000 (08:49 -0500)]
* lisp/frame.el (handle-move-frame): Fix corner case error

21 months agoProtect against too large size of 'recent-keys' vector
Eli Zaretskii [Sun, 19 Mar 2023 18:44:51 +0000 (20:44 +0200)]
Protect against too large size of 'recent-keys' vector

* src/keyboard.c (MAX_NUM_RECENT_KEYS): New macro.
(Flossage_size): Don't allow specifying too large lossage-size.
Fix data types.  (Bug#62277)

21 months agoRename tramp-use-ssh-controlmaster-options to tramp-use-connection-share
Michael Albinus [Sun, 19 Mar 2023 12:11:06 +0000 (13:11 +0100)]
Rename tramp-use-ssh-controlmaster-options to tramp-use-connection-share

* doc/misc/tramp.texi (Ssh setup): Use tramp-use-connection-share.
Describe its settings for PuTTY.
(Remote processes): Use tramp-use-connection-share.

* etc/NEWS: Renamed user option tramp-use-connection-share.

* lisp/net/tramp-integration.el
(tramp-compile-disable-ssh-controlmaster-options):
Use `tramp-use-connection-share'.

* lisp/net/tramp-sh.el (tramp-use-connection-share):
Rename from `tramp-use-ssh-controlmaster-options'.  Make it a
defvaralias to `tramp-use-ssh-controlmaster-options'.
(tramp-ssh-controlmaster-options): Adapt docstring.
(tramp-methods) <plink, plinkx, pscp, psftp>: Adapt.
(tramp-ssh-controlmaster-options): Add plink implementation.

21 months ago* lisp/net/tramp.el (tramp-yn-prompt-regexp): Fix regexp.
Michael Albinus [Sun, 19 Mar 2023 08:37:35 +0000 (09:37 +0100)]
* lisp/net/tramp.el (tramp-yn-prompt-regexp): Fix regexp.

21 months ago; Remove 'build-module' and 'html-manual' directories from 'admin'
Eli Zaretskii [Sun, 19 Mar 2023 06:09:33 +0000 (08:09 +0200)]
; Remove 'build-module' and 'html-manual' directories from 'admin'

These files were temporarily in the repository and are
no longer needed, once they fulfilled their job.

21 months agoMerge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
Eli Zaretskii [Sun, 19 Mar 2023 05:57:40 +0000 (07:57 +0200)]
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29

21 months agoDon't over-normalize file names starting with "~" in Eshell
Jim Porter [Sun, 12 Mar 2023 07:53:34 +0000 (23:53 -0800)]
Don't over-normalize file names starting with "~" in Eshell

Previously, this would call 'expand-file-name' on the file name, but
that normalizes the value, turning something like "~/." into
"/home/user".  As a result, Pcomplete didn't work for dotfiles after
"~/" (bug#28064).

* lisp/eshell/em-dirs.el (eshell-expand-user-reference): New
function...
(eshell-expand-user-reference): ... use it.

21 months agoUpdate to Org 9.6.1-48-g92471e
Kyle Meyer [Sun, 19 Mar 2023 01:41:22 +0000 (21:41 -0400)]
Update to Org 9.6.1-48-g92471e

21 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Sun, 19 Mar 2023 01:07:29 +0000 (09:07 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

21 months ago; * admin/notes/tree-sitter/starter-guide: Update starter-guide.
Yuan Fu [Sat, 18 Mar 2023 21:13:31 +0000 (14:13 -0700)]
; * admin/notes/tree-sitter/starter-guide: Update starter-guide.

21 months agoMerge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29
Eli Zaretskii [Sat, 18 Mar 2023 15:14:44 +0000 (17:14 +0200)]
Merge branch 'emacs-29' of git.savannah.gnu.org:/srv/git/emacs into emacs-29

21 months ago; * lisp/nxml/xmltok.el (xmltok-scan-attributes): Fix last change
Gregory Heytings [Sat, 18 Mar 2023 15:04:26 +0000 (15:04 +0000)]
; * lisp/nxml/xmltok.el (xmltok-scan-attributes): Fix last change

21 months ago; Minor copyedits of recent changes in ELisp reference manual
Eli Zaretskii [Sat, 18 Mar 2023 13:54:35 +0000 (15:54 +0200)]
; Minor copyedits of recent changes in ELisp reference manual

* doc/lispref/keymaps.texi (Changing Key Bindings): Fix wording
and markup.

21 months ago; Minor fixes in recent Eglot changes
Eli Zaretskii [Sat, 18 Mar 2023 13:46:05 +0000 (15:46 +0200)]
; Minor fixes in recent Eglot changes

* doc/misc/eglot.texi (Project-specific configuration): Fix
whitespace.

* lisp/progmodes/eglot.el (eglot-diagnostics-map): Doc fix.

21 months ago; * doc/misc/eglot.texi (Eglot Commands): Improve indexing.
Eli Zaretskii [Sat, 18 Mar 2023 13:41:55 +0000 (15:41 +0200)]
; * doc/misc/eglot.texi (Eglot Commands): Improve indexing.

21 months ago; Again correct node reference casing in doc/misc/eglot.texi
João Távora [Sat, 18 Mar 2023 12:43:31 +0000 (12:43 +0000)]
; Again correct node reference casing in doc/misc/eglot.texi

Emacs's info-generating Texinfo incantation seems to be case
insensitive, but others -- like Eglot's HTML manual generation -- is
case sensitive.

* doc/misc/eglot.texi (Eglot Features): Fix.

21 months ago; Remove overly verbose commentary
João Távora [Sat, 18 Mar 2023 12:25:52 +0000 (12:25 +0000)]
; Remove overly verbose commentary

* lisp/progmodes/eglot.el (eglot--connect): Remove overly verbose
commentary.

21 months agoMerge confusing duplicate sections on commands in Eglot manual
João Távora [Sat, 18 Mar 2023 12:28:22 +0000 (12:28 +0000)]
Merge confusing duplicate sections on commands in Eglot manual

Also describe eglot-diagnostics-map.

* doc/misc/eglot.texi (Eglot Features): Don't describe commands here.
(Eglot Commands): Describe commands here.

21 months agoDon't take over mouse-1 binding on Eglot diagnostics (bug#62157)
João Távora [Fri, 17 Mar 2023 22:37:27 +0000 (22:37 +0000)]
Don't take over mouse-1 binding on Eglot diagnostics (bug#62157)

It's better to give the user a variable to allow the overlay keymap to
be customized.

* lisp/progmodes/eglot.el (eglot--mouse-call): Accept second arg.
(eglot--mode-line-props): Adapt call to eglot--mouse-call
(eglot-diagnostics-map): New variable.
(eglot-code-actions-at-mouse): New command.

21 months ago; Prefer "language server" to "LSP server" in Eglot manual
João Távora [Fri, 17 Mar 2023 22:33:46 +0000 (22:33 +0000)]
; Prefer "language server" to "LSP server" in Eglot manual

* eglot.texi (Quick Start, Customizing Eglot)
(Project-specific configuration)
(Troubleshooting Eglot): LSP server -> language server.

21 months ago* lisp/progmodes/eglot.el (eglot--connect): Improve Tramp workaround.
Michael Albinus [Sat, 18 Mar 2023 12:13:56 +0000 (13:13 +0100)]
* lisp/progmodes/eglot.el (eglot--connect): Improve Tramp workaround.

21 months agoUpdate Android port
Po Lu [Sat, 18 Mar 2023 12:05:38 +0000 (20:05 +0800)]
Update Android port

* java/org/gnu/emacs/EmacsView.java (onAttachedToWindow): Send
measured width and height in exposures again.

21 months agoPrefix Tramp internal process properties with "tramp-".
Michael Albinus [Sat, 18 Mar 2023 11:54:51 +0000 (12:54 +0100)]
Prefix Tramp internal process properties with "tramp-".

* lisp/net/tramp.el (tramp-get-process, tramp-message)
(tramp-handle-make-process, tramp-handle-file-notify-valid-p)
(tramp-process-actions, tramp-accept-process-output)
(tramp-process-sentinel, tramp-read-passwd)
(tramp-interrupt-process, tramp-signal-process):
* lisp/net/tramp-adb.el (tramp-adb-maybe-open-connection):
* lisp/net/tramp-cmds.el (tramp-cleanup-connection):
* lisp/net/tramp-crypt.el (tramp-crypt-maybe-open-connection):
* lisp/net/tramp-gvfs.el (tramp-gvfs-handle-file-notify-add-watch)
(tramp-gvfs-monitor-process-filter)
(tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-rclone.el (tramp-rclone-maybe-open-connection):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-file-notify-add-watch)
(tramp-sh-gio-monitor-process-filter)
(tramp-sh-inotifywait-process-filter)
(tramp-barf-if-no-shell-prompt, tramp-maybe-open-connection):
* lisp/net/tramp-smb.el (tramp-smb-handle-copy-directory)
(tramp-smb-handle-file-acl, tramp-smb-handle-set-file-acl)
(tramp-smb-maybe-open-connection):
* lisp/net/tramp-sshfs.el (tramp-sshfs-maybe-open-connection):
* lisp/net/tramp-sudoedit.el (tramp-sudoedit-maybe-open-connection)
(tramp-sudoedit-send-command): Prefix internal process properties
with "tramp-".

21 months agoAvoid slowdowns in xmltok-scan-attributes
Gregory Heytings [Sat, 18 Mar 2023 10:49:29 +0000 (10:49 +0000)]
Avoid slowdowns in xmltok-scan-attributes

* lisp/nxml/xmltok.el (xmltok-scan-attributes): Limit the search
to 10000 characters, to avoid slowdowns due to the quadratic
complexity of the regexp.  Suggested by Stefan Monnier.

21 months ago; * test/lisp/abbrev-tests.el (abbrev--possibly-save-test): Fix test.
Eli Zaretskii [Sat, 18 Mar 2023 10:35:10 +0000 (12:35 +0200)]
; * test/lisp/abbrev-tests.el (abbrev--possibly-save-test): Fix test.

21 months ago; * admin/git-bisect-start: Update failing commits
Gregory Heytings [Sat, 18 Mar 2023 10:31:36 +0000 (10:31 +0000)]
; * admin/git-bisect-start: Update failing commits

21 months agoCC Mode: Eliminate duplicate function c-list-of-strings
Alan Mackenzie [Sat, 18 Mar 2023 10:12:24 +0000 (10:12 +0000)]
CC Mode: Eliminate duplicate function c-list-of-strings

Replace it with the existing c-string-list-p.  Also put an autoload cookie in
front of c-string-list-p so that it will not be signalled as undefined by
loaddefs.el.

lisp/progmodes/cc-vars.el (c-string-list-p): Make this autoload.
(c-list-of-strings): Remove.
(c-font-lock-extra-types, c++-font-lock-extra-types)
(objc-font-lock-extra-types, java-font-lock-extra-types)
(idl-font-lock-extra-types, pike-font-lock-extra-types): In the autoload
cookies, replace c-list-of-strings with c-string-list-p.

21 months agoCC Mode: Allow lists of strings as safe values for *-font-lock-extra-types
Alan Mackenzie [Mon, 13 Mar 2023 16:42:02 +0000 (16:42 +0000)]
CC Mode: Allow lists of strings as safe values for *-font-lock-extra-types

* lisp/progmodes/cc-vars.el (c-list-of-strings): New function.
(c-font-lock-extra-types, c++-font-lock-extra-types)
(objc-font-lock-extra-types, java-font-lock-extra-types)
(idl-font-lock-extra-types, pike-font-lock-extra-types): Add a :safe entry
into each of thes defcustoms for c-list-of-string.
(Top level): Add an autoload entry for each of the above.

21 months agoCC Mode: Eliminate duplicate function c-list-of-strings
Alan Mackenzie [Sat, 18 Mar 2023 10:12:24 +0000 (10:12 +0000)]
CC Mode: Eliminate duplicate function c-list-of-strings

Replace it with the existing c-string-list-p.  Also put an autoload cookie in
front of c-string-list-p so that it will not be signalled as undefined by
loaddefs.el.

lisp/progmodes/cc-vars.el (c-string-list-p): Make this autoload.
(c-list-of-strings): Remove.
(c-font-lock-extra-types, c++-font-lock-extra-types)
(objc-font-lock-extra-types, java-font-lock-extra-types)
(idl-font-lock-extra-types, pike-font-lock-extra-types): In the autoload
cookies, replace c-list-of-strings with c-string-list-p.

21 months agoAdd tests for Bug#62207
Robert Pluim [Sat, 18 Mar 2023 09:33:39 +0000 (10:33 +0100)]
Add tests for Bug#62207

* test/src/keymap-tests.el (keymap-unset-test-remove-and-inheritance):
New test.

21 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Sat, 18 Mar 2023 07:31:31 +0000 (15:31 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

21 months ago; Fix 'make-obsolete-variable' forms
Eli Zaretskii [Sat, 18 Mar 2023 07:12:12 +0000 (09:12 +0200)]
; Fix 'make-obsolete-variable' forms

* lisp/url/url-misc.el (url-misc-rlogin-obsolete-warned-once):
* lisp/url/url-gw.el (url-gw-rlogin-obsolete-warned-once): Fix
make-obsolete-variable form.  (Bug#62248)

21 months ago; * lisp/find-dired.el (find-gnu-find-p): Doc fix.
Eli Zaretskii [Sat, 18 Mar 2023 06:32:20 +0000 (08:32 +0200)]
; * lisp/find-dired.el (find-gnu-find-p): Doc fix.

21 months agoFix 'find-ls-option-default-ls' for BSD/MacOS (bug#62096)
Manuel Giraud [Fri, 10 Mar 2023 20:54:00 +0000 (21:54 +0100)]
Fix 'find-ls-option-default-ls' for BSD/MacOS (bug#62096)

* lisp/find-dired.el (find-gnu-find-p): New variable to determine
if "find" is a GNU find.
(find-ls-option-default-ls): Use 'find-gnu-find-p' and adapt to a
value that works with the default "find" on *BSD and Darwin/MacOS.
Tested on OpenBSD and MacOS.

21 months agoFix 'find-ls-option-default-ls' for BSD/MacOS (bug#62096)
Manuel Giraud [Fri, 10 Mar 2023 20:54:00 +0000 (21:54 +0100)]
Fix 'find-ls-option-default-ls' for BSD/MacOS (bug#62096)

* lisp/find-dired.el (find-ls-option-default-ls): Adapt to
a value that works with the default "find" on *BSD and
Darwin/MacOS.  Tested on OpenBSD and MacOS.  Do not merge
to master.

21 months agoRemove extraneous debugging code
Po Lu [Sat, 18 Mar 2023 05:07:59 +0000 (13:07 +0800)]
Remove extraneous debugging code

* src/androidterm.c (handle_one_android_event): Don't log expose
events.

21 months agoWork around pselect lossage on Android
Po Lu [Sat, 18 Mar 2023 03:59:17 +0000 (11:59 +0800)]
Work around pselect lossage on Android

* src/android.c (android_run_select_thread): New flag.  Use it
rather than the rc of pselect and errno to determine whether or
not it has been interrupted.
(android_handle_sigusr1): Set said flag.

21 months agoUpdate Android port
Po Lu [Sat, 18 Mar 2023 02:54:26 +0000 (10:54 +0800)]
Update Android port

* java/org/gnu/emacs/EmacsView.java (EmacsView)
(prepareForLayout): New function.  Call this prior to mapping
the view.
(onGlobalLayout): New function.  Register as global layout
listener.
* java/org/gnu/emacs/EmacsWindow.java (EmacsWindow)
(notifyContentRectPosition): New function.  Use specified
xPosition and yPosition when reporting the offsets of children
of the root window.
* java/org/gnu/emacs/EmacsWindowAttachmentManager.java
(registerWindow): Specify activity launch bounds if necessary.
* src/androidterm.c (handle_one_android_event): Send
MOVE_FRAME_EVENT where necessary.

21 months ago; * lisp/subr.el (setq-local): Add missing period (bug#62242).
Arash Esbati [Fri, 17 Mar 2023 13:25:37 +0000 (14:25 +0100)]
; * lisp/subr.el (setq-local): Add missing period (bug#62242).

21 months ago; Correct last commit, downcase node reference
João Távora [Fri, 17 Mar 2023 14:21:11 +0000 (14:21 +0000)]
; Correct last commit, downcase node reference

* doc/misc/eglot.texi (Troubleshooting Eglot): Downcase node reference

21 months agoEnhance section about troubleshooting in Eglot manual.
João Távora [Fri, 17 Mar 2023 14:07:36 +0000 (14:07 +0000)]
Enhance section about troubleshooting in Eglot manual.

* doc/misc/eglot.texi (Troubleshooting Eglot): Parially rewrite.

21 months agoFix Eglot's snippet insertion to follow the manual
João Távora [Fri, 17 Mar 2023 11:47:02 +0000 (11:47 +0000)]
Fix Eglot's snippet insertion to follow the manual

The manual states that YASnippet must only be installed to be useful.
Before this change, it would only work if the user happened to have
manually activated it before with 'yas-global-mode' or somesuch.

This makes Eglot's Yasnippet-activating behaviour similar to its
Flymake-activating behaviour.

* lisp/progmodes/eglot.el (eglot-client-capabilities): Consult
eglot--stay-out-of.
(eglot--snippet-expansion-fn): Turn on yas-minor-mod eon demand.
(eglot-completion-at-point): Simplify.

21 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Fri, 17 Mar 2023 13:39:28 +0000 (21:39 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

21 months agoInclude more information in Android bug reports
Po Lu [Fri, 17 Mar 2023 13:39:15 +0000 (21:39 +0800)]
Include more information in Android bug reports

* src/androidfns.c (Fx_server_vendor, Fx_server_version): New
functions.
(syms_of_androidfns): Define new functions.
* src/androidterm.c (android_set_build_fingerprint)
(syms_of_androidterm): Set new variable
Vandroid_build_manufacturer.
* src/xfns.c (Fx_server_vendor, Fx_server_version): Update doc
strings.

21 months agoReset abbrevs-changed after saving abbrevs (bug#62208)
Filipp Gunbin [Wed, 15 Mar 2023 18:04:26 +0000 (21:04 +0300)]
Reset abbrevs-changed after saving abbrevs (bug#62208)

* lisp/abbrev.el (abbrev--possibly-save): Reset abbrevs-changed after
saving abbrevs.
* test/lisp/abbrev-tests.el (abbrev--possibly-save-test): New test.

21 months ago; Fix markup in previous change
Robert Pluim [Fri, 17 Mar 2023 13:25:39 +0000 (14:25 +0100)]
; Fix markup in previous change

21 months agoFix WINDOWSNT build of fileio.c and image.c
Po Lu [Fri, 17 Mar 2023 13:21:01 +0000 (21:21 +0800)]
Fix WINDOWSNT build of fileio.c and image.c

* src/fileio.c (emacs_fd_to_int): Don't define on WINDOWSNT.
* src/image.c (image_create_bitmap_from_data): Don't abort if
!defined HAVE_ANDROID.

21 months agoDocument `keymap-unset' in lispref
Robert Pluim [Fri, 17 Mar 2023 13:16:00 +0000 (14:16 +0100)]
Document `keymap-unset' in lispref

* doc/lispref/keymaps.texi (Changing Key Bindings): Document
keymap-unset.

21 months agoDon't add a key binding when REMOVE is non-nil
Robert Pluim [Fri, 17 Mar 2023 08:50:38 +0000 (09:50 +0100)]
Don't add a key binding when REMOVE is non-nil

* src/keymap.c (store_in_keymap): Don't add a nil keybinding if we've
been asked to remove a non-existent binding.  (Bug#62207)

21 months ago* lisp/subr.el (string-prefix-p, string-suffix-p): Not pure.
Mattias Engdegård [Fri, 17 Mar 2023 11:13:27 +0000 (12:13 +0100)]
* lisp/subr.el (string-prefix-p, string-suffix-p): Not pure.

The `ignore-case` arguments prevent these functions from being pure.

21 months agoUpdate Android port
Po Lu [Fri, 17 Mar 2023 11:26:16 +0000 (19:26 +0800)]
Update Android port

* configure.ac:
* m4/ndk-build.m4 (ndk_INIT):
(ndk_LATE): Avoid AC_REQUIRE magic.

21 months agoFix the documentation of various aspects of adding Xref history
Eli Zaretskii [Fri, 17 Mar 2023 08:14:41 +0000 (10:14 +0200)]
Fix the documentation of various aspects of adding Xref history

* lisp/progmodes/xref.el (xref-marker-ring-length)
(xref-set-marker-ring-length):
* lisp/progmodes/etags.el (tags-location-ring-length)
(find-tag-marker-ring): Add doc strings saying the variables are
unused.

* etc/NEWS: Enhance the description of the change which made Xref
marker stack unlimited in its length.

* doc/emacs/maintaining.texi (Looking Up Identifiers): Add back
text lost when xref forward history was added in bug#38797.
Explain the difference between 'C-M-,' and 'M-.'.  Improve
wording (Bug#62229)

21 months ago; Fix source file headers for some test files (bug#62227)
Wilhelm H Kirschbaum [Thu, 16 Mar 2023 20:11:59 +0000 (22:11 +0200)]
; Fix source file headers for some test files (bug#62227)

* test/lisp/progmodes/elixir-ts-mode-tests.el: Fix
source file header.
* test/lisp/progmodes/heex-ts-mode-tests.el: Add source
file header and footer.

21 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Fri, 17 Mar 2023 07:05:45 +0000 (15:05 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

21 months agoSimplify usage of 'while' forms in Eshell's iterative evaluation
Jim Porter [Sun, 29 Jan 2023 01:04:11 +0000 (17:04 -0800)]
Simplify usage of 'while' forms in Eshell's iterative evaluation

Now, 'eshell-do-eval' rewrites 'while' forms to let-bind variables for
the command and test bodies.  This means that external code, such as
command rewriting hooks, no longer has to worry about this, making it
easier to pass "normal" Lisp forms to 'eshell-do-eval' (bug#61954).

* lisp/eshell/esh-cmd.el (eshell-command-body, eshell-test-body): No
longer used outside of 'eshell-do-eval', so rename to...
(eshell--command-body, eshell--test-body): ... these.
(Command evaluation macros): Remove obsolete description about 'if'
and 'while' forms.
(eshell-rewrite-for-command, eshell-structure-basic-command): Remove
'eshell-command-body' and 'eshell-test-body'.
(eshell-do-eval): Reimplement handling of 'while' forms.

21 months agoSimplify how Eshell's iterative evaluation handles 'if' forms
Jim Porter [Sat, 28 Jan 2023 23:06:31 +0000 (15:06 -0800)]
Simplify how Eshell's iterative evaluation handles 'if' forms

The previous implementation used 'eshell-test-body' and
'eshell-command-body' to track the condition and the then/else forms,
but those special variables are only needed for looping.  'if' only
evaluates each form once at most (bug#61954).

* lisp/eshell/esh-cmd.el (Command evaluation macros): Remove 'if' from
the notes about 'eshell-test-body' and 'eshell-command-body'.
(eshell-do-eval): Reimplement evaluation of 'if' forms.
(eshell-eval-command): Don't let-bind 'eshell-command-body' and
'eshell-test-body'; they're no longer needed here.

21 months agoSimplify iteration in Eshell for loops
Jim Porter [Fri, 27 Jan 2023 07:18:42 +0000 (23:18 -0800)]
Simplify iteration in Eshell for loops

The previous code fixed an issue in Eshell's iterative evaluation
where deferred commands caused an infinite loop (see bug#12571).
However, with the fix to unwinding let forms in 'eshell-do-eval' (see
bug#59469), we can just write this code as we normally would
(bug#61954).

* lisp/eshell/esh-cmd.el (eshell-rewrite-for-command): Simplify.

21 months agoImprove radio button appearance in Android menus
Po Lu [Fri, 17 Mar 2023 05:10:23 +0000 (13:10 +0800)]
Improve radio button appearance in Android menus

* java/org/gnu/emacs/EmacsContextMenu.java (EmacsContextMenu):
New field `lastGroupId'.
(Item): New field `isRadio'.
(addItem): New arg `isRadio'.
(inflateMenuItems): Apply an empty radio button group if
required.
* src/androidmenu.c (android_init_emacs_context_menu): Adjust
accordingly.
(android_menu_show): Likewise.

21 months agoUpdate Android port
Po Lu [Fri, 17 Mar 2023 02:38:09 +0000 (10:38 +0800)]
Update Android port

* java/org/gnu/emacs/EmacsView.java (cancelPopupMenu): Dismiss
context menu correctly.
(isOpaque): New function.
* java/org/gnu/emacs/EmacsWindowAttachmentManager.java: Make
consumer list public.

21 months ago; * configure.ac: Add missing precious variable.
Po Lu [Fri, 17 Mar 2023 02:03:43 +0000 (10:03 +0800)]
; * configure.ac: Add missing precious variable.

21 months ago; Minor wording fix in ELisp reference manual
Eli Zaretskii [Thu, 16 Mar 2023 20:05:07 +0000 (22:05 +0200)]
; Minor wording fix in ELisp reference manual

* doc/lispref/objects.texi (General Escape Syntax): More accurate
wording.  Avoid non-ASCII characters in Texinfo.  (Bug#62224)

21 months agoFix python-fill-paragraph problems on filling strings (bug#62142)
kobarity [Sun, 12 Mar 2023 08:05:54 +0000 (17:05 +0900)]
Fix python-fill-paragraph problems on filling strings (bug#62142)

* lisp/progmodes/python.el (python-syntax--context-compiler-macro)
(python-syntax-context): Add single-quoted-string and
triple-quoted-string as TYPE argument.
(python-info-triple-quoted-string-p): New helper function.
(python-fill-paragraph)
(python-fill-string): Use it.
* test/lisp/progmodes/python-tests.el (python-syntax-context-1)
(python-fill-paragraph-single-quoted-string-1)
(python-fill-paragraph-single-quoted-string-2)
(python-fill-paragraph-triple-quoted-string-1)
(python-info-triple-quoted-string-p-1)
(python-info-triple-quoted-string-p-2)
(python-info-triple-quoted-string-p-3): New tests.

21 months agoAlso exempt eglot-inlay-hints-mode from desktop.el's fumblings
João Távora [Thu, 16 Mar 2023 14:05:42 +0000 (14:05 +0000)]
Also exempt eglot-inlay-hints-mode from desktop.el's fumblings

Reported in https://github.com/joaotavora/eglot/discussions/1183.

* lisp/progmodes/eglot.el (desktop): Also exempt
eglot-inlay-hints-mode from desktop.el fumblings.

21 months ago; Add WebDAV entry to index in Tramp manual
Stefan Kangas [Thu, 16 Mar 2023 13:32:44 +0000 (14:32 +0100)]
; Add WebDAV entry to index in Tramp manual

* doc/misc/tramp.texi (GVFS-based methods): Improve indexing.

21 months agoRefer to EWW instead of w3 and w3m
Stefan Kangas [Thu, 16 Mar 2023 13:20:15 +0000 (14:20 +0100)]
Refer to EWW instead of w3 and w3m

* doc/misc/idlwave.texi (Help with HTML Documentation): Refer to EWW
instead of w3 and w3m.

21 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Thu, 16 Mar 2023 11:56:25 +0000 (19:56 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

21 months agoFix regression in Tramp (bug#62194)
Michael Albinus [Thu, 16 Mar 2023 11:41:13 +0000 (12:41 +0100)]
Fix regression in Tramp (bug#62194)

* lisp/net/tramp.el (tramp-handle-make-process):
* lisp/net/tramp-sh.el (tramp-do-copy-or-rename-file-out-of-band)
(tramp-sh-handle-file-notify-add-watch)
(tramp-maybe-open-connection): Don't set process property
`shared-socket'.  (Bug#62194)

21 months agoEmphasize emacs-29-specificity in this version of lisp/progmodes/eglot.el
João Távora [Thu, 16 Mar 2023 10:41:53 +0000 (10:41 +0000)]
Emphasize emacs-29-specificity in this version of lisp/progmodes/eglot.el

Do not merge to master.

Before working on bugfixes to Eglot in its non-ELPA form delivered
with Emacs 29, it's important to distinguish between this emacs-29
version and the one in master, which will also get the bugfixes (via
routine gitmerge.el) but with a bumped version number.

* lisp/progmodes/eglot.el (Version): Emphasize Emacs 29, but hint this
is 1.12 + something.
(Package-Requires): Remove.  Everything required is already in Emacs
29.

21 months agoFix Eglot's command generation for code actions
João Távora [Thu, 16 Mar 2023 10:45:25 +0000 (10:45 +0000)]
Fix Eglot's command generation for code actions

The user command generated by eglot--code-action should always call
eglot-code-actions with a INTERACTIVE set to t.

Reported in https://github.com/joaotavora/eglot/issues/1132.

* lisp/progmodes/eglot.el (eglot--code-action): Pass INTERACTIVE=t to
eglot-code-action call.

21 months agoUpdate Android port
Po Lu [Thu, 16 Mar 2023 10:34:53 +0000 (18:34 +0800)]
Update Android port

* lisp/frame.el (android-detect-mouse):
* lisp/term/android-win.el (android-get-connection): Add
function declarations.

21 months agoFix elixir-ts-mode.elc warning (bug#62155)
Wilhelm H Kirschbaum [Mon, 13 Mar 2023 19:47:50 +0000 (21:47 +0200)]
Fix elixir-ts-mode.elc warning (bug#62155)

* lisp/progmodes/elixir-ts-mode.el: Only require heex-ts-mode once
elixir-ts-mode loads to avoid calling (treesit-ready-p 'heex)
during byte-compilation.

21 months ago; * configure.ac: Remove unnecessary escape.
Po Lu [Thu, 16 Mar 2023 07:48:26 +0000 (15:48 +0800)]
; * configure.ac: Remove unnecessary escape.

21 months agoMake ANDROID_CC and SDK_BUILD_TOOLS precious variables
Po Lu [Thu, 16 Mar 2023 07:46:39 +0000 (15:46 +0800)]
Make ANDROID_CC and SDK_BUILD_TOOLS precious variables

* configure.ac (AUTO_DEPEND, ANDROID_STUBIFY, ANDROID_LDFLAGS):
* lib/Makefile.in (ANDROID_CFLAGS, ANDROID_BUILD_CFLAGS)
(ALL_CFLAGS):
* lib/gnulib.mk.in (AM_DEFAULT_VERBOSITY):
* msdos/sed1v2.inp:
* msdos/sedlibmk.inp:
* src/Makefile.in (ANDROID_OBJ, EMACS_CFLAGS): Make those
variables precious.  Rename ANDROID_CFLAGS substitution to
ANDROID_BUILD_CFLAGS.

21 months agoFix quoting of font-family in 'hfy-family'
USAMI Kenta [Wed, 8 Mar 2023 12:13:37 +0000 (21:13 +0900)]
Fix quoting of font-family in 'hfy-family'

Running "M-x htmlfontify-buffer" in one buffer, the exported HTML contains
lines like:

  body, pre { text-decoration: none;  font-family: Migu 2M;  font-stretch:
  normal;  font-weight: 500;  font-style: normal;  color: #ffffff;
  background: #000000;  font-size: 15pt; }

Standards-compliant web browsers should ignore this font-family.

MDN Web Docs says:
https://developer.mozilla.org/en-US/docs/Web/CSS/font-family

  Valid family names
  Font family names must either be given quoted as strings, or unquoted as
  a sequence of one or more identifiers. This means that punctuation
  characters and digits at the start of each token must be escaped in
  unquoted font family names.

  It is a good practice to quote font family names that contain white
  space, digits, or punctuation characters other than hyphens.

An unquoted font-family is valid as long as it doesn't start with a digit,
but MDN Web Docs also says:

  The following example is technically valid but is not recommended:
  font-family: Gill Sans Extrabold, sans-serif;

So it makes sense to quote all font-family.

* lisp/htmlfontify.el (hfy-family): Quote 'font-family'.  (Bug#62054)

21 months agoUpdate Android port
Po Lu [Thu, 16 Mar 2023 07:23:21 +0000 (15:23 +0800)]
Update Android port

* nt/mingw-cfg.site: Suppress build of gnulib printf.

21 months agoUpdate Android port
Po Lu [Thu, 16 Mar 2023 06:13:21 +0000 (14:13 +0800)]
Update Android port

* java/org/gnu/emacs/EmacsDocumentsProvider.java (queryRoots): Add
icon to document root.

21 months agoUpdate Android port
Po Lu [Thu, 16 Mar 2023 01:40:02 +0000 (09:40 +0800)]
Update Android port

* lisp/loadup.el (current-load-list): Set to empty load list
after startup.
* src/lread.c (build_load_history): Revert earlier changes.

21 months agoMerge remote-tracking branch 'origin/master' into feature/android
Po Lu [Thu, 16 Mar 2023 00:40:35 +0000 (08:40 +0800)]
Merge remote-tracking branch 'origin/master' into feature/android

21 months ago; Tweak doc/misc/eglot.texi
João Távora [Wed, 15 Mar 2023 23:59:01 +0000 (23:59 +0000)]
; Tweak doc/misc/eglot.texi

* doc/misc/eglot.texi (Advanced server configuration): Minor
tweaks.

21 months agoDocument how to construct JSONRPC arrays in Eglot manual
Michael Eliachevitch [Wed, 15 Mar 2023 23:49:51 +0000 (23:49 +0000)]
Document how to construct JSONRPC arrays in Eglot manual

Many language server configuration options are of the JSON array
datatype, for example argument lists for executables, but there wasn't
any example of that in the Eglot manual.

* doc/misc/eglot.texi (User-specific configuration)
(User-specific configuration): Tweaks.
(JSONRPC objects in Elisp): Mention JSON arrays. Tweak example.

Copyright-paperwork-exempt: Yes

21 months agoMinor Tramp cleanup
Michael Albinus [Wed, 15 Mar 2023 17:01:48 +0000 (18:01 +0100)]
Minor Tramp cleanup

* lisp/net/tramp-sh.el (tramp-run-test): Add VEC argument.
(tramp-sh-handle-file-executable-p)
(tramp-sh-handle-file-readable-p)
(tramp-sh-handle-file-directory-p)
(tramp-sh-handle-file-writable-p): Adapt callees.