Commit graph

93680 commits

Author SHA1 Message Date
Eli Zaretskii
5256b8dd4e Merge from origin/emacs-29
bf7034048c ; * doc/emacs/custom.texi (Changing a Variable): Update e...
466d1c98a9 Fix icons.el when icon does not exist as a file
2a861124e8 ; Improve documentation of 'buffer-match-p'
dc9d02f8a0 * lisp/isearch.el (isearch-search-and-update): Let-bind '...
9308d9a74a * src/comp.c (Fcomp__compile_ctxt_to_file): Fix hash tabl...
a2a6619b28 Provide decent documentation for 'help-quick'
ab66b749a2 ; * src/window.c (Fset_window_margins): Doc fix.
1a677d1429 treesit--pre-syntax-ppss: Fix args-out-of-range in intern...
2024-01-06 08:20:19 -05:00
Eli Zaretskii
466d1c98a9 Fix icons.el when icon does not exist as a file
* lisp/emacs-lisp/icons.el (icons--create): Handle the case when
ICON is a file that doesn't exists or is unreadable.  Suggested by
David Ponce <da_vid@orange.fr>.  (Bug#66846)
2024-01-06 13:26:29 +02:00
Eli Zaretskii
409985288d Fix last change (bug#67930)
* lisp/progmodes/compile.el (compilation--expand-fn): Renamed from
'safe-expand-file-name'; all callers changed.  Doc fix.
2024-01-06 12:33:44 +02:00
Jurgen De Backer
471cc26002 Fix file-name resolution in *compilation* and *grep* buffers
Resolving symlinks in file names could lead to non-existent files
if some leading directory is a symlink to its parent.
In emacs 28 'expand-file-name' was replaced by 'file-truename' to
solve bug #8035.

* lisp/progmodes/compile.el (safe-expand-file-name): New function.
(compilation-find-file-1): Call 'safe-expand-file-name'.  (Bug#67930)
2024-01-06 12:23:51 +02:00
Martin Rudalics
d3a4fe5694 Fix use of 'display-buffer-alist' for Info buffers
* lisp/info.el (info-pop-to-buffer): New function.
(info-other-window, info, Info-find-node, Info-revert-find-node)
(Info-next, Info-prev, Info-up, info-display-manual): Call
'info-pop-to-buffer'.  (Bug#68081)
2024-01-06 11:49:36 +02:00
Po Lu
2740a3cbfd ; Update Android port splash screen message
* lisp/term/android-win.el (android-after-splash-screen): Insert
missing newline.
2024-01-06 09:49:56 +08:00
Nicholas Vollmer
790b598217 Use special-mode in checkdoc status buffer
* lisp/emacs-lisp/checkdoc.el (checkdoc-display-status-buffer): Use
`special-mode'.  (Bug#68268)
2024-01-05 22:58:39 +01:00
Jeremy Bryant
f9acf12f6f * lisp/mail/rmail.el (rmail-epa-decrypt): Fix typo (bug#68248). 2024-01-05 09:57:41 +02:00
Juri Linkov
dc9d02f8a0 * lisp/isearch.el (isearch-search-and-update): Let-bind 'isearch-cmds'.
When 'isearch-wrap-pause' is 'no' or 'no-ding', let-bind 'isearch-cmds'
to avoid changing it by 'isearch-push-state' in 'isearch-repeat',
so that a later DEL (isearch-delete-char) doesn't stop at the
intermediate failing state (bug#68158).
2024-01-05 09:40:05 +02:00
Eli Zaretskii
d490874b34 Improve documentation of derived modes and their parents
* doc/lispref/modes.texi (Derived Modes): Expand documentation of
functions that manipulate parent modes of a derived mode.
Document 'provided-mode-derived-p'.  Improve indexing.

* lisp/subr.el (derived-mode-all-parents)
(derived-mode-add-parents, provided-mode-derived-p)
(derived-mode-p): Doc fixes.
2024-01-05 09:38:58 +02:00
Stefan Monnier
ba300c96fa * lisp/startup.el (startup--load-user-init-file): Fix last change
Use `condition-case-unless-debug` only in the branch when
`--debug-init` is not in use, otherwise it prevents `handler-bind`
from triggering the debugger.
2024-01-04 22:12:14 -05:00
Graham Marlow
1d40c601b3
Improve yaml-ts-mode fill-paragraph (bug#68226)
When using fill-paragraph on a block_scalar (the element within a
block_node) fill the paragraph such that the contents remain
within the block_node. This fixes the previous behavior that would
clobber a block_node.

* lisp/textmodes/yaml-ts-mode.el: Add yaml-ts-mode--fill-paragraph
2024-01-04 16:40:35 -08:00
Stefan Monnier
1081e975c9 Merge branch 'handler-bind' 2024-01-04 18:46:16 -05:00
Stefan Monnier
1870e2f48a Avoid defconst for vars which we modify
If we `setq` or let-bind a var, then presumably it's not a const.

* lisp/bookmark.el (bookmark-bmenu-buffer):
* lisp/char-fold.el (char-fold-table):
* lisp/pcmpl-linux.el (pcmpl-linux-fs-modules-path-format)
(pcmpl-linux-mtab-file):
* lisp/emacs-lisp/bytecomp.el (byte-compile-log-buffer):
* lisp/emacs-lisp/check-declare.el (check-declare-warning-buffer):
* lisp/emacs-lisp/ert-x.el (ert-remote-temporary-file-directory):
* lisp/erc/erc.el (erc-default-port):
* lisp/net/tramp.el (tramp-unknown-id-string)
(tramp-unknown-id-integer):
* lisp/url/url-util.el (url-unreserved-chars):
2024-01-04 18:44:43 -05:00
Stefan Monnier
391c208aec (backtrace-on-redisplay-error): Use handler-bind
Reimplement `backtrace-on-redisplay-error` using `push_handler_bind`.
This moves the code from `signal_or_quit` to `xdisp.c` and
`debug-early.el`.

* lisp/emacs-lisp/debug-early.el (debug-early-backtrace):
Add `base` arg to strip "internal" frames.
(debug--early): New function, extracted from `debug-early`.
(debug-early, debug-early--handler): Use it.
(debug-early--muted): New function, extracted (translated) from
`signal_or_quit`; trim the buffer to a max of 10 backtraces.

* src/xdisp.c (funcall_with_backtraces): New function.
(dsafe_calln): Use it.
(syms_of_xdisp): Defsym `Qdebug_early__muted`.

* src/eval.c (redisplay_deep_handler): Delete var.
(init_eval, internal_condition_case_n): Don't set it any more.
(backtrace_yet): Delete var.
(signal_or_quit): Remove special case for `backtrace_on_redisplay_error`.
* src/keyboard.c (command_loop_1): Don't set `backtrace_yet` any more.
* src/lisp.h (backtrace_yet): Don't declare.
2024-01-04 16:37:01 -05:00
Stefan Monnier
a5dcc1abea (macroexp--with-extended-form-stack): Use plain let
`macroexp--with-extended-form-stack` used manual push/pop so that upon
non-local exits the "deeper" value is kept, so the error handler gets
to know what was the deeper value, so as to be able to compute more
precise error locations.
Replace this with a `handler-bind` which catches that "deeper" value
more explicitly.

* lisp/emacs-lisp/bytecomp.el (bytecomp--displaying-warnings):
Use `handler-bind` to catch the value of `byte-compile-form-stack`
at the time of the error.  Also consolidate the duplicated code.

* lisp/emacs-lisp/macroexp.el (macroexp--with-extended-form-stack):
Use a plain dynbound let-rebinding.
2024-01-04 16:35:53 -05:00
Stefan Monnier
604e34338f Move batch backtrace code to top_level_2
Move ad-hoc code meant to ease debugging of bootstrap (and batch mode)
to `top_level_2` so it doesn't pollute `signal_or_quit`.

* src/lisp.h (pop_handler, push_handler_bind): Declare.
* src/keyboard.c (top_level_2): Setup an error handler to call
`debug-early` when noninteractive.
* src/eval.c (pop_handler): Not static any more.
(signal_or_quit): Remove special case for noninteractive use.
(push_handler_bind): New function, extracted from `Fhandler_bind_1`.
(Fhandler_bind_1): Use it.
(syms_of_eval): Declare `Qdebug_early__handler`.
* lisp/emacs-lisp/debug-early.el (debug-early-backtrace): Weed out
frames below `debug-early`.
(debug-early--handler): New function.
2024-01-04 16:35:53 -05:00
Stefan Monnier
80b081a0ac startup.el: Use handler-bind to implement --debug-init
This provides a more reliable fix for bug#65267 since we don't
touch `debug-on-error` nor `debug-ignore-errors` any more.

* lisp/startup.el (startup--debug): New function.
(startup--load-user-init-file): Use it and `handler-bind` instead of
let-binding `debug-on-error`.
2024-01-04 16:35:53 -05:00
Stefan Monnier
fe0f15dbc9 ert.el: Use handler-bind to record backtraces
* lisp/emacs-lisp/ert.el (ert--should-signal-hook): Delete function.
(ert--expand-should-1): Don't bind `signal-hook-function`.
(ert--test-execution-info): Remove `next-debugger` slot.
(ert--run-test-debugger): Adjust to new calling convention.
Pass the `:backtrace-base` info to the debugger.
(ert--run-test-internal): Use `handler-bind` rather than let-binding
`debugger` and `debug-on-error`.

* lisp/emacs-lisp/ert-x.el (ert-remote-temporary-file-directory): Don't
use `defconst` if it's not meant to stay constant (e.g. we let-bind it
in tramp-tests.el).
2024-01-04 16:33:25 -05:00
Stefan Monnier
7959a63ce2 (eval-expression): Fix bug#67196
* lisp/simple.el (eval-expression--debug): New function.
(eval-expression): Use it together with `handler-bind` instead of
let-binding `debug-on-error`.
2024-01-04 16:33:25 -05:00
Stefan Monnier
5ba75e183c New special form handler-bind
AFAIK, this provides the same semantics as Common Lisp's `handler-bind`,
modulo the differences about how error objects and conditions are
represented.

* lisp/subr.el (handler-bind): New macro.

* src/eval.c (pop_handler): New function.
(Fhandler_Bind_1): New function.
(signal_or_quit): Handle new handlertypes `HANDLER` and `SKIP_CONDITIONS`.
(find_handler_clause): Simplify.
(syms_of_eval): Defsubr `Fhandler_bind_1`.

* doc/lispref/control.texi (Handling Errors): Add `handler-bind`.

* test/src/eval-tests.el (eval-tests--handler-bind): New test.

* lisp/emacs-lisp/lisp-mode.el (lisp-font-lock-keywords):
Move 'handler-bind' from CL-only to generic Lisp.
(handler-bind): Remove indentation setting, it now lives in the macro
definition.
2024-01-04 16:32:53 -05:00
Antero Mejr
225710ba79 Add file completion for "git blame" to pcomplete
* lisp/pcmpl-git.el (pcomplete/git): Add "blame" to the tracked files
clause.  (Bug#68245)
2024-01-04 22:04:29 +01:00
Eli Zaretskii
df505804ab ; Fix documentation of last change
* lisp/minibuffer.el (completion-category-overrides): Doc fix.

* doc/emacs/mini.texi (Completion Options): Update documentation
of 'completions-sort'.
* doc/lispref/minibuf.texi (Completion Variables): Fox wording.
Add a cross-reference to where 'completions-sort' is documented.
2024-01-04 20:47:06 +02:00
Juri Linkov
dc99be8e63 Support display-sort-function in completion-category-overrides (bug#68214)
* doc/lispref/minibuf.texi (Completion Variables):
Add 'display-sort-function' to the table of
'completion-category-overrides'.

* lisp/calendar/calendar.el (calendar-read-date): Add metadata
category 'calendar-month' for completing-read reading a month name.

* lisp/minibuffer.el (completion-category-defaults):
Add 'display-sort-function' with identity for the category 'calendar-month'.
(completion-category-overrides): Add customization for completion sorting
with 'display-sort-function' and a choice like in 'completions-sort'.
(completion-metadata-override-get): New function.
(minibuffer-completion-help): Use 'completion-metadata-override-get'
instead of 'completion-metadata-get' to get sort-fun from
'display-sort-function'.
2024-01-04 19:20:30 +02:00
Morgan Willcock
d69fb6dab2 Fix last change in tempo.el
* lisp/tempo.el: Set marker type for tempo-region-start to
move when text is inserted at its position.  This prevents
the template from inserting text into the region.  (Bug#68185)
2024-01-04 13:21:26 +02:00
Morgan Willcock
5765cc3a5a Ensure indent-region argument order in tempo.el is correct
* lisp/tempo.el (tempo-insert): Call 'indent-region' with the
stored region markers to ensure that the start and end arguments
are used in the correct order.  (Bug#68185)
2024-01-04 13:16:54 +02:00
Eli Zaretskii
a2a6619b28 Provide decent documentation for 'help-quick'
* lisp/help.el (help-quick, help-quick-toggle): Doc fix.

* doc/emacs/help.texi (Help Summary, Misc Help): Document
'help-quick-toggle'.
2024-01-04 10:17:30 +02:00
Dmitry Gutov
bdfa49502a New feature: etags-regen-mode
* lisp/progmodes/etags-regen.el: New file (bug#67687).

* etc/NEWS: Mention the addition.

* .dir-locals.el: Add this project's settings for
etags-regen-regexp-alist and etags-regen-ignores.
2024-01-04 03:44:40 +02:00
Eli Zaretskii
eac9757f5c ; * lisp/vc/vc.el (vc-deduce-fileset): Add commentary for bug#68174. 2024-01-03 14:39:30 +02:00
Dmitry Gutov
91bc775b0c (vc-deduce-fileset): Handle log-view-mode derivatives specially
* lisp/vc/vc.el (vc-deduce-fileset):
Handle log-view-mode derivatives specially, that helps after
switching projects (bug#68174).
2024-01-03 02:12:36 +02:00
Eli Zaretskii
0bc42eec98 ; * lisp/mail/rmail.el (rmail-epa-decrypt): Fix whitespace. 2024-01-02 19:13:55 +02:00
Eli Zaretskii
7592c3a6e0 ; Fix compilation errors in completion-preview.el
* lisp/completion-preview.el (mouse-wheel-up-event)
(mouse-wheel-up-alternate-event, mouse-wheel-down-event)
(mouse-wheel-down-alternate-event): Defvar, to avoid warnings and
errors in builds --without-x.  (Bug#68213)
2024-01-02 19:10:33 +02:00
Richard Stallman
b376766426 Fix non-permenent decryption to show up temperarily.
In a decrypted mime part, replace CRLF with newline,

* lisp/mail/rmail.el (rmail-epa-decrypt-1): If NOT descrypting permanently,
put the decrypts into the view buffer.
(rmail-epa-decrypt, rmail-epa-decrypt-1):
In a decrypted mime part, replace CRLF with newline,
2024-01-02 09:45:45 -05:00
Dmitry Gutov
1a677d1429 treesit--pre-syntax-ppss: Fix args-out-of-range in internal--syntax-propertize
* lisp/treesit.el (treesit--pre-syntax-ppss): Make sure the lower
bound is still within the current restriction (bug#67977).
2024-01-02 15:32:03 +02:00
Stefan Kangas
f77840a552 ; Clarify two comments in byte-optimize-letX
* lisp/emacs-lisp/byte-opt.el (byte-optimize-letX): Clarify comments.
2024-01-02 04:08:43 +01:00
Po Lu
070cb32463 ; Add 2024 to copyright years 2024-01-02 10:30:05 +08:00
Po Lu
ecf08f0621 Merge from savannah/emacs-29
dc4e6b1329 ; Update copyright years in more files
64b3777631 ; Run set-copyright from admin.el
8e1c56ae46 ; Add 2024 to copyright years

# Conflicts:
#	doc/misc/modus-themes.org
#	doc/misc/texinfo.tex
#	etc/NEWS
#	etc/refcards/ru-refcard.tex
#	etc/themes/modus-operandi-theme.el
#	etc/themes/modus-themes.el
#	etc/themes/modus-vivendi-theme.el
#	lib/alloca.in.h
#	lib/binary-io.h
#	lib/c-ctype.h
#	lib/c-strcasecmp.c
#	lib/c-strncasecmp.c
#	lib/careadlinkat.c
#	lib/cloexec.c
#	lib/close-stream.c
#	lib/diffseq.h
#	lib/dup2.c
#	lib/filemode.h
#	lib/fpending.c
#	lib/fpending.h
#	lib/fsusage.c
#	lib/getgroups.c
#	lib/getloadavg.c
#	lib/gettext.h
#	lib/gettime.c
#	lib/gettimeofday.c
#	lib/group-member.c
#	lib/malloc.c
#	lib/md5-stream.c
#	lib/md5.c
#	lib/md5.h
#	lib/memmem.c
#	lib/memrchr.c
#	lib/nanosleep.c
#	lib/save-cwd.h
#	lib/sha1.c
#	lib/sig2str.c
#	lib/stdlib.in.h
#	lib/strtoimax.c
#	lib/strtol.c
#	lib/strtoll.c
#	lib/time_r.c
#	lib/xalloc-oversized.h
#	lisp/auth-source-pass.el
#	lisp/emacs-lisp/lisp-mnt.el
#	lisp/emacs-lisp/timer.el
#	lisp/info-look.el
#	lisp/jit-lock.el
#	lisp/loadhist.el
#	lisp/mail/rmail.el
#	lisp/net/ntlm.el
#	lisp/net/webjump.el
#	lisp/progmodes/asm-mode.el
#	lisp/progmodes/project.el
#	lisp/progmodes/sh-script.el
#	lisp/textmodes/flyspell.el
#	lisp/textmodes/reftex-toc.el
#	lisp/textmodes/reftex.el
#	lisp/textmodes/tex-mode.el
#	lisp/url/url-gw.el
#	m4/alloca.m4
#	m4/clock_time.m4
#	m4/d-type.m4
#	m4/dirent_h.m4
#	m4/dup2.m4
#	m4/euidaccess.m4
#	m4/fchmodat.m4
#	m4/filemode.m4
#	m4/fsusage.m4
#	m4/getgroups.m4
#	m4/getloadavg.m4
#	m4/getrandom.m4
#	m4/gettime.m4
#	m4/gettimeofday.m4
#	m4/gnulib-common.m4
#	m4/group-member.m4
#	m4/inttypes.m4
#	m4/malloc.m4
#	m4/manywarnings.m4
#	m4/mempcpy.m4
#	m4/memrchr.m4
#	m4/mkostemp.m4
#	m4/mktime.m4
#	m4/nproc.m4
#	m4/nstrftime.m4
#	m4/pathmax.m4
#	m4/pipe2.m4
#	m4/pselect.m4
#	m4/pthread_sigmask.m4
#	m4/readlink.m4
#	m4/realloc.m4
#	m4/sig2str.m4
#	m4/ssize_t.m4
#	m4/stat-time.m4
#	m4/stddef_h.m4
#	m4/stdint.m4
#	m4/stdio_h.m4
#	m4/stdlib_h.m4
#	m4/stpcpy.m4
#	m4/strnlen.m4
#	m4/strtoimax.m4
#	m4/strtoll.m4
#	m4/time_h.m4
#	m4/timegm.m4
#	m4/timer_time.m4
#	m4/timespec.m4
#	m4/unistd_h.m4
#	m4/warnings.m4
#	nt/configure.bat
#	nt/preprep.c
#	test/lisp/register-tests.el
2024-01-02 10:28:14 +08:00
Po Lu
083e90dd80 Merge from origin/emacs-29
3204825f56 Fix mangled Subject header field when forwarding (Bug#67360)
7591acfe38 Update to Org 9.6.15
240b4594f1 ; * etc/TODO: Add an item about 'Info-hide-note-references'.
01be4fe39d * doc/emacs/custom.texi (Modifier Keys): Fix markup (bug#...
55555a6a0d org-protocol: Minor copy-edits to Commentary
4696869d3d Improve syntax highlighting for python-ts-mode
2024-01-02 10:19:48 +08:00
Po Lu
8e1c56ae46 ; Add 2024 to copyright years 2024-01-02 09:47:10 +08:00
João Távora
24741d2563 Eglot: filter by prefix in narrow-scope eglot-code-actions
Github-reference: https://github.com/joaotavora/eglot/issues/847

Servers like typescript-language-server, when asked for {"only" :
"source.organizeImports"}, return actions with the
"source.organizeImports.ts" kind.  Eglot rejected these actions, but
according to the spec:

  Kinds are a hierarchical list of identifiers separated by `.` [...]
  The set of kinds is open.

So I guess we can use string-prefix-p

* lisp/progmodes/eglot.el (eglot-code-actions): Use string-prefix-p.
2024-01-01 15:12:43 -06:00
Aaron Jensen
6e2e34a5ca Avoid race condition in parallel native-compilation
* lisp/emacs-lisp/comp.el (comp-delete-or-replace-file): Avoid
race condition by relying on 'rename-file' being an atomic
operation on Posix filesystems.  (Bug#68083)
2024-01-01 22:10:27 +02:00
Mike Kupfer
3204825f56 Fix mangled Subject header field when forwarding (Bug#67360)
* lisp/mh-e/mh-comp.el (mh-forward): Overwrite subject when
forwarding.
2024-01-01 10:32:48 -08:00
Kjetil Orbekk
73126d62a8 Fix vg-hg-annotate-time bug
* lisp/vc/vc-hg.el (vc-hg-annotate-time): Fix extraction of timestamp
from string.
* test/lisp/vc/vc-hg-tests.el (vc-hg-annotate-time): Test that the
correct timestamp is found.

Copyright-paperwork-exempt: yes
2024-01-01 19:56:02 +02:00
Kyle Meyer
7591acfe38 Update to Org 9.6.15 2024-01-01 12:47:27 -05:00
F. Jason Park
4939f41393 Use advertised PREFIX when formatting nicks in ERC
* lisp/erc/erc-speedbar.el (erc-speedbar-insert-user): Run
`erc-get-channel-membership-prefix' in associated buffer if possible.
* lisp/erc/erc.el (erc-get-channel-membership-prefix): Use known
prefix mappings when determining status chars.
* test/lisp/erc/erc-tests.el (erc--parsed-prefix): Use common helpers
for initializing buffers, and use a more realistic example for PREFIX
value.
(erc--update-channel-modes): Add current buffer to `erc-server-user'
object to maintain essential invariant, even though this doesn't
affect the test's outcome.
(erc-tests--equal-including-properties): Move to `erc-tests-common'
and rename `erc-tests-common-equal-with-props'.
(erc--merge-prop, erc--remove-from-prop-value-list,
erc--remove-from-prop-value-list/many): Use new name for
`erc-tests-common-equal-with-props'.
(erc-get-channel-membership-prefix): New test.
(erc--determine-speaker-message-format-args,
erc--determine-speaker-message-format-args/queries-as-channel,
erc--determine-speaker-message-format-args/queries): Use new name
for `erc-tests-common-equal-with-props'.
* test/lisp/erc/resources/erc-tests-common.el
(erc-tests-common-equal-with-props): New macro, originally
`erc-tests--equal-including-properties' from erc-tests.el.
(erc-tests-common-make-server-buf): Initialize tables and make NAME
argument optional.  (Bug#67677)
2023-12-31 06:56:32 -08:00
F. Jason Park
2534a4737f Fix regression in erc-button-add-button
* lisp/erc/erc-button.el (erc-button--nick): Abide by recommended
internal naming convention and use "cusr" instead of "cuser" for
referring to an `erc-channel-user' object.
(erc-button--fallback-cmem-function,
erc-button--get-user-from-spkr-prop): Use new, preferred name
`erc-channel-members' for `erc-channel-users' table.
(erc-button-add-nickname-buttons): Use "cmem" instead of "cuser" to
refer to values of the `erc-channel-members' table, which are cons
cells, not `erc-channel-user' objects.  Use updated slot name `cusr'
when initializing `erc-button--nick' object.
(erc-button-add-button): Honor wishes of
`erc-button--modify-nick-function' advice members when they set the
`nickname-face' slot of the passed-around `erc-button--nick' object to
nil to indicate a desire to forgo adding a face while still
buttonizing the inserted nick with `erc-data', etc.  (Bug#67767)
2023-12-31 06:56:32 -08:00
F. Jason Park
6c89952557 Make erc-update-channel-current-member stricter
* lisp/erc/erc.el (erc--update-cusr-status-if-changed): Remove unused
macro.
(erc-update-current-channel-member): Redo doc string and abide by its
original language to the letter by not honoring a value of t for the
five channel-membership status parameters, even though this may break
user code that accidentally passes t instead of `on'.  Avoid double
lookup for nick in `erc-server-users'.  Rename some variables as per
recommended conventions for `erc-channel-user' objects.  Stash
downcased nick for further reuse.  Don't bother factoring in `addp' to
return value because `cusr-changed-p' is always non-nil when `addp'
is.
2023-12-31 06:56:32 -08:00
F. Jason Park
2560d81351 Don't discard trimmed args in erc-cmd-MODE
* lisp/erc/erc.el (erc-cmd-MODE): Use matched non-whitespace portion
of input line instead of the original line.  Otherwise, when the user
types "/MODE #chan", the server sees "MODE  #chan", with twos spaces.
(erc--parse-nuh): Improve doc.
2023-12-31 06:56:32 -08:00
F. Jason Park
d5f6e911a9 Use format-prompt in erc-select-read-args
* lisp/erc/erc-button.el (erc-button-cmd-KICK, erc-button-cmd-MSG):
Use `read-string' instead of `read-from-minibuffer'.
* lisp/erc/erc.el (erc-select-read-args): Use `format-prompt', which
isn't normally available in Emacs 27 without Compat.
2023-12-31 06:56:32 -08:00
F. Jason Park
8513ecc8a3 Restore predicate for detecting date stamps in ERC
* etc/ERC-NEWS: Mention function `erc-stamp-inserting-date-stamp-p'.
* lisp/erc/erc-stamp.el (erc-stamp-inserting-date-stamp-p): New
function for third parties to detect whether the message being
inserted is a date stamp.  Date stamps as independent messages were
originally introduced as part of bug#60936.
2023-12-31 06:56:32 -08:00