F. Jason Park [Mon, 27 Nov 2023 02:24:48 +0000 (18:24 -0800)]
Sequester some special-variable declarations in ERC
* lisp/erc/erc-backend.el (erc-log-p): Remove declaration entirely.
(erc-server-reconnect): Move declaration for `erc-reuse-buffers' here.
(erc-process-sentinel-1): Move `erc-kill-server-buffer-on-quit'
declaration here.
(erc--conceal-prompt): Move `erc-prompt-hidden' declaration here.
(erc-server-INVITE): Move `erc-invitation' declaration here.
(erc-server-PART): Move `erc-kill-buffer-on-part' declaration here.
(erc-server-PRIVMSG): Move declarations for `erc-minibuffer-ignored',
`erc-receive-query-display', `erc-receive-query-display-defer',
`erc--cmem-from-nick-function', `erc-format-nick-function', and
`erc-format-query-as-channel-p' here.
(erc-server-401): Move `erc-whowas-on-nosuchnick' declaration here.
(erc-server-475): Move `erc--called-as-input-p' and
`erc-prompt-for-channel-key' declarations here.
* lisp/erc/erc-common.el (erc-log-p): Remove declaration for
`erc-log-p' and replace with actual definition.
(erc-log-aux): Move `erc-dbuf' declaration from top level into
function body.
* lisp/erc/erc-fill.el (erc-fill--wrap-continued-message-p): Note in
the doc string that this function produces side effects.
* lisp/erc/erc-networks.el (erc-determine-network,
erc-networks--copy-server-buffer-functions): Move some variable
declarations to function body.
(erc-settings, erc-get): Deprecate for now and explain why in doc
strings. We could deprecate them unconditionally, but they never
provided usable code, and their names are short and valuable.
* lisp/erc/erc.el (tabbar--local-hlf, motif-version-string,
gtk-version-string): Prefer moving these single-serving declarations
to function bodies, if only to make closures from this library less
cluttered when debugging. This should also help avoid stray
declarations.
(erc-hooks, erc-timer-hook): Revise doc strings.
(erc-log-p): Move definition to erc-common.el.
(erc-cmd-SV): Mimic `emacs-version' and stick with `featurep', here in
combination with special-variable declarations, instead of `boundp' or
similar.
(erc-header-line-uses-tabbar-p): Explain that this has nothing to do
with `tab-bar'.
(erc-update-mode-line-buffer): Only assign when bound. This has been
verified to work with version 2.0 on EmacsWiki.
* test/lisp/erc/erc-scenarios-base-reconnect.el: Timeouts.
* test/lisp/erc/erc-scenarios-base-renick.el: Timeouts.
* test/lisp/erc/resources/join/network-id/foonet-again.eld: Timeouts.
F. Jason Park [Wed, 29 Nov 2023 00:51:36 +0000 (16:51 -0800)]
Define ERC message-formatting templates with defvar
* etc/ERC-NEWS: Mention convenience macro being preferred means of
defining message templates. Mention renaming of `notify' formatting
templates.
* lisp/erc/erc-common.el (erc--define-catalog,
erc-define-message-format-catalog): New macro and internal variant to
replace `erc-define-catalog-entry'. The internal variant allows us to
defer reindenting existing definitions until meaningfully edited.
* lisp/erc/erc-dcc.el (erc-message-english-dcc-chat-discarded,
erc-message-english-dcc-chat-ended,
erc-message-english-dcc-chat-no-request,
erc-message-english-dcc-chat-offered,
erc-message-english-dcc-chat-offer,
erc-message-english-dcc-chat-accept,
erc-message-english-dcc-chat-privmsg, erc-message-english-dcc-closed,
erc-message-english-dcc-command-undefined,
erc-message-english-dcc-ctcp-errmsg,
erc-message-english-dcc-ctcp-unknown,
erc-message-english-dcc-get-bytes-received,
erc-message-english-dcc-get-complete,
erc-message-english-dcc-get-failed,
erc-message-english-dcc-get-cmd-aborted,
erc-message-english-dcc-get-file-too-long,
erc-message-english-dcc-get-notfound,
erc-message-english-dcc-list-head, erc-message-english-dcc-list-line,
erc-message-english-dcc-list-item, erc-message-english-dcc-list-end,
erc-message-english-dcc-malformed,
erc-message-english-dcc-privileged-port,
erc-message-english-dcc-request-bogus,
erc-message-english-dcc-send-finished,
erc-message-english-dcc-send-offered,
erc-message-english-dcc-send-offer): Define at top level using
`defvar'.
* lisp/erc/erc-netsplit.el (erc-netsplit-mode, erc-netsplit-enable):
Don't call `erc-netsplit-install-message-catalogs'.
(erc-netsplit-install-message-catalogs): Deprecate function.
(erc-message-english-netsplit, erc-message-english-netjoin,
erc-message-english-netjoin-done, erc-message-english-netsplit-none,
erc-message-english-netsplit-wholeft): Define at top level using
`defvar'.
* lisp/erc/erc-notify.el (erc-notify-install-message-catalogs):
Deprecate, and rename all format templates with hyphens instead of
underscores.
(erc-notify-timer, erc-notify-JOIN, erc-notify-NICK, erc-notify-QUIT):
Use hyphenated template names.
(erc-cmd-NOTIFY): Use hyphenated template names. Load the module when
necessary and emit a warning. Otherwise, people who discover this
autoloaded command without being aware of the module's existence may
think it's "broken".
(pcomplete/erc-mode/NOTIFY): Replace top-level autoload with `require'
in function body. Include `erc-notify-list' in list of completions,
which makes removal easier if you don't share any channels with a
person, and they're not in `erc-server-users'. A better long-term
solution might be to WHOIS folks we're unsure about when they're
listed in a 303.
(erc-message-english-notify_current, erc-message-english-notify_list,
erc-message-english-notify_on, erc-message-english-notify_off): Define
at top level using `defvar'. Replace nonstandard underscores with
hyphens. Alias obsolete names.
* lisp/erc/erc-page.el (erc-message-english-CTCP-PAGE): Define at top
level using `defvar'.
* lisp/erc/erc-sasl.el (erc-message-english-s902,
erc-message-english-s904, erc-message-english-s905,
erc-message-english-s906, erc-message-english-s907,
erc-message-english-s908): Define at top level using `defvar'.
* lisp/erc/erc-sound.el (erc-message-english-CTCP-SOUND): Define using
`defvar'.
* lisp/erc/erc.el (erc--make-message-variable-name): New function to
replace `erc-make-message-variable-name' internally, where most uses
previously checked whether the returned variable was bound. This
helper now does that conditionally, when asked.
(erc-make-message-variable-name): Defer to internal variant,
`erc--make-message-variable-name'.
(erc-define-catalog-entry, erc-define-catalog): Deprecate.
(erc-retrieve-catalog-entry): Refactor to favor
`default-toplevel-value' of `erc-current-message-catalog' before
falling back to `english'. Not doing this was arguably a bug.
(erc-message-english-bad-ping-response,
erc-message-english-bad-syntax, erc-message-english-incorrect-args,
erc-message-english-cannot-find-file,
erc-message-english-cannot-read-file, erc-message-english-connect,
erc-message-english-country, erc-message-english-country-unknown,
erc-message-english-ctcp-empty, erc-message-english-ctcp-request,
erc-message-english-ctcp-request-to,
erc-message-english-ctcp-too-many, erc-message-english-flood-ctcp-off,
erc-message-english-flood-strict-mode,
erc-message-english-disconnected,
erc-message-english-disconnected-noreconnect,
erc-message-english-reconnecting,
erc-message-english-reconnect-canceled, erc-message-english-finished,
erc-message-english-terminated, erc-message-english-login,
erc-message-english-nick-in-use, erc-message-english-nick-too-long,
erc-message-english-no-default-channel,
erc-message-english-no-invitation, erc-message-english-no-target,
erc-message-english-ops, erc-message-english-ops-none,
erc-message-english-undefined-ctcp,
erc-message-english-user-mode-redundant-add,
erc-message-english-user-mode-redundant-drop,
erc-message-english-variable-not-bound, erc-message-english-ACTION,
erc-message-english-CTCP-CLIENTINFO, erc-message-english-CTCP-ECHO,
erc-message-english-CTCP-FINGER, erc-message-english-CTCP-PING,
erc-message-english-CTCP-TIME, erc-message-english-CTCP-UNKNOWN,
erc-message-english-CTCP-VERSION, erc-message-english-ERROR,
erc-message-english-INVITE, erc-message-english-JOIN,
erc-message-english-JOIN-you, erc-message-english-KICK,
erc-message-english-KICK-you, erc-message-english-KICK-by-you,
erc-message-english-MODE, erc-message-english-MODE-nick,
erc-message-english-NICK, erc-message-english-NICK-you,
erc-message-english-PART, erc-message-english-PING,
erc-message-english-PONG, erc-message-english-QUIT,
erc-message-english-TOPIC, erc-message-english-WALLOPS,
erc-message-english-s004, erc-message-english-s221,
erc-message-english-s252, erc-message-english-s253,
erc-message-english-s254, erc-message-english-s275,
erc-message-english-s301, erc-message-english-s303,
erc-message-english-s305, erc-message-english-s306,
erc-message-english-s307, erc-message-english-s311,
erc-message-english-s312, erc-message-english-s313,
erc-message-english-s314, erc-message-english-s317,
erc-message-english-s317-on-since, erc-message-english-s319,
erc-message-english-s320, erc-message-english-s321,
erc-message-english-s322, erc-message-english-s324,
erc-message-english-s328, erc-message-english-s329,
erc-message-english-s330, erc-message-english-s331,
erc-message-english-s332, erc-message-english-s333,
erc-message-english-s341, erc-message-english-s352,
erc-message-english-s353, erc-message-english-s367,
erc-message-english-s367-set-by, erc-message-english-s368,
erc-message-english-s379, erc-message-english-s391,
erc-message-english-s396, erc-message-english-s401,
erc-message-english-s402, erc-message-english-s403,
erc-message-english-s404, erc-message-english-s405,
erc-message-english-s406, erc-message-english-s412,
erc-message-english-s421, erc-message-english-s431,
erc-message-english-s432, erc-message-english-s442,
erc-message-english-s445, erc-message-english-s446,
erc-message-english-s451, erc-message-english-s461,
erc-message-english-s462, erc-message-english-s463,
erc-message-english-s464, erc-message-english-s465,
erc-message-english-s471, erc-message-english-s473,
erc-message-english-s474, erc-message-english-s475,
erc-message-english-s481, erc-message-english-s482,
erc-message-english-s483, erc-message-english-s484,
erc-message-english-s485, erc-message-english-s491,
erc-message-english-s501, erc-message-english-s502,
erc-message-english-s671): Define at top level using `defvar'.
* test/lisp/erc/erc-tests.el (erc-tests--string-to-propertized-parts,
erc-tests-pp-propertized-parts, erc--make-message-variable-name,
erc-retrieve-catalog-entry): New tests along with utility functions
and a convenience command for manipulating catalogs. (Bug#67677)
F. Jason Park [Sat, 9 Dec 2023 15:15:32 +0000 (07:15 -0800)]
Remove module from suggested lineup in ERC's manual
* doc/misc/erc.texi (Sample Configuration): Remove `irccontrols' from
`erc-modules' because it's already enabled by default. Add
`erc-scrolltobottom-all'.
Po Lu [Mon, 18 Dec 2023 03:11:35 +0000 (11:11 +0800)]
Merge remote-tracking branch 'savannah/master' into master-android-1
Po Lu [Mon, 18 Dec 2023 03:10:40 +0000 (11:10 +0800)]
Enable the new font scaler
* src/sfnt.c (sfnt_curve_is_flat): Tighten threshold for flat
curves.
(sfnt_insert_raster_step): Rewrite loop for clarity.
(sfnt_poly_set_steps): New function; fill small spans with a
plain unexceptional loop rather than memset.
(sfnt_poly_steps): Call that function.
(sfnt_verbose, main): Adjust tests such that the scaler can be
selected at runtime.
* src/sfnt.h: Update prototypes.
* src/sfntfont.c (sfntfont_get_glyph_raster)
(syms_of_sfntfont) <sfnt_raster_glyphs_exactly>: New variable.
Dmitry Gutov [Mon, 18 Dec 2023 02:43:21 +0000 (04:43 +0200)]
; Improve a recent NEWS entry
Stefan Kangas [Sun, 17 Dec 2023 17:59:38 +0000 (18:59 +0100)]
; Document sending extra HTTP headers in NEWS
* etc/NEWS: Note how to send email address in HTTP requests.
This change was requested in:
https://lists.gnu.org/r/emacs-devel/2023-12/msg00500.html
Po Lu [Sun, 17 Dec 2023 12:55:23 +0000 (20:55 +0800)]
* src/sfnt.h (sfnt_coerce_fixed): New macro.
Po Lu [Sun, 17 Dec 2023 12:54:56 +0000 (20:54 +0800)]
; * src/sfnt.c: Fix typos.
Po Lu [Sun, 17 Dec 2023 12:51:54 +0000 (20:51 +0800)]
Introduce the rudiments of a new font rasterizer
* src/sfnt.c (xzalloc): New function.
(sfnt_poly_edges): Remove redundant statement.
(sfnt_add, sfnt_sub, sfnt_mul): Move macro definitions above the
new scaler.
(sfnt_build_outline_fedges, sfnt_insert_raster_step)
(sfnt_fedge_sort, sfnt_poly_edges_exact, sfnt_compute_fill)
(sfnt_poly_steps, sfnt_raster_steps, sfnt_raster_edges_exact)
(sfnt_raster_glyph_outline_exact): New functions, presently
disabled.
(sfnt_x_raster, main): Introduce new tests.
Philip Kaludercic [Sun, 3 Dec 2023 12:49:07 +0000 (13:49 +0100)]
Add slashes to 'thing-at-point-email-regexp'
* lisp/thingatpt.el (thing-at-point-email-regexp): Allow for
a (thing-at-point 'email) query to match addresses with slashes, as
used by Sourcehut. (Bug#67600)
Stefan Kangas [Sun, 17 Dec 2023 11:14:04 +0000 (12:14 +0100)]
; Move NEWS item to "Incomatible Changes" section
Stefan Kangas [Sun, 17 Dec 2023 10:58:24 +0000 (11:58 +0100)]
Silence warning in print.c
* src/print.c (print_bool_vector): Silence warning.
Stefan Kangas [Sun, 17 Dec 2023 08:45:05 +0000 (09:45 +0100)]
Never send user email address in HTTP requests
It used to be possible to customize 'url-privacy-level' so that the
user's email address was sent along in HTTP requests. Since
'url-privacy-level' is also a blocklist, rather than an allowlist,
this meant that a mere misconfiguration of Emacs risked exposing the
user's email address. This is a serious privacy risk, and it is thus
better if we remove this dangerous feature altogether.
* lisp/url/url-http.el (url-http-create-request): Never send the
user email address.
* lisp/url/url-vars.el (url-personal-mail-address): Make obsolete.
* lisp/url/url-privacy.el (url-setup-privacy-info): Don't set
above obsolete variable.
* doc/misc/url.texi (Customization):
* lisp/url/url-vars.el (url-privacy-level): Update documentation
to reflect the above changes.
Eric Abrahamsen [Fri, 15 Dec 2023 14:59:38 +0000 (06:59 -0800)]
; Remove out-of-date documentation about Gnus delayed articles
* doc/misc/gnus.texi (Delayed Articles): As of commit
7725fbc5b this
paragraph is no longer true; the "Date" header is not included in
`message-draft-headers' by default.
Stefan Kangas [Sat, 16 Dec 2023 23:14:43 +0000 (00:14 +0100)]
; Fix typo
* java/org/gnu/emacs/EmacsSafThread.java
(cacheDirectoryFromCursor): Fix typo.
Jared Finder [Sat, 16 Dec 2023 17:06:22 +0000 (09:06 -0800)]
Using remap for binding of log-edit-beginning-of-line.
* lisp/vc/log-edit.el (log-edit-mode-map): Change binding.
Stefan Monnier [Sat, 16 Dec 2023 18:13:23 +0000 (13:13 -0500)]
Merge branch 'same-frame'
Stefan Monnier [Sat, 9 Dec 2023 23:38:35 +0000 (18:38 -0500)]
(display-buffer): New `pop-up-frames` action alist entry
Allow overriding the `pop-up-frames` variable from `display-buffer-alist`
so as to provide a worthy replacement for the old `same-frame`
parameter of `special-display-*` (bug#67249).
* lisp/window.el (special-display-popup-frame): Declare obsolete;
that was apparently forgotten back when `special-display-*` variables
were declared obsolete.
Use the new `pop-up-frames` action alist entry instead of the variable.
(display-buffer): Document new alist entry.
(window--pop-up-frames): New function.
(display-buffer--maybe-pop-up-frame, display-buffer-in-previous-window)
(display-buffer-reuse-window, display-buffer-reuse-mode-window): Use it.
* doc/lispref/windows.texi (Choosing Window Options): Mention that
`pop-up-frames` is also an action alist entry.
(Buffer Display Action Alists): Add `pop-up-frames` entry.
Stefan Monnier [Sat, 16 Dec 2023 18:03:46 +0000 (13:03 -0500)]
* lisp/subr.el (derived-mode-p): Disable warnings for old convention
Eli Zaretskii [Sat, 16 Dec 2023 14:26:26 +0000 (16:26 +0200)]
; * lisp/startup.el (normal-top-level): Avoid byte-compiler warning.
Eli Zaretskii [Sat, 16 Dec 2023 14:17:51 +0000 (09:17 -0500)]
Merge from origin/emacs-29
bf4ccb0be07 ; * lisp/term.el (term--xterm-paste): Fix last change.
0d9e2e448d9 ; * doc/lispref/functions.texi (Function Documentation): ...
791cc5065da Fix shaping of Sinhala text
efcbf0b5abf Add use cases of (fn) documentation facility.
c3331cb3659 Fix pasting into terminal-mode on term.el
5be94e2bce5 Fix opening directory trees from Filesets menu
6b6e770a1f5 Eglot: Add ruff-lsp as an alternative Python server
ed8a8a5ba16 Fix symbol name in Multisession Variables examples
400ef15bdc3 js-ts-mode: Fix font-lock rules conflict
c165247c300 Add indentation rules for bracketless statements in js-ts...
7f1bd69cd19 Fix c-ts-mode bracketless indentation for BSD style (bug#...
e23068cb9a1 Add missing indent rules in c-ts-mode (bug#66152)
d2c4b926ac2 Fix treesit-default-defun-skipper (bug#66711)
9874561f39e Fix treesit-node-field-name and friends (bug#66674)
eace9e11226 python-ts-mode: Highlight default parameters
23c06c7c308 Update to Org 9.6.13
Eli Zaretskii [Sat, 16 Dec 2023 14:08:52 +0000 (16:08 +0200)]
; * lisp/term.el (term--xterm-paste): Fix last change.
Eli Zaretskii [Sat, 16 Dec 2023 14:06:29 +0000 (16:06 +0200)]
; * doc/lispref/functions.texi (Function Documentation): Fix @itemize.
Eli Zaretskii [Sat, 16 Dec 2023 13:33:02 +0000 (15:33 +0200)]
Fix shaping of Sinhala text
* lisp/language/sinhala.el (composition-function-table): Allow
U+200D U+0DCA as well as U+0DCA U+200D between consonants.
Suggested by Richard Wordingham <richard.wordingham@ntlworld.com>.
(Bug#67828)
Jens Schmidt [Thu, 14 Dec 2023 19:47:22 +0000 (20:47 +0100)]
; Move preload of rmc to a more appropriate place
See discussion on
https://lists.gnu.org/archive/html/emacs-devel/2023-12/msg00309.html.
* lisp/loadup.el ("emacs-lisp/rmc"): Move preload to a more
appropriate place.
Jeremy Bryant [Sun, 3 Dec 2023 21:32:01 +0000 (21:32 +0000)]
Add use cases of (fn) documentation facility.
* doc/lispref/functions.texi (Function Documentation): Add examples.
(Bug#67499)
Co-authored-by: Eli Zaretskii <eliz@gnu.org>
Eli Zaretskii [Sat, 16 Dec 2023 12:52:36 +0000 (14:52 +0200)]
; * lisp/net/shr.el (shr-put-image): No more need to test for nil ALT.
Visuwesh [Mon, 11 Dec 2023 11:39:03 +0000 (17:09 +0530)]
Fix 'shr-put-image' with nil value for ALT
* lisp/net/shr.el (shr-put-image): Account for nil value for ALT.
(Bug#67764)
Eli Zaretskii [Sat, 16 Dec 2023 12:44:32 +0000 (14:44 +0200)]
Fix pasting into terminal-mode on term.el
* lisp/term.el (term--xterm-paste): Read pasted text from the
input event. Suggested by Jared Finder <jared@finder.org>.
(Bug#49253)
Eli Zaretskii [Sat, 16 Dec 2023 12:38:21 +0000 (14:38 +0200)]
; * doc/emacs/android.texi (Android Environment): Fix node name.
Visuwesh [Wed, 6 Dec 2023 08:15:03 +0000 (13:45 +0530)]
Offer to show diff against auto-save in recover-file
* lisp/files.el (recover-file): Show diff against the selected auto
save file. (Bug#52242)
* doc/emacs/files.texi (Recover): Document the new feature.
* etc/NEWS: Announce the new feature.
Eli Zaretskii [Sat, 16 Dec 2023 11:25:58 +0000 (13:25 +0200)]
Fix opening directory trees from Filesets menu
In bug#976, the code was fixed, but the cautious condition in
the original author's code, which catered to invoking
'filelists-open' from the menu-bar menu, was omitted, which made
that invocation, which did work before, broken.
* lisp/filesets.el (filesets-get-filelist): Fix opening directory
trees from the Filesets menu-bar menu. (Bug#67658)
Niall Dooley [Fri, 24 Nov 2023 15:52:36 +0000 (16:52 +0100)]
Eglot: Add ruff-lsp as an alternative Python server
ruff-lsp [1] is an LSP server for Ruff [2], [3], a fast Python linter
and code formatter.
It supports surfacing Ruff diagnostics and providing Code Actions to
fix them, but is intended to be used alongside another Python LSP in
order to support features like navigation and autocompletion.
[1]: https://github.com/astral-sh/ruff-lsp
[2]: https://github.com/astral-sh/ruff
[3]: https://docs.astral.sh/ruff/
* lisp/progmodes/eglot.el (eglot-server-programs): Add ruff-lsp.
Copyright-paperwork-exempt: yes
john muhl [Mon, 4 Dec 2023 18:03:34 +0000 (12:03 -0600)]
Fix comint-next/previous-prompt in lua-ts-mode
* lisp/progmodes/lua-ts-mode.el (lua-ts-inferior-lua): Don't set
'comint-use-prompt-regexp'. (Bug#67616)
nverno [Mon, 4 Dec 2023 03:21:04 +0000 (19:21 -0800)]
Fix: add comint hook locally in lua-ts-inferior-lua
* lisp/progmodes/lua-ts-mode.el (lua-ts-inferior-lua): Add
'comint-preoutput-filter-functions' hook locally. (Bug#67616)
Eli Zaretskii [Sat, 16 Dec 2023 09:13:33 +0000 (11:13 +0200)]
; * src/androidfns.c (syms_of_androidfns) <android-os-language>: Doc fix.
Eli Zaretskii [Sat, 16 Dec 2023 09:04:24 +0000 (11:04 +0200)]
; * lisp/vc/vc-git.el (vc-git-print-log-follow): Doc fix.
Dmitry Gutov [Sat, 16 Dec 2023 02:57:44 +0000 (04:57 +0200)]
ruby-syntax-methods-before-regexp: Drop this whitelist
* lisp/progmodes/ruby-mode.el (ruby-syntax-before-regexp-re):
Match only based on keywords and operators.
(ruby-syntax-methods-before-regexp): Delete.
(ruby-syntax-propertize): Use the new heuristic based on spaces
instead of checking for method names before (bug#67569).
* test/lisp/progmodes/ruby-mode-tests.el
(ruby-regexp-not-division-when-only-space-before):
Use non-whitelisted method name.
* test/lisp/progmodes/ruby-mode-resources/ruby.rb:
Adjust two examples.
Po Lu [Sat, 16 Dec 2023 02:55:18 +0000 (10:55 +0800)]
Provide for Num Lock and Scroll Lock on Android
* java/org/gnu/emacs/EmacsWindow.java (onKeyDown, onKeyUp):
Retain META_NUM_LOCK_ON and META_SCROLL_LOCK_ON while filtering
meta state.
Dmitry Gutov [Sat, 16 Dec 2023 00:34:34 +0000 (02:34 +0200)]
; vc-print-log-setup-buttons: Update a TODO comment
Dmitry Gutov [Fri, 15 Dec 2023 23:48:29 +0000 (01:48 +0200)]
(vc-print-log-setup-buttons): Start "previous" history with specified revision
* lisp/vc/vc-git.el (vc-git-file-name-changes-switches): Remove
the comment above the option. Seems unnecessary now.
* lisp/vc/vc.el (vc-print-log-setup-buttons): Start the "previous"
change history buffer with the specified revision, rather than
have the sentinel jump to it. Apparently in some cases the
history of the old name can't be found. In others, the log just
shows faster. But note the caveat described in the second new
comment (bug#55871).
Dmitry Gutov [Fri, 15 Dec 2023 23:36:47 +0000 (01:36 +0200)]
Show buttons below vc-log even when REVISION is specified
E.g. in the vc-print-branch-log which specifies start revision.
* lisp/vc/vc.el (vc-print-log-internal): Remove outdated comment.
(vc-print-log-setup-buttons): Only special-case non-nil
IS-START-REVISION when LIMIT=1. We often do need buttons for logs
that start with a particular revision, because those are still limited
by vc-log-show-limit.
Dmitry Gutov [Fri, 15 Dec 2023 20:26:59 +0000 (22:26 +0200)]
Support viewing VC change history across renames (Git, Hg)
* lisp/vc/vc.el (vc-print-log-setup-buttons):
When the log ends at a rename, add a button to jump to the
previous names. Use the new backend action 'file-name-changes'.
* lisp/vc/vc-git.el (vc-git-print-log-follow): New option.
(vc-git-file-name-changes): Implementation (bug#55871, bug#39044).
(vc-git-print-log-follow): Update docstring.
* lisp/vc/log-view.el (log-view-find-revision)
(log-view-annotate-version): Pass the log's VC backend explicitly.
* lisp/vc/vc-hg.el (vc-hg-file-name-changes):
Add Hg implementation (bug#13004).
* etc/NEWS: Mention the changes.
Eli Zaretskii [Fri, 15 Dec 2023 13:32:22 +0000 (15:32 +0200)]
Support case-sensitive register names
* lisp/register.el (register-read-with-preview): Make register
names case-sensitive. (Bug#66394)
Po Lu [Fri, 15 Dec 2023 11:55:30 +0000 (19:55 +0800)]
; * doc/emacs/android.texi (Android Environment): Wording fixes.
Adam Porter [Fri, 15 Dec 2023 00:28:53 +0000 (18:28 -0600)]
Fix symbol name in Multisession Variables examples
* doc/lispref/variables.texi (Multisession Variables): Fix symbol
name. (Bug#67823)
João Távora [Thu, 14 Dec 2023 23:53:07 +0000 (23:53 +0000)]
Eglot: use new jsonrpc-autoport-bootstrap
* lisp/progmodes/eglot.el (eglot-lsp-server): Delete slot
inferior-process.
(eglot--on-shutdown): Simplify.
(eglot--inferior-bootstrap): Delete.
(eglot--connect): Call jsonrpc-autoport-bootstrap.
João Távora [Thu, 14 Dec 2023 22:56:33 +0000 (22:56 +0000)]
Jsonrpc: add new jsonrpc-autoport-bootstrap helper
This will help Eglot and some other extensions connect to network
servers that are started with a call to a local program.
* lisp/jsonrpc.el (jsonrpc--process-sentinel): Also delete inferior.
(jsonrpc-process-connection): Add -autoport-inferior slot.
(initialize-instance jsonrpc-process-connection): Check
process-creating function arity. Use jsonrpc-forwarding-buffer
(jsonrpc-autoport-bootstrap): New helper.
(Version): Bump to 1.0.20.
João Távora [Thu, 14 Dec 2023 16:32:54 +0000 (16:32 +0000)]
Eglot: beware activation in fundamental-mode
In the specific situation of visiting a buffer via M-. with
eglot-extend-to-xref set to t, it was found that buffer was first
visited in fundamental mode, running after-change-major-mode-hook, and
then again in the proper major mode for the file. The call to
eglot-current-server of the first visit returned non-nil which cause
two didOpen notifications to be issued for the same file.
Furthermore, in the first call, eglot--languageId to returned nil,
prompting an error from servers such as rust-analyzer.
See also: https://github.com/joaotavora/eglot/discussions/1330
* lisp/progmodes/eglot.el (eglot-current-server): Watch out for
fundamental-mode.
Po Lu [Thu, 14 Dec 2023 05:57:59 +0000 (13:57 +0800)]
; * src/androidfns.c (syms_of_androidfns_for_pdumper): Fix crash.
Po Lu [Thu, 14 Dec 2023 05:25:40 +0000 (13:25 +0800)]
Merge remote-tracking branch 'savannah/master' into master-android-1
Po Lu [Thu, 14 Dec 2023 05:24:42 +0000 (13:24 +0800)]
Respect Language & Input preferences under Android
* doc/emacs/android.texi (Android Environment):
* doc/emacs/cmdargs.texi (General Variables): Mention the manner
in which the default language environment is selected on
Android.
* lisp/startup.el (normal-top-level): If android and
initial-window-system, call android-locale-for-system-language
for the default locale name.
* lisp/term/android-win.el (android-locale-for-system-language):
New function.
* src/androidfns.c (syms_of_androidfns_for_pdumper): New
function.
(syms_of_androidfns) <Vandroid_os_language>: New variable.
Call syms_of_androidfns_for_pdumper both now and after
loading the dump image.
João Távora [Wed, 8 Nov 2023 14:36:04 +0000 (08:36 -0600)]
Jsonrpc: support some JSONesque non-JSONRPC protocols, like DAP
* lisp/jsonrpc.el (jsonrpc-convert-to-endpoint)
(jsonrpc-convert-from-endpoint): New generics.
(jsonrpc-connection-send): Call jsonrpc-convert-to-endpoint.
Rework logging.
(jsonrpc-connection-receive): Call jsonrpc-convert-from-endpoint.
Rework logging. jsonrpc--reply with METHOD.
(jsonrpc--log-event): Take subtype.
(Version): Bump to 1.0.19
* test/lisp/progmodes/eglot-tests.el (eglot--sniffing): Adapt
to new protocol of jsonrpc--log-event.
* doc/lispref/text.texi (JSONRPC Overview): Rework.
João Távora [Mon, 11 Dec 2023 00:01:03 +0000 (00:01 +0000)]
Jsonrpc: rework fix for bug#60088
Try to decouple receiving text and processing messages in the event
loop. This should allow for requests within requests in both Eglot
and the Dape extension (https://github.com/svaante/dape).
jsonrpc-connection-receive is now called from timers after the process
filter finished. Because of this, a detail is that any serialization
errors are now thrown from timers instead of the synchronous process
filter, and there's no good way to test this in ert, so a test has
been deleted.
* lisp/jsonrpc.el (jsonrpc--process-filter): Rework.
* test/lisp/jsonrpc-tests.el (json-el-cant-serialize-this): Delete test.
João Távora [Sat, 9 Dec 2023 20:13:39 +0000 (20:13 +0000)]
Jsonrpc: better initforms in jsonrpc-connection
* lisp/jsonrpc.el (jsonrpc-connection): Better initforms
João Távora [Wed, 8 Nov 2023 14:22:23 +0000 (08:22 -0600)]
Jsonrpc: allow method identifiers to be simply strings
* lisp/jsonrpc.el (jsonrpc-connection-send): Support string methods.
Michael Albinus [Wed, 13 Dec 2023 12:20:43 +0000 (13:20 +0100)]
Improve tramp-compat-connection-local-p
* lisp/net/tramp-compat.el (tramp-compat-connection-local-p):
Make it compatible with Emacs 27.
Andrea Corallo [Wed, 13 Dec 2023 11:22:39 +0000 (12:22 +0100)]
* configure.ac: Fix '--without-all' if libgccjit installed (bug#67799)
Dmitry Gutov [Tue, 12 Dec 2023 22:00:38 +0000 (00:00 +0200)]
js-ts-mode: Fix font-lock rules conflict
* lisp/progmodes/js.el (js--treesit-font-lock-settings): Move
'property' to after 'jsx'. Stop using predicate (bug#67684).
(js--treesit-property-not-function-p): Delete.
Eric Abrahamsen [Fri, 8 Dec 2023 17:39:58 +0000 (09:39 -0800)]
Provide option to forward Gnus messages with all (most) headers
Bug#67520
* lisp/gnus/gnus-msg.el (gnus-summary-mail-forward): Accept symbolic
prefix to let-bind message-forward-included-headers to nil, which will
include most original message headers in the forwarded copy.
(gnus-summary-post-forward): Corresponding arglist update.
Michael Albinus [Tue, 12 Dec 2023 16:39:51 +0000 (17:39 +0100)]
New macro connection-local-p
* doc/lispref/variables.texi (Applying Connection Local Variables):
Add macro 'connection-local-p'.
* etc/NEWS: Add macro `connection-local-p'.
* lisp/files-x.el (connection-local-p): New macro.
(connection-local-value): Add debug declaration.
* lisp/net/tramp-compat.el (tramp-compat-connection-local-p): New macro.
* lisp/net/tramp-crypt.el (tramp-crypt-cleanup-connection):
Bind `tramp-crypt-enabled'.
* test/lisp/files-x-tests.el (files-x-test-connection-local-value):
* test/lisp/net/tramp-tests.el (tramp-test18-file-attributes)
(tramp-test35-remote-path): Adapt tests.
Noah Peart [Sun, 10 Dec 2023 22:58:31 +0000 (14:58 -0800)]
Add indentation rules for bracketless statements in js-ts-mode
* lisp/progmodes/js.el (js--treesit-indent-rules): Add indentation
rules to handle bracketless statements (bug#67758).
* test/lisp/progmodes/js-tests.el (js-ts-mode-test-indentation):
New test for js-ts-mode indentation.
* test/lisp/progmodes/js-resources/js-ts-indents.erts: New file
with indentation tests for js-ts-mode.
Juri Linkov [Mon, 11 Dec 2023 17:16:37 +0000 (19:16 +0200)]
Fix typo in commit
3c093148958d56e0ed8e12a8e00ced1ef052259a
* lisp/minibuffer.el (minibuffer-completion-help):
Set t to LOCAL arg of add-hook for after-change-functions.
Po Lu [Mon, 11 Dec 2023 03:39:00 +0000 (11:39 +0800)]
Introduce menus beneath new chapters in the Transient menu
* doc/misc/transient.texi (Usage)
(Modifying Existing Transients): Insert menus from which Texinfo
4.13 can infer Prev and Next nodes.
Po Lu [Mon, 11 Dec 2023 03:28:34 +0000 (11:28 +0800)]
Correct implementation of UTP
* src/sfnt.c (sfnt_interpret_utp): Derive which flags to reset
from the freedom vector.
Yuan Fu [Mon, 11 Dec 2023 02:24:27 +0000 (18:24 -0800)]
Fix c-ts-mode bracketless indentation for BSD style (bug#66152)
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--indent-styles): Make sure the BSD rules only apply to
opening bracket (compound_statement), then bracketless statements will
fallback to common rules.
* test/lisp/progmodes/c-ts-mode-resources/indent-bsd.erts: Copy the
bracketless test from indent.erts to here.
Augustin Chéneau [Wed, 20 Sep 2023 10:23:06 +0000 (12:23 +0200)]
Add missing indent rules in c-ts-mode (bug#66152)
Example:
static myttype *
variable_name;
* lisp/progmodes/c-ts-mode.el (c-ts-mode--indent-styles): Add rules.
Yuan Fu [Mon, 11 Dec 2023 01:40:39 +0000 (17:40 -0800)]
Fix treesit-default-defun-skipper (bug#66711)
* lisp/treesit.el:
(treesit-default-defun-skipper): Add bol to the rx pattern.
Dmitry Gutov [Mon, 11 Dec 2023 01:19:11 +0000 (03:19 +0200)]
project-any-command: Use 'project-aware'
* lisp/progmodes/project.el (project-any-command): Change the
symbol it's looking for to 'project-aware'. Seems to convey the
semantics best.
Yuan Fu [Mon, 11 Dec 2023 00:23:44 +0000 (16:23 -0800)]
Fix treesit-node-field-name and friends (bug#66674)
So turns out ts_node_field_name_for_child takes a named node index,
but we were passing it normal index that counts both named and
anonymous nodes. That's what makes the field name all wrong in
treesit explorer.
* doc/lispref/parsing.texi:
(Accessing Node Information): Update docstring.
* lisp/treesit.el (treesit-node-index): Add some unrelated comment.
(treesit-node-field-name): Get named node index rather than all node
index.
* src/treesit.c (Ftreesit_node_field_name_for_child): Update
docstring, use ts_node_named_child_count.
Maciej Kalandyk [Sun, 10 Dec 2023 23:15:34 +0000 (01:15 +0200)]
python-ts-mode: Highlight default parameters
* lisp/progmodes/python.el (python--treesit-settings):
Highlight default parameters (bug#67703).
Stefan Kangas [Sun, 10 Dec 2023 21:06:54 +0000 (22:06 +0100)]
Mark `;#@` as :safe for asm-comment-char
* lisp/progmodes/asm-mode.el (asm--safe-comment-char-p): New function
that returns true for characters #, @, and ;.
(asm-comment-char): Use new function as :safe predicate.
Stefan Kangas [Sun, 10 Dec 2023 21:04:51 +0000 (22:04 +0100)]
; Use ?c instead of integer in local variables
* exec/loader-armeabi.s (timespec):
* exec/loader-mips64el.s (__start):
* exec/loader-mipsel.s (__start): Use ?c instead of integer in local
variables.
Kyle Meyer [Sun, 10 Dec 2023 16:16:58 +0000 (11:16 -0500)]
Update to Org 9.6.13
Eli Zaretskii [Sun, 10 Dec 2023 15:35:54 +0000 (10:35 -0500)]
Merge from origin/emacs-29
2773cf9e013 ; Fix typos
020aff95fa3 ; Fix typos in ChangeLog files
5e03a621efc ; * lisp/progmodes/c-ts-mode.el (c-ts-mode--else-heuristi...
f0734e1c0d1 Fix c-ts-mode indent heuristic (bug#67417)
08fc6bace20 Fix c-ts-mode indentation (bug#67357)
71bc2815ccd Add font-locking for hash-bang lines in typescript-ts-mode.
db8347c8c87 Add font-locking for hash-bang lines in js-ts-mode
91f2ade57bb ruby-mode: Better detect regexp vs division (bug#67569)
Michael Albinus [Sun, 10 Dec 2023 14:15:12 +0000 (15:15 +0100)]
; Fix error in my last commit
* lisp/files-x.el (hack-connection-local-variables): Autoload.
(connection-local-value): Revert previous fix.
Po Lu [Sun, 10 Dec 2023 14:05:09 +0000 (22:05 +0800)]
* lisp/files-x.el (connection-local-value): Fix Dired crash.
Stefan Kangas [Sun, 10 Dec 2023 13:44:41 +0000 (14:44 +0100)]
Update publicsuffix.txt from upstream
* etc/publicsuffix.txt: Update from
https://publicsuffix.org/list/public_suffix_list.dat
dated 2023-12-06 20:17:45 UTC.
Stefan Kangas [Sun, 10 Dec 2023 13:05:34 +0000 (14:05 +0100)]
; Fix a few more typos
Stefan Kangas [Sun, 10 Dec 2023 12:22:04 +0000 (13:22 +0100)]
; Fix typos
Stefan Kangas [Sun, 10 Dec 2023 11:39:54 +0000 (12:39 +0100)]
; Fix typos
Stefan Kangas [Sun, 10 Dec 2023 11:38:19 +0000 (12:38 +0100)]
; Fix typos in ChangeLog files
Michael Albinus [Sun, 10 Dec 2023 11:26:38 +0000 (12:26 +0100)]
dired-listing-switches handles connection-local values if exist
* doc/emacs/dired.texi (Dired Enter):
* doc/misc/tramp.texi (Frequently Asked Questions):
* etc/NEWS: 'dired-listing-switches' handles connection-local
values if exist.
* doc/lispref/variables.texi (Applying Connection Local Variables):
Fix decription of connection-local-default-application.
* lisp/dired.el (dired-listing-switches): Adapt docstring.
(dired-internal-noselect, dired-mode):
* lisp/dired-x.el (dired-virtual):
* lisp/files.el (recover-file, recover-session):
* lisp/net/ange-ftp.el (ange-ftp-get-files): Use connection-local
value of `dired-listing-switches'.
* lisp/files-x.el (connection-local-value): Adapt docstring.
* lisp/man.el (Man-shell-file-name): Use `connection-local-value'.
Eli Zaretskii [Sun, 10 Dec 2023 09:41:35 +0000 (11:41 +0200)]
; * lisp/progmodes/c-ts-mode.el (c-ts-mode--else-heuristic): Doc fix.
Yuan Fu [Sun, 10 Dec 2023 09:24:25 +0000 (01:24 -0800)]
Fix c-ts-mode indent heuristic (bug#67417)
This is a continuation of the first two patches for bug#67417. The
c-ts-mode--prev-line-match heuristic we added is too broad, so for now
we are just adding a very specific heuristic for the else case.
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--prev-line-match): Remove function.
(c-ts-mode--else-heuristic): New function.
(c-ts-mode--indent-styles): Use c-ts-mode--else-heuristic.
nverno [Wed, 22 Nov 2023 00:33:04 +0000 (16:33 -0800)]
Fix c-ts-mode indentation (bug#67357)
1. In a compund_statement, we indent the first sibling against the
parent, and the rest siblings against their previous sibling. But
this strategy falls apart when the first sibling is not on its own
line. We should regard the first sibling that is on its own line as
the "first sibling"", and indent it against the parent.
2. In linux style, in a do-while statement, if the do-body is
bracket-less, the "while" keyword is indented to the same level as the
do-body. It should be indented to align with the "do" keyword
instead.
* lisp/progmodes/c-ts-mode.el:
(c-ts-mode--no-prev-standalone-sibling): New function.
(c-ts-mode--indent-styles): Use
c-ts-mode--no-prev-standalone-sibling. Add while keyword indent rule.
* test/lisp/progmodes/c-ts-mode-resources/indent.erts: New tests.
nverno [Sat, 9 Dec 2023 19:35:44 +0000 (11:35 -0800)]
Add font-locking for hash-bang lines in typescript-ts-mode.
* lisp/progmodes/typescript-ts-mode.el
(typescript-ts-mode--font-lock-settings):
Add font-lock for hash bang line.
nverno [Sat, 9 Dec 2023 19:28:15 +0000 (11:28 -0800)]
Add font-locking for hash-bang lines in js-ts-mode
* lisp/progmodes/js.el (js--treesit-font-lock-settings):
Add font-lock for hash bang line.
Stefan Monnier [Sat, 9 Dec 2023 23:03:48 +0000 (18:03 -0500)]
Tweak doc of `analyze-text-conversion` vs `post-self-insert-hook`
* lisp/simple.el (analyze-text-conversion): Fix typo.
* lisp/progmodes/cc-mode.el (c-initialize-cc-mode): Add comment about
`post-text-conversion-hook`.
Dmitry Gutov [Sat, 9 Dec 2023 17:04:55 +0000 (19:04 +0200)]
ruby-mode: Better detect regexp vs division (bug#67569)
* lisp/progmodes/ruby-mode.el (ruby-syntax-before-regexp-re):
Add grouping around methods from the whitelist.
(ruby-syntax-propertize): Also look for spaces around the slash.
Manuel Giraud [Sat, 9 Dec 2023 12:02:19 +0000 (13:02 +0100)]
Fix desktop-save for dired buffers (bug#66697)
* lisp/dired.el (dired-desktop-save-p): Move all logic here. Carry on
when 'desktop-files-not-to-save' is nil.
(dired-desktop-buffer-misc-data): Use it.
Eli Zaretskii [Sat, 9 Dec 2023 12:59:08 +0000 (07:59 -0500)]
; Auto-commit of loaddefs files.
Eli Zaretskii [Sat, 9 Dec 2023 12:57:35 +0000 (07:57 -0500)]
; * lisp/progmodes/gud.el (lldb): Fix trailing whitespace.
Eli Zaretskii [Sat, 9 Dec 2023 12:46:45 +0000 (07:46 -0500)]
; * doc/misc/modus-themes.org: Fix merge snafu.
Eli Zaretskii [Sat, 9 Dec 2023 12:25:21 +0000 (07:25 -0500)]
Merge from origin/emacs-29
0f361cc985d ; Minor copyedits in description of ':box' face property
46fe7a17f53 Fix dragging mode line on text terminals with a mouse (bu...
12daf386f37 ; * doc/lispref/processes.texi (Network): Fix wording and...
037d858dc1a (rust-ts-mode): Set electric-indent-chars
dc9b733ab88 js-ts-mode: Highlight function parameters inside destruct...
4a72f13bdfb js-ts-mode: Highlight property shorthands in assignments
83ed9018ede (js--treesit-font-lock-settings): Highlight parameters in...
ad0f87bb4c3 (js--treesit-font-lock-settings): Remove some duplicates
71c5f3694fd ; Another fix of doc string of 'message-mail-user-agent' ...
04a39353bae ; * lisp/gnus/message.el (message-mail-user-agent): Doc f...
82ddcf37ec6 ; * doc/lispref/files.texi (Changing Files): Fix last cha...
89068516b3e Don't claim to signal an error when deleting a nonexistin...
4fd254e1830 * lisp/indent.el (indent-rigidly): Improve prompt (bug#67...
5f923ff1a6a ; Fix typos
a1f88963f5d rust-ts-mode--comment-docstring: Handle block doc comments
a547b0e2e83 rust-ts-mode--comment-docstring: Fix/improve the previous...
Eli Zaretskii [Sat, 9 Dec 2023 11:05:07 +0000 (13:05 +0200)]
; Minor copyedits in description of ':box' face property
* doc/lispref/display.texi (Face Attributes): Rearrange
description of ':box' attributes. Suggested by Arash Esbati
<arash@gnu.org>. (Bug#67713)
Eli Zaretskii [Sat, 9 Dec 2023 10:02:48 +0000 (12:02 +0200)]
; Fix documentation of register-preview changes
* etc/NEWS: Fix wording of 'register-use-preview' entry.
* lisp/register.el (register-use-preview): Doc fix. Add ':version'.
Michael Albinus [Sat, 9 Dec 2023 09:25:58 +0000 (10:25 +0100)]
Merge branch 'master' of git.sv.gnu.org:/srv/git/emacs
Vladimir Kazanov [Sat, 9 Dec 2023 09:25:26 +0000 (10:25 +0100)]
Document ert-font-lock
* doc/misc/ert.texi: Expand the manual.
* etc/NEWS: Mention ert-font-lock.