Emanuel Berg [Tue, 23 Jan 2024 13:21:49 +0000 (14:21 +0100)]
Make erc-cmd-AMSG session local; add /GMSG, /AME and /GME
* etc/ERC-NEWS: Mention new slash commands.
* lisp/erc/erc.el (erc-cmd-AMSG): Make it consistent with the doc
string by only affecting the current connection.
(erc-cmd-GMSG, erc-cmd-AME, erc-cmd-GME): New IRC slash commands.
* test/lisp/erc/erc-scenarios-misc-commands.el
(erc-scenarios-misc-commands--AMSG-GMSG-AME-GME): New test.
* test/lisp/erc/resources/commands/amsg-barnet.eld: New file.
* test/lisp/erc/resources/commands/amsg-foonet.eld: New file.
(Bug#68401)
F. Jason Park [Thu, 22 Feb 2024 04:08:37 +0000 (20:08 -0800)]
; Don't mention erc-branded Compat macros in ERC-NEWS
* doc/misc/erc.texi: Change fancy SASL example to also demonstrate
`let'-binding a local module.
* etc/ERC-NEWS: Don't mention `erc-compat-call' and
`erc-compat-function' because Emacs now ships with a compat.el stub
library.
* lisp/erc/erc-backend.el (erc-decode-parsed-server-response): Add
comments.
* lisp/erc/erc.el (erc): Mention return value.
Stefan Monnier [Fri, 23 Feb 2024 22:03:10 +0000 (17:03 -0500)]
diff-mode.el (diff-refine-nonmodified): New option
* lisp/vc/diff-mode.el (diff-font-lock-keywords): Refer directly to
font-lock faces.
(diff-apply-hunk): Use `user-error` for errors usually not due to bugs.
(diff--refine-propertize): New function.
(diff-refine-nonmodified): New custom var (bug#61396).
(diff--refine-hunk): Use them.
Stefan Monnier [Fri, 23 Feb 2024 21:46:01 +0000 (16:46 -0500)]
elisp-mode.el: Use `handler-bind` instead of `debug-on-error`
* lisp/progmodes/elisp-mode.el (elisp-enable-lexical-binding):
Don't get fooled by a global binding of `lexical-binding` to t.
(elisp--eval-last-sexp-fake-value): Delete var.
(elisp--eval-defun): Don't let-bind `debug-on-error` since it's
already arranged by the only caller.
(eval-last-sexp, eval-defun): Use `handler-bind` instead of
`debug-on-error`.
Robert A. Burks [Fri, 16 Feb 2024 23:17:52 +0000 (18:17 -0500)]
Fix Flymake lighter tool-tip from generating errors
Flymake tool-tip was generating errors on mouse over of
mode-line lighter on inactive windows and on the minor mode
indicator in the describe-mode Help page.
* lisp/progmodes/flymake.el (flymake--mode-line-title):
'help-echo' now uses buffer local state and makes null
check. (Bug#69248)
* doc/lispref/abbrevs.texi (Abbrev Tables):
* doc/lispref/symbols.texi (Creating Symbols):
* doc/lispref/objects.texi (Type Predicates): Update text for obarray
now being an opaque type.
* etc/NEWS: Announce.
The new opaque type replaces the previous use of vectors for obarrays.
`obarray-make` now returns objects of this type. Functions that take
obarrays continue to accept vectors for compatibility, now just using
their first slot to store an actual obarray object.
obarray-size and obarray-default-size now obsolete.
* lisp/obarray.el (obarray-clear): New.
* lisp/abbrev.el (clear-abbrev-table):
* lisp/vc/vc.el (vc-clear-context): Use it instead of assuming the
obarray is a vector that can be 0-filled.
* test/lisp/obarray-tests.el (obarray-clear): New test.
Tone down python-mode warning to a simple message (bug#68559)
* lisp/progmodes/python.el
(python-shell-completion-native-turn-on-maybe):
There is no need for an alarming warning when using an inferior Python
without GNU readline; a calm message will do.
Juri Linkov [Thu, 22 Feb 2024 17:38:17 +0000 (19:38 +0200)]
* lisp/help-fns.el (describe-mode-outline): New user option (bug#64684).
(describe-mode, describe-mode--minor-modes): Use 'describe-mode-outline'.
* lisp/help-mode.el (help-setup-xref): After disabling outline-minor-mode
also kill all outline-related local variables. So that they won't affect
the output of other help commands in the same help buffer.
Jörg Bornemann [Sat, 17 Feb 2024 20:18:02 +0000 (21:18 +0100)]
Recognize functions and macros as defuns in 'cmake-ts-mode'
* lisp/progmodes/cmake-ts-mode.el (cmake-ts-mode--function-name):
Renamed to 'cmake-ts-mode--defun-name' since the function handles
now functions and macros.
(cmake-ts-mode--defun-name): Return text of the first 'argument'
node below 'function_def' and 'macro_def' nodes.
(cmake-ts-mode): Set up treesit-defun-type-regexp and
'treesit-defun-name-function'. Change the imenu setup to
recognize macros too. Since we have set up
'treesit-defun-name-function', we don't have to
pass 'cmake-ts-mode--function-name' anymore. (Bug#69186)
To make `treesit-defun-at-point' work properly, we have to recognize
function_def/macro_def nodes, not the lower-level *_command nodes.
Andrea Corallo [Wed, 21 Feb 2024 10:18:06 +0000 (11:18 +0100)]
* Make 'comp--compute-function-types' a pass
* lisp/emacs-lisp/comp.el (comp-passes): Add comp--compute-function-types.
(comp--compute-function-types): New function.
(comp--compute-function-type): Move it.
(comp--final): Update it.
Eli Zaretskii [Wed, 21 Feb 2024 15:16:45 +0000 (17:16 +0200)]
Remove redundant call to 'eln_load_path_final_clean_up'
* src/emacs.c (shut_down_emacs): Remove redundant call to
'eln_load_path_final_clean_up'. We call it from 'kill-emacs'
right before the call to 'exit'.
Jonas Bernoulli [Tue, 20 Feb 2024 17:49:20 +0000 (18:49 +0100)]
Allow trivially autoloading uses of transient's define macros
Since 49e41991b2f transient-define-prefix itself was autoloaded, but
that meant that when ever an autoload file was loaded, which contained
an autoload for a command defined using that macro, transient itself
had to be loaded.
That shouldn't be necessary. For commands using these macros, an
autoload that is identical to what would have been generated if it
had been defined using defun, works just fine.
* lisp/emacs-lisp/loaddefs-gen.el
(loaddefs-generate--make-autoload): Allow uses of
transient-define-prefix, transient-define-suffix,
transient-define-infix and transient-define-argument
to be autoloaded using just ";;;autoload".
* lisp/transient.el (transient-define-prefix): No longer autoload.
Jonas Bernoulli [Mon, 19 Feb 2024 22:36:17 +0000 (23:36 +0100)]
Make find-function-regexp also find transient-define-*
* lisp/emacs-lisp/find-func.el (find-function-regexp): Also find
transient-define-prefix, transient-define-suffix,
transient-define-infix and transient-define-argument.
* lisp/net/tramp-container.el (tramp-dockercp-method)
(tramp-podmancp-method): New defconst.
(tramp-methods) <dockercp, podmancp>: Add new methods.
(tramp-container--completion-function): Adapt docstring. Use it
for "dockercp" and "podmancp" completion.
* lisp/net/tramp.el (tramp-get-remote-tmpdir):
* lisp/net/tramp-gvfs.el (tramp-gvfs-maybe-open-connection):
* lisp/net/tramp-sh.el (tramp-maybe-open-connection): Use a default
value with `tramp-get-method-parameter'.
* lisp/net/tramp-sh.el (tramp-methods) <nc>: Add `tramp-copy-file-name'.
(tramp-default-copy-file-name): New defconst.
(tramp-make-copy-file-name): Rename from
`tramp-make-copy-program-file-name'. Use method parameter
`tramp-copy-file-name'. (Bug#69085)
(tramp-do-copy-or-rename-file-out-of-band): Adapt callees.
* test/lisp/net/tramp-tests.el (tramp--test-container-p): Adapt.
(tramp--test-container-oob-p): New defun.
(tramp-test17-dired-with-wildcards, tramp-test35-remote-path)
(tramp-test41-special-characters): Use it.
(tramp--test-set-ert-test-documentation): Use `split-string'.
* lisp/emacs-lisp/shortdoc.el (shortdoc--check)
(define-short-documentation-group): Check that used keywords exist.
* lisp/emacs-lisp/shortdoc.el (list): Fix a typo.
Paul Eggert [Sun, 18 Feb 2024 07:38:30 +0000 (23:38 -0800)]
Remove no-longer-needed pdumper_load workaround
* src/pdumper.c (pdumper_load): Revert my commit "Pacify GCC
12.1.1 in default developer build" dated 2022-06-13 13:21:18 -07,
as GCC bug 105961 is fixed, and this workaround is not needed for
unfixed GCC as these builds should not use --enable-gcc-warnings.
Paul Eggert [Sun, 18 Feb 2024 07:12:18 +0000 (23:12 -0800)]
Ignore fewer GCC -fanalyzer diagnostics in ccl.c
* src/ccl.c: Do not ignore -Wanalyzer-use-of-uninitialized-value,
as that bug has been fixed in GCC. Ignore
-Wanalyzer-out-of-bounds only if GCC 13, as the bug will
reportedly be fixed when GCC 14 comes out.
Eshel Yaron [Wed, 21 Feb 2024 16:23:57 +0000 (17:23 +0100)]
New command 'minibuffer-apply'
* lisp/minibuffer.el (completions-used-input): New face.
(minibuffer-completion-action): New variable and function.
(minibuffer-completion-command): New variable.
(completing-read-default): Set it to 'this-command'.
(minibuffer-current-input): New function.
(minibuffer-apply): New command.
(minibuffer-local-completion-map): Bind it to 'C-j'.
(minibuffer-local-must-match-map): Unbind 'C-j'.
* lisp/cus-edit.el (customize-toggle-option): Set
'minibuffer-action' property to non-nil.
Eshel Yaron [Wed, 21 Feb 2024 12:24:06 +0000 (13:24 +0100)]
; Reposition cursor after refreshing *Completions*
* lisp/minibuffer.el (minibuffer-completion-help): If *Completions* is
already visible and some candidate is highlighted, try to highlight it
again after populating the buffer anew.
Paul Eggert [Fri, 16 Feb 2024 02:45:29 +0000 (18:45 -0800)]
Adjust to yesterday’s Gnulib nstrftime changes
Bruno Haible fixed Gnulib so that nstrftime no longer requires
locking code, which means we no longer need to avoid localename.
However, nstrftime now requires localename-unsafe-limited which
pulls in some Gnulib-specific locale code, and it’s likely this
needs to be replaced with Emacs-specific locale code. In the
meantime let’s continue to finess this by avoiding
localename-unsafe-limited.
* admin/merge-gnulib (AVOIDED_MODULES):
Avoid localename-unsafe-limited instead of localename.
Jakub Ječmínek [Sat, 17 Feb 2024 17:34:36 +0000 (09:34 -0800)]
Provide better default value for date in Gnus scoring
Bug#61002, thanks to Kamil Jońca for reporting
* lisp/gnus/gnus-score.el (gnus-summary-score-entry): When scoring on
Date header, the default value for the prompt should be number of days
between the date of the article under point, and "now".