Commit graph

1105 commits

Author SHA1 Message Date
Po Lu
6533fd65b6 Merge from savannah/emacs-30
b585826a65 ; * lisp/files.el (require-with-check): Fix doc string an...
6d55e94996 macOS: Wrong frame rectangle after wake (bug#71912)
c49724b964 ; Grammar fixes
5c3d340e00 Fix format 2 cmap handling in sfnt.c
2024-08-13 09:12:30 +08:00
Po Lu
c49724b964 ; Grammar fixes
* doc/misc/erc.texi (Connecting):

* lisp/erc/erc.el (erc-compute-server, erc-compute-nick)
(erc-compute-full-name, erc-compute-port): Replace "a number of
increasingly more" with an alternative more grammatical.
2024-08-12 08:10:36 +08:00
Po Lu
1a4c26d413 Merge from savannah/emacs-30
679f7ccc49 Prevent accesses to /content files without a GUI connection
f0a7eec5a7 * lisp/net/tramp-integration.el (shortdoc): Use `tramp--w...
fb642d9cf5 Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
f1e37ae423 Avoid crashes in very large buffers with long lines
4dc9e99349 Update description of string comparison functions
3817355aed Add sanity check when adding Tramp functions to shortdoc
1bbb322017 ; * lisp/erc/erc-fill.el (erc-fill-wrap-mode): Doc fix.
3f6e7e1da6 js-ts-mode: Make jsdoc's "description" block a comment (b...
1c7e00f4f6 Also condition cjk-misc font-spec on Android
b89d65df5f ; * etc/PROBLEMS: How to install sources on SUSE Linux (b...
729b17c202 ; * src/lread.c (Fload): Add comment.  (Bug#72433)
bfb1aee998 Fix ':defer nil' in 'use-package'
d787817076 Document unsupported color Emoji on OpenBSD
db1f749db5 Fix regressions in Customize caused by 'widget-unselected...
f94d58008e Avoid inserting extra space in SVG data
292fcd2009 Fix c-ts-common filling function (bug#71760)
e50d597f45 Fix missing type checks before specbind

# Conflicts:
#	lisp/progmodes/c-ts-common.el
2024-08-07 09:21:27 +08:00
F. Jason Park
1bbb322017 ; * lisp/erc/erc-fill.el (erc-fill-wrap-mode): Doc fix. 2024-08-04 22:27:40 -07:00
Eli Zaretskii
44ae4868d3 Merge from origin/emacs-30
a6c78ccf5f ; * src/w32fns.c (Fw32_notification_close): Fix typo (bug...
febafe3788 * test/lisp/wdired-tests.el (wdired-test-bug34915): Fix f...
846b79b6d0 Fix 'wdired-test-unfinished-edit-01'
bc154cba13 ; * src/search.c (Fre_search_forward): Clarify doc string...
53291e3d46 Fontify destructor in c++-ts-mode
d77f8a3475 Fix invalid defcustom type for erc-buffers option
d68a4ea3ec ; Fix 'ibuffer-do-isearch{-regexp}'
8b1a0f8695 Fix infloop in 'shell-resync-dirs'
ce13eee5ab ; * src/image.c (free_image_cache): Add assertion.  (Bug#...
2024-07-13 08:44:49 -04:00
F. Jason Park
d77f8a3475 Fix invalid defcustom type for erc-buffers option
* lisp/erc/erc.el (erc-ensure-target-buffer-on-privmsg): Change
invalid inner `choice' to a `const' for the third-state `status'
variant, which is new in ERC 5.6 and Emacs 30.  Thanks to Mattias
Engdegård for catching this.
2024-07-12 14:51:36 -07:00
Po Lu
a952ca5461 Merge from savannah/emacs-30
dce31372a6 editorconfig-core-handle.el: Fix regressions in fnmatch h...
ed2986494c Checkdoc fixes in `url/*.el`
846c0e10ff Checkdoc fixes in `term/*.el`
3977aa0756 Checkdoc fixes in `mh-e/*.el`
521f740d01 Checkdoc fixes in `calc/*.el`
336aa6ab17 Checkdoc fixes in `textmodes/*.el`
e19fd6a22d Checkdoc fixes in `gnus/*.el`
7350457c79 Checkdoc fixes in `eshell/*.el`
23c1ba81dd Checkdoc fixes in `emulation/*.el`
c85f67a66d Checkdoc fixes in `erc/*.el`
e392382e2e Checkdoc fixes in `vc/*.el`
ef7364b070 Checkdoc fixes in `emacs-lisp/*.el`
5fe1ae0e84 Checkdoc fixes in `mail/*.el`
e43e9d0998 Checkdoc fixes in `net/*.el`
4c6e9f5b00 Improve `use-package-vc-valid-keywords` docstring format
928180f32b ; * etc/TODO: New item on installing Magit.
c193a702dc ; Improve a recent change to the documentation
6ebc5d5c27 ; Delete fixed item from etc/TODO: "proced on macOS"
7b2778e3a3 ; Delete fixed NS bug from etc/TODO
84552ff395 Revert "Fix link to major mode variable in docstring"
198063ba64 * etc/TODO: Add item to convert documentation to 'setopt'.
92de67829c Prefer 'setopt' in browse-url docs
7668385390 ; Improve 'native-comp-debug' documentation
2024-07-09 09:33:09 +08:00
Stefan Kangas
c85f67a66d Checkdoc fixes in erc/*.el
* lisp/erc/erc-backend.el (erc-server-parameters):
* lisp/erc/erc-button.el (erc-button--display-error-with-buttons):
* lisp/erc/erc-dcc.el (erc-dcc-member):
* lisp/erc/erc-fill.el (erc-fill-wrap-refill-buffer):
* lisp/erc/erc-speedbar.el (erc-speedbar--last-ran):
* lisp/erc/erc-stamp.el (erc-stamp--current-time):
* lisp/erc/erc-track.el (erc-make-mode-line-buffer-name):
* lisp/erc/erc.el (erc-interactive-display, erc-modules, erc-cmd-CLEAR)
(erc-update-current-channel-member, erc--format-user-modes)
(erc-check-text-conversion): Checkdoc fixes.
2024-07-08 16:41:02 +02:00
Po Lu
e2561e267f Merge from savannah/emacs-30
72cf9964f3 Inaccuracy in efaq.texi
fc48e9e8ed ; Fix typos in DOS Makefile scripts
9b8d754579 ; * etc/NEWS: Explain Nextstep.
8819e5a45d Fix treesit crash (bug#71681)
eaf2dc96c1 ; Fix SHR test on MS-Windows
57880f597c Delete redundant mention of `with-eval-after-load'
ea8ce98434 * doc/misc/efaq.texi (New in Emacs 30): Fix typos.
45a20d781a ; Fix typos in symbols
d95f039af4 Document security fixes in FAQ
d063af203c Add "New in Emacs 30" to FAQ
ca6b484162 ; * etc/NEWS: Move "Minibuffer and Completions"
35c46663e4 ; * etc/NEWS: Move item to "Lisp Changes".
0515b38d28 ; * etc/NEWS: Move keyboard macro items closer together.
22af3a7103 ; * etc/NEWS: More copy-edits.
000ef8876a ; * etc/NEWS: Move items to "Incompatible Lisp Changes".
4088dc8e4c ; * etc/NEWS: Rearrange "Incompatible Lisp Changes".
179800f36b ; * lisp/epg.el (epg--start): Add commentary about encoding.
73898f0214 Fix non-ASCII filename operatiion on EasyPG (bug#71500)
a65b6aac6b Silence warning with global minor mode :predicate
f5f7343ac4 ; * etc/NEWS: Move an item to "Startup Changes"
c95066bf18 ; * etc/NEWS: Move some Lisp items to better place.
bf7db88ce1 ; * etc/NEWS: Rearrange "Editing Changes in Emacs 30.1"
000424eb9e ; * etc/NEWS: Make touch screen support more prominent.
5b5671587f ; * etc/NEWS: Rearrange "Changes in Emacs 30.1".
31124abdef ; * lisp/thingatpt.el (sexp-at-point): Doc fix (bug#71777).
44f269d6e6 Fix: make 'xwidget-webkit-scroll-backward' scroll backwards
358085997c Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
736b7cad40 Add jsdoc support to php-ts-mode in <script> element
5f3d964e39 Update to Transient v0.7.2-4-gf75bc48d

# Conflicts:
#	etc/NEWS
2024-06-30 10:06:09 +08:00
Stefan Kangas
45a20d781a ; Fix typos in symbols 2024-06-29 17:29:38 +02:00
Po Lu
48f9dde133 Merge from savannah/emacs-30
c4ec905c9a Correct ommissions in rmc.el
bf862fc277 * lisp/hi-lock.el: More fixes related to revert-buffer.
6cc8ffae9a Update to Org 9.7.5-9-ga091ca
c477443ab8 ; Fix typo in lua-ts-mode.el
6e5e4d6193 ; Add 'eglot-ensure' option to 'lua-ts-mode-hook'
58a2f36a8b ; * etc/NEWS: Copy edit.
df53ef176a Merge branch 'emacs-30' of git.savannah.gnu.org:/srv/git/...
039e6ffd86 Write Antinews for Emacs 30 ELisp Reference
bf8c9f702b (eval-last-sexp): Fix bug#71774
6d94090cad * lisp/hi-lock.el: More fixes for revert-buffer (bug#57534)
280c91782a * lisp/hi-lock.el (hi-lock-revert-buffer-rehighlight): Im...
339310d020 * lisp/tab-bar.el (tab-bar-select-restore-windows): Impro...
c1e7569a92 Write Antinews for Emacs 30 user manual
233f683da8 ; * lisp/erc/erc-backend.el (erc-server-reconnect-timeout...

# Conflicts:
#	etc/NEWS
2024-06-28 14:46:58 +08:00
F. Jason Park
233f683da8 ; * lisp/erc/erc-backend.el (erc-server-reconnect-timeout): Doc (bug#71756). 2024-06-27 06:43:18 -07:00
F. Jason Park
20a672b3b2 Change ERC version for Emacs 30 to 5.6.0.30.1
* doc/misc/erc.texi: Change ERCVER to 5.6.0.30.1.
* lisp/erc/erc.el: Change Version package header to 5.6.0.30.1.  Don't
bother updating the `customize-package-emacs-version-alist' entry
because no user options are yet affected.
(erc-version): Change version to 5.6.0.30.1.
Do not merge to master.
2024-06-27 06:43:17 -07:00
F. Jason Park
2531721621 Change ERC version to 5.6.1-git
* doc/misc/erc.texi: Change ERCVER to 5.6.1.
* lisp/erc/erc.el: (erc-version): Change working version to 5.6.1-git.
Do the same for the package Version header.  Don't bother updating
`customize-package-emacs-version-alist' until needed.
2024-06-27 06:36:18 -07:00
Stefan Kangas
0dd2defc2c ; Delete redundant and/or misleading package headers
* lisp/erc/erc-backend.el:
* lisp/hfy-cmap.el:
* lisp/htmlfontify.el:
* lisp/net/newst-backend.el:
* lisp/net/newst-plainview.el:
* lisp/net/newst-reader.el:
* lisp/net/newst-ticker.el:
* lisp/net/newst-treeview.el:
* lisp/net/newsticker.el:
* lisp/use-package/use-package-ensure-system-package.el:
* lisp/wdired.el: Delete redundant and/or misleading package headers.
2024-06-19 07:26:30 +02:00
Stefan Kangas
c0eefebabf ; Fix typos 2024-06-16 22:38:26 +02:00
F. Jason Park
d1e98a8f01 Release ERC 5.6
* lisp/erc/erc.el: Change Version header from 5.6-git to 5.6.  A
`customize-package-emacs-version-alist' mapping for ERC 5.6 to Emacs
30.1 was already added when moving from 5.5 to 5.6-git.  The ERCVER
variable in doc/misc/erc.texi was likewise updated at that time.
Going forward, such changes will continue to happen preemptively, on
the flip side of each release.
(erc-version): Change version from 5.6-git to 5.6.
2024-06-12 12:26:01 -07:00
F. Jason Park
bbac7b9fa3 ; Amend some doc strings in ERC
* lisp/erc/erc-backend.el (define-erc-response-handler): Mention
important distinction between aliases for handlers and hooks, and note
expected type for the latter.
* lisp/erc/erc.el (erc--define-channel-user-status-compat-getter):
Mention that these accessors are not inlined like those generated by
`cl-defstruct'.
2024-06-12 12:26:01 -07:00
F. Jason Park
c69c822c59 ; Improve erc-format-privmessage documentation
* etc/ERC-NEWS: Mention that `erc-format-privmessage' has been removed
from the default client's primary code path.  Revise various headlines.
* lisp/erc/erc.el: Bump Compat version to 29.1.4.5.
(erc-format-privmessage): Make appeal for users to contact the mailing
list if they need to modify speaker-message formatting.
2024-06-08 12:21:14 -07:00
F. Jason Park
f6bfa1844b Restore deferred date-stamp insertions in ERC
* lisp/erc/erc-stamp.el (erc-stamp--recover-on-reconnect): Treat
`erc-stamp--deferred-date-stamp' as a permanent-local variable.
(erc-stamp--date): Document expected possible values for `fn' slot.
(erc-stamp--defer-date-insertion-on-post-modify): Use the function
`ignore' to mean a new `erc-timer-hook' member has been requested.
Use nil to mean one has already run.  Deferred date stamps are new in
ERC 5.6 and Emacs 30.
(erc-stamp--date-mode): Improve doc string.
* test/lisp/erc/erc-scenarios-stamp.el
(erc-scenarios-stamp--date-mode/reconnect): New test.
2024-06-08 12:21:14 -07:00
F. Jason Park
99842876bf Select correct frame after enabling erc-nickbar-mode
* lisp/erc/erc-speedbar.el (erc-speedbar--ensure): Re-select frame
originally selected when earlier calling `speedbar-frame-mode'.  Do
this because `speedbar-frame' may become the new selected frame when
multiple visible frames exist.
(erc-nickbar-disable): Don't expect the mode to have been enabled
previously.
2024-06-05 12:06:38 -07:00
F. Jason Park
50b134c4dc Don't recurse in erc-server-delayed-check-reconnect
* lisp/erc/erc-backend.el (erc-server-delayed-check-reconnect): Run
`reschedule' function on a timer to avoid growing the stack when
calling `delete-process'.
* lisp/erc/erc-common.el (erc--favor-changed-reverted-modules-state):
Fix `pcase' condition so that changing an option to its standard value
does not earn a "STANDARD" label in Customize if that value differs
from the saved one.
* lisp/erc/erc.el (erc-open-socks-tls-stream): Reword doc string.
* test/lisp/erc/erc-tests.el (erc--with-dependent-type-match)
(erc--with-dependent-type-match): Remove useless tests (bug#71178).
* test/lisp/erc/resources/base/reconnect/unexpected-disconnect.eld:
Await phantom EOFs and PINGs to somewhat account for a race that can
result in a failure when running the suite in parallel with -jN.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common--print-trace): Set `debug-on-error' to t
so that errors in timers always trigger test failures.
;; * test/lisp/erc/resources/base/assoc/reconplay/foonet.eld:
;; Timeouts.
;; * test/lisp/erc/resources/base/upstream-reconnect/soju-barnet.eld:
;; Timeouts.
;; * test/lisp/erc/resources/base/mask-target-routing/foonet.eld:
;; Timeouts.
;; * test/lisp/erc/resources/join/network-id/barnet.eld: Timeout.
2024-06-05 11:58:44 -07:00
F. Jason Park
7aa91b299e Fix date-stamp regression in erc-fill-wrap
* lisp/erc/erc-fill.el (erc-fill-wrap, erc-fill-wrap-enable)
(erc-fill-wrap-disable): Add and remove `erc-stamp--insert-date-hook'
member.
(erc-fill--wrap-continued-predicate): Add function-valued variable for
modules to influence `erc-fill--wrap-continued-message-p', which was
originally introduced as part of bug#60936.
(erc-fill--wrap-rejigger-last-message): Move toward beginning of file.
(erc-fill--wrap-unmerge-on-date-stamp): New function.
(erc-fill-wrap): Use `erc-fill--wrap-continued-predicate'.  Restore
recently deleted hunk that reset the wrap marker upon seeing a date
stamp.
* test/lisp/erc/erc-scenarios-fill-wrap.el: New file.
* test/lisp/erc/resources/fill/wrap/merge-datestamp.eld: New file.
2024-05-27 16:47:24 -07:00
F. Jason Park
6888bbbe83 Add ERC module querypoll as monitor placeholder
* doc/misc/erc.texi: Add module `querypoll' to list of built-in
modules'.
* etc/ERC-NEWS: Mention new module `querypoll', and explain new
default behavior for deriving query membership from that of channels.
* lisp/erc/erc-goodies.el (erc--querypoll-ring)
(erc--querypoll-timer): New variables.
(erc-querypoll-exclude-regexp): New option.
(erc-querypoll-mode, erc-querypoll-enable, erc-querypoll-disable): New
module for polling with "WHO" requests for the presence of otherwise
"untracked" query targets.
(erc-querypoll-period-params): New variable.
(erc--querypoll-compute-period)
(erc--querypoll-target-in-chan-p)
(erc--querypoll-get-length)
(erc--querypoll-get-next)
(erc--querypoll-subscribe)
(erc--querypoll-on-352)
(erc--querypoll-send): New functions.
* lisp/erc/erc-speedbar.el (erc-speedbar-buttons): Dispatch queries as
if they were channels when `erc--queries-current-p' returns non-nil.
That is, show head counts alongside query targets as users come and
go.
(erc-speedbar-insert-target): Defer to `erc--queries-current-p' to
know whether to show a query in the style of a channel.  This affects
both the plain speedbar integration as well as the `nickbar' module
added for bug#63595.  Also, use question marks rather than the empty
string for query bullets, so that query and channel items are aligned
vertically.
* lisp/erc/erc.el (erc--queries-current-p): New function.
* test/lisp/erc/erc-goodies-tests.el
(erc--querypoll-compute-period)
(erc--querypoll-target-in-chan-p)
(erc--querypoll-get-length)
(erc--querypoll-get-next): New tests.  (Bug#70928)
2024-05-27 16:46:40 -07:00
F. Jason Park
5f84213c98 Retain client's own user in erc-server-users
* lisp/erc/erc-backend.el (erc-server-KICK, erc-server-PART): Use new
function `erc--remove-channel-user-but' instead of
`erc-remove-channel-users'.  In `erc-server-KICK', remove sender's
channel membership data after displaying the message so that nicks are
buttonized.  Return nil.  In `erc-server-PART', don't run
`erc-remove-channel-member' when the client itself has parted.
* lisp/erc/erc-common.el (erc--remove-user-from-targets): New
function.
* lisp/erc/erc.el (erc-remove-server-user): Redo doc string.
(erc--forget-server-user-function): New variable.
(erc--forget-server-user): New function.
(erc--forget-server-user-ignoring-queries): New function, the default
value of `erc--forget-server-user-function'.
(erc-remove-channel-user): Defer to `erc--forget-server-user-function'
to do the actual removal.
(erc-remove-user): Defer to `erc--remove-user-from-targets'.
(erc-remove-channel-users): Redo doc
(erc--remove-channel-users-but): New function.  The only use case thus
far is for protecting the client's own `erc-server-users' entry from
removal when draining `erc-channel-members' tables after the client
leaves a target buffer or quits.
(erc-kill-buffer-function): Don't remove own user from
`erc-server-users'.
* test/lisp/erc/erc-scenarios-base-renick.el
(erc-scenarios-base-renick-queries-solo): Assert own client parting
its only channel doesn't remove own user from server.  Also assert
that another user parting their only channel removes them from all
queries.  (Bug#70928)
2024-05-27 16:39:18 -07:00
F. Jason Park
04477cf97b Tether query rolls to channel membership in ERC
* lisp/erc/erc-backend.el (erc-server-JOIN): Update query membership
via `erc--ensure-query-member' when someone else joins a channel.
(erc-server-NICK): Update query membership via
`erc--ensure-query-member' after someone else changes their nick.
(erc-server-PRIVMSG): After printing a query message from some other
person, remove their nick's data from the query buffer's user table if
they're "untracked," i.e., not a member of a channel.
(erc-server-263, erc-server-263-functions): New function and variable,
a default response handler and hook for "RPL_TRYAGAIN", which servers
send for things like rejecting "WHO" and "WHOX" responses due to rate
limiting.
(erc-server-311): Fix call to `erc-update-user-nick' so the userhost
login component is no longer supplied as the `info' parameter but
rather, correctly, as the `login'.
(erc--extract-352-full-name): Factor out trailing hop-count and GECOS
parsing for use by overriding handlers or those for adjacent numerics.
(erc-server-352): Refactor to handle asterisk as `channel' parameter,
which indicates a nick rather than a channel target.
(erc-server-366): Update membership in all query buffers via
`erc--ensure-query-members' after all names have been received.
(erc-server-401): Forget a known user completely when the server
reports them as nonexistent.
* lisp/erc/erc-common.el (erc--get-server-user): New function, a thin
wrapper around `erc-get-server-user' for cases were inlining would
require declaring symbols not defined in erc-common.
* lisp/erc/erc.el (erc-channel-members): Mention that instances are
used for query-participant tables as well.
(erc--decouple-query-and-channel-membership-p): New variable, a
compatibility flag to access pre-5.6 query bookkeeping behavior.
(erc--ensure-query-member, erc--ensure-query-members): New functions.
(erc-cmd-QUERY): Ensure parties are present in the query buffer's
membership table if they're known to be on the server by simple virtue
of being present in some joined channel.
(erc-message-english-s352-you): New variable.
* test/lisp/erc/erc-scenarios-base-query-participants.el
(erc-scenarios-base-query-participants)
(erc-scenarios-base-query-participants/legacy): Rename former to
latter.  Enable compat flag to activate legacy query behavior in which
channel membership does not impact query membership.
(erc-scenarios-base-query-participants/coupled): New test asserting
new behavior in which channel membership dictates query
membership.  (Bug#70928)
2024-05-27 16:39:18 -07:00
F. Jason Park
75aefe6514 Reuse old query buffers for reassumed nicks in ERC
* lisp/erc/erc-backend.el
(erc--wrangle-query-buffers-on-nick-change): New function for handling
buffer renaming and message routing triggered by a nick change.  Such
twiddling used to reside in `erc-server-NICK' but has been separated
out for use by built-in modules overriding `erc-server-NICK'.  The
behavior has also changed to favor always reusing an existing query
buffer whenever possible instead of creating a new, <N>-suffixed
buffer.  This addresses some arguably unfinished business from
bug#48598.
(erc-server-NICK): Fix erroneous call to `erc-update-user-nick' that
passed the sender's login as the function's INFO argument.  Move
buffer renaming logic to `erc--wrangle-query-buffers-on-nick-change'
for use by "NICK" handlers managed by modules.  Also, print the notice
in all query buffers when the client changes its own nick.
(erc-server-QUIT): Show messages in all query buffers when the client
itself quits, but prevent `track' from updating the mode line with
redundant noise.
* lisp/erc/erc.el (erc-generate-new-buffer-name): Fix typo in doc.
(erc--query-list): New function.
* test/lisp/erc/erc-scenarios-base-query-participants.el: New file.
* test/lisp/erc/erc-scenarios-base-renick.el
(erc-scenarios-base-renick-queries-solo): Revise slightly to use
modern helper API.
(erc-scenarios-base-renick-queries/reassume): New test.
(erc-scenarios-base-renick-self/merge-query): New test.
* test/lisp/erc/resources/base/query-participants/legacy.eld: New file.
* test/lisp/erc/resources/base/reconnect/options-again.eld: Adjust
timeout.
* test/lisp/erc/resources/base/renick/queries/reassume.eld: New file.
* test/lisp/erc/resources/base/renick/self/manual.eld: Update timeouts.
* test/lisp/erc/resources/base/renick/self/merge-query-a.eld: New file.
* test/lisp/erc/resources/base/renick/self/merge-query-b.eld: New file.
(Bug#70928)
2024-05-27 16:39:18 -07:00
F. Jason Park
ab78cbfabc Mention if an ERC module is local in its doc string
* lisp/erc/erc-common.el (erc--assemble-toggle)
(define-erc-module): Update language of doc string to indicate if a
module is local.
* test/lisp/erc/erc-tests.el (define-erc-module--global)
(define-erc-module--local)
(define-erc-module--local/permanent-locals): Update expected output.
2024-05-27 16:39:18 -07:00
F. Jason Park
1b633ea59a Delete original speedbar frame in erc-nickbar-mode
* lisp/erc/erc-speedbar.el (erc-speedbar-buttons): Disable
`erc-nickbar-mode' when it's not displayed in a window.
(erc-speedbar--highlight-self-and-ops): Check `status' slot of
`erc-channel-user' object instead of calling accessors.
(erc-speedbar--hidden-speedbar-frame)
(erc-speedbar--emulate-speedbar): Add doc string.
(erc-speedbar--handle-delete-frame): New function.
(erc-speedbar--toggle-nicknames-sidebar): Remove function because its
conditional logic was needlessly complicated and is no longer needed.
(erc-speedbar--ensure): Create `speedbar-buffer' when needed, and
delete the original frame, but still keep a reference to it in
`erc-speedbar--hidden-speedbar-frame'.  Set
`dframe-delete-frame-function' to own handler.
(erc-speedbar--shutting-down-p): Remove unused variable.
(erc-speedbar--run-timer-on-post-insert)
(erc-speedbar--prod-dframe-timer): Rename former to latter.  Return
nil, and accept any number of args.
(erc-nickbar-mode, erc-nickbar-disable): Tear down completely when
disabling, regardless of universal argument.  This changes user-facing
behavior that was originally introduced with this module as part of
bug#63595.  Run `erc-speedbar--prod-dframe-timer' on
`erc-server-PONG-functions' as well as `erc-insert-post-hook' so that
the panel will eventually update if no messages are being received.
(erc-speedbar--dframe-controlled): Don't make frame visible because
it's been deleted and was never made invisible.
* test/lisp/erc/erc-scenarios-status-sidebar.el
(erc-scenarios-status-sidebar--nickbar): Update assertions.
2024-05-27 16:39:18 -07:00
F. Jason Park
8c54a79ec1 Return nil from more ERC response handlers
* etc/ERC-NEWS: Mention that certain aberrant response handlers now
return nil.
* lisp/erc/erc-backend.el (define-erc-response-handler): Mention that
body should explicitly return nil.
(erc-server-PART)
(erc-server-PING): Return nil.
* lisp/erc/erc-sasl.el (erc-sasl--destroy): Return nil.
* lisp/erc/erc.el (erc-display-message): Mention in doc string that
the return value is undefined.
(erc-kill-channel-hook): Fix package-version.
* test/lisp/erc/erc-networks-tests.el (erc-networks--set-name): Ensure
`erc--route-insertion' returns nil because this influences whether
response-handler hooks continue running.
* test/lisp/erc/erc-sasl-tests.el
(erc-sasl-create-client-ecdsa): Fix regression that made test
unusable, although it's still relatively useless and therefore skipped
by default.
* test/lisp/erc/erc-services-tests.el
(erc-services-tests--auth-source-standard)
(erc-services-tests--auth-source-announced): Clarify annotations.
* test/lisp/erc/erc-tests.el (erc-message): Don't return non-nil in
mocked `erc-display-message'.
(erc-send-modify-hook): Shadow `erc-send-modify-hook' because
`erc-stamp--date-mode' modifies it locally.
2024-05-27 16:39:18 -07:00
F. Jason Park
fee637468b Reconcile erc-stamp--date-stamps when merging buffers
* etc/ERC-NEWS: Mention new face `erc-information'.
* lisp/erc/erc-button.el (erc-button-add-buttons): Skip buttonization
when the "msg prop" `erc--skip' is present and contains the symbol
`button'.  Set `alist' to nil in the same guard condition as a
roundabout way of suppressing further processing.
* lisp/erc/erc-networks.el (erc--insert-admin-message): Forward
declaration.
(erc-networks--insert-transplanted-content)
(erc-networks--transplant-buffer-content): Replace former with latter.
Change signature to take source and destination buffers as parameters.
(erc-networks--transplant-target-buffer-function): New function-valued
variable.
(erc-networks--target-transplant-in-progress-p): New variable, a flag
for downstream code to detect when a transplant is underway.
(erc-networks--reclaim-orphaned-target-buffers): Defer to
`erc-networks--transplant-target-buffer-function' to handle the actual
transplant business.  Crucially, kill the buffer afterwards instead of
beforehand.  If new buffer-association bugs emerge related to the
combining of old or renamed target buffers, this reordering may be at
fault.
(erc-networks--copy-over-server-buffer-contents): Pass old and new
buffers to `erc-networks--insert-transplanted-content'.
* lisp/erc/erc-stamp.el
(erc-stamp--defer-date-insertion-on-post-modify): Set `fn' slot of
`erc-stamp--date' instance to `ignore' when running the actual
callback in order to conserve a little space.
(erc-stamp--date-mode): Add and remove hook members for
`erc-networks--copy-server-buffer-functions' and
`erc-networks--transplant-target-buffer-function'.
(erc-insert-timestamp-left-and-right): Always clear
`erc-timestamp-last-inserted-right' to ensure a right stamp
accompanies every date stamp.
(erc-stamp--dedupe-date-stamps)
(erc-stamp--dedupe-date-stamps-from-buffer)
(erc-stamp--dedupe-date-stamps-from-target-buffer): New functions.
Date stamp behavior was revamped as part of bug#60936.
* lisp/erc/erc.el (erc-informational): New face.
(erc--insert-admin-message): New function to hide some "msg prop"
complexity from "upstream" libraries, like `erc-networks', and thus
avoid more forward-declarations.  A less smelly approach would be to
devise a general interface owned by such libraries, or erc-common,
that `erc-mode' could then hook into on init.
(erc-display-message-highlight): Make face matching more limber to
accommodate the convention of face names lacking a "-face" suffix.
(erc-message-english-graft): New variable.
(erc-kill-channel): Inhibit execution of hook when
`erc-networks--target-transplant-in-progress-p' is non-nil.
* test/lisp/erc/erc-networks-tests.el
(erc-networks--rename-server-buffer--no-existing--orphan)
(erc-networks--rename-server-buffer--existing--reuse)
(erc-networks--rename-server-buffer--local-match)
(erc-networks--rename-server-buffer--local-nomatch): Use helper to
initialize markers.
* test/lisp/erc/erc-stamp-tests.el (erc-stamp--dedupe-date-stamps):
New test.  (Bug#70928)
2024-05-18 15:48:05 -07:00
F. Jason Park
cf7cc4c630 Don't kill server buffer with erc-kill-buffer-on-part
* etc/ERC-NEWS: Mention new flag `erc-killing-buffer-on-part-p' and
the renaming of `erc-kill-channel'.
* lisp/erc/erc-backend.el (erc-server-PART): Only kill a buffer on
behalf of `erc-kill-buffer-on-part' when the buffer hasn't already
been killed, and bind `erc-killing-buffer-on-part-p' to t when doing
so.
* lisp/erc/erc-log.el (erc-conditional-save-buffer): Don't save logs
when the buffer parameter is nil because that causes the server buffer
to be saved out.  It's possible that user code relying on this
longstanding bug will be affected, however, by default, the server
buffer will also be saved out independently at designated junctures.
* lisp/erc/erc.el (erc-part-hook): Redo doc string.
(erc-killing-buffer-on-part-p): New variable, a flag to prevent
redundant execution of `erc-kill-channel-hook' members concerned with
parted channels.
(erc-kill-buffer-on-part): Tweak doc string.
(erc-kill-channel-hook): Use new name for `erc-kill-channel',
`erc-part-channel-on-kill'.
(erc-kill-channel, erc-part-channel-on-kill): Rename former to latter,
and inhibit execution when `erc-killing-buffer-on-part-p' is non-nil.
* test/lisp/erc/erc-scenarios-base-kill-on-part.el: New file.
(Bug#70840)
2024-05-18 15:48:05 -07:00
F. Jason Park
36c68e7e34 Prefer erc--skip property to erc-track--skipped-msgs
* lisp/erc/erc-stamp.el (erc-add-timestamp): Honor an overriding
`erc--ts' "msg prop".
(erc-stamp--defer-date-insertion-on-post-modify): Add `erc--skip'
for the `track' module.
* lisp/erc/erc-track.el (erc-track--skipped-msgs): Remove unused
variable.  Originally added as part of bug#60936.
(erc-track-modified-channels): Rely on the `erc--skip' "msg prop"
instead of the now defunct `erc-track--skipped-msgs' variable for
detecting requests to omit `track' mode-line updates during
`erc-display-message'.
2024-05-08 17:14:02 -07:00
F. Jason Park
d647a52387 Avoid shared-ref read syntax in ERC message catalogs
* lisp/erc/erc.el (erc--message-speaker-ctcp-action-input)
(erc--message-speaker-ctcp-action-statusmsg-input): Don't use
shared/circular references, like #1=foo ... #1#, in literal strings
because it triggers CI validation failures.  These message-format
definitions were originally introduced as part of bug#67677.
2024-05-08 17:13:51 -07:00
F. Jason Park
caddc4e727 Add format-catalog entry for unknown chan mode in ERC
* lisp/erc/erc.el (erc--process-channel-modes): Use format spec
catalog entry, and convert char to string.
(erc-message-english-channel-mode-unknown): New variable.
;; * test/lisp/erc/erc-scenarios-base-renick.el
;; (erc-scenarios-base-renick-queries-solo): Adjust timeout.
;; * test/lisp/erc/erc-scenarios-ignore.el (erc-scenarios-ignore/basic):
;; Adjust timeouts.
;; * test/lisp/erc/erc-scenarios-misc.el (erc-scenarios-base-flood):
;; Adjust timeouts.
;; * test/lisp/erc/resources/base/assoc/bouncer-history/barnet.eld:
;; Adjust timeouts.
;; * test/lisp/erc/resources/base/reuse-buffers/channel/barnet.eld:
;; Adjust timeouts.
;; * test/lisp/erc/resources/erc-d/erc-d-tests.el (erc-d-run-basic):
;; Adjust timeouts.
;; * test/lisp/erc/resources/sasl/plain.eld: Adjust timeouts.
;; * test/lisp/erc/resources/sasl/external.eld: Adjust timeout.
;; * test/lisp/erc/resources/base/auth-source/foonet.eld: Adjust
;; timeout.
2024-05-08 17:11:26 -07:00
F. Jason Park
068e44ed75 ; Set explicit hook depth for erc-once-with-server-event
* lisp/erc/erc.el (erc-once-with-server-event): Set hook depth to -95.
* test/lisp/erc/erc-scenarios-base-association-nick.el: Improve
comment.
* test/lisp/erc/resources/erc-d/erc-d-tests.el
(erc-d--render-entries): Remove do-nothing assertion since its purpose
was unclear and likely dubious, as was incidentally highlighted by the
addition of a function not present on older Emacsen, which this test
still needs to run on.
2024-05-02 19:21:48 -07:00
F. Jason Park
473189ab69 Fix regression involving erc-query-buffer-p
* lisp/erc/erc.el (erc-server-or-unjoined-channel-buffer-p): Doc.
(erc-query-buffer-p): Don't return non-nil in non-ERC buffers and
server buffers, and continue to honor string arguments.  The
regression was introduced by 3d87e343 "Use modern fallback for channel
name detection in ERC".  Thanks to Libera user mekeor for reporting
this bug.
* test/lisp/erc/erc-tests.el (erc-query-buffer-p): New test.
(Bug#67220)
2024-04-19 13:54:52 -07:00
F. Jason Park
6000e48e0d Add erc--skip message property
* lisp/erc/erc-backend.el (erc-server-connect): Add `erc--skip'
property to `erc--msg-prop-overrides' so that timestamps only show up
with the first server-sent message.
(erc-server-PRIVMSG): Move `erc--msg-prop-overrides' declaration to
top-level.
* lisp/erc/erc-button.el (erc-button--display-error-notice-with-keys):
Use `erc--skip' msg prop instead of `erc-stamp--skip' variable.
* lisp/erc/erc-stamp.el (erc-stamp--skip): Remove variable.
(erc-stamp--allow-unmanaged, erc-stamp--allow-unmanaged-p): Rename
former to latter to remain consistent with convention used by other
quasi-internal compatibility-related switches.
(erc-add-timestamp): Check `erc--skip' property instead of deleted
variable `erc-stamp--skip'.
* lisp/erc/erc.el (erc--msg-props): Mention `erc--skip' in doc.
(erc--check-msg-prop): Doc.
(erc--memq-msg-prop): New function.
(erc--ranked-properties): Add `erc--skip'.
* test/lisp/erc/erc-scenarios-stamp.el
(erc-scenarios-stamp--legacy-date-stamps): Revise to expect
"opening connection.." to appear above first stamp.
* test/lisp/erc/erc-tests.el (erc--memq-msg-prop): New test.
(Bug#60936)
2024-04-19 13:54:52 -07:00
F. Jason Park
86184cba21 Don't nest date stamp insertions in erc-stamp
* etc/ERC-NEWS: Don't mention certain insertion-adjacent hooks being
suppressed for date stamps, which is no longer true.
* lisp/erc/erc-common.el (erc--solo): New utility function.
* lisp/erc/erc-fill.el (erc-fill-wrap): Don't move last-message marker
when encountering a date stamp.
* lisp/erc/erc-stamp.el (erc-stamp--recover-on-reconnect): Restore
`erc-stamp--date-stamps' on reconnect and rejoin.
(erc-stamp--insert-date-hook): Fix erroneous doc string.
(erc-stamp--date): New struct type.
(erc-stamp--deferred-date-stamp): New internal variable to pass state
between hook members.
(erc-stamp--date-stamps): New internal variable to store a reference
to all inserted timestamps.
(erc-stamp--propertize-left-date-stamp): Don't hide messages because
this function runs on `erc-insert-modify-hook'.  Prefer doing so
later, in `erc-insert-post-hook'.
(erc-stamp--find-insertion-point): New helper function.
(erc-stamp--insert-date-stamp-as-phony-message): Remove.
(erc-stamp--lr-date-on-pre-modify): Remove function.  Portions of body
now appear in `erc-stamp--defer-date-insertion-on-post-modify'.
(erc-stamp--defer-date-insertion-on-post-modify)
(erc-stamp--defer-date-insertion-on-post-insert)
(erc-stamp--defer-date-insertion-on-post-send): New functions,
although the first incorporates parts of the now defunct
`erc-stamp--lr-date-on-pre-modify'.
(erc-stamp--date-mode): Update hook-member functions.
(erc-stamp-prepend-date-stamps-p): Revise doc.
(erc-insert-timestamp-left-and-right): Remove code to initialize a
date stamp in place through a nested call to `erc-display-message'.
Instead, "pre-render" date stamp and stash it for retrieval by
the function `erc-stamp--defer-date-insertion-on-post-modify'.
(erc-stamp--setup): Kill variables `erc-stamp--deferred-date-stamp'
and `erc-stamp--date-stamps'.
(erc-stamp--reset-on-clear): Remove trimmed stamps from
`erc-stamp--date-stamps'.
* lisp/erc/erc.el (erc--msg-props): Document `erc--hide' in doc
string.
(erc--with-inserted-msg): Remove unused macro.
(erc--insert-line-splice-function): New variable.
(erc--with-spliced-insertion): New macro.
(erc--insert-line-function): Expand doc string.
(erc--remove-from-prop-value-list): Tweak doc string.
(erc--insert-before-markers-transplanting-hidden): New function.
(erc--hide-message): Remember managed `invisible' prop value.  Do so
by recording them in the `erc--hide' "msg prop".
(erc--delete-inserted-message, erc--delete-inserted-message-naively):
Rename former to latter to emphasize that it's largely impractical for
general use.
(erc--ranked-properties): Add `erc--hide'.
* test/lisp/erc/erc-button-tests.el
(erc-button-tests--erc-button-alist--function-as-form): Use
`erc-display-message' helper.
* test/lisp/erc/erc-fill-tests.el (erc-fill-tests--insert-privmsg)
(erc-fill-tests--wrap-populate, erc-fill-wrap-tests--merge-action)
(erc-fill-line-spacing): Use `erc-display-message' wrappers to
intercept `erc-timer-hook' modifications.
* test/lisp/erc/erc-scenarios-match.el
(erc-scenarios-match--invisible-stamp): Add convenience commands to
`extended-command-history' when running interactively.
* test/lisp/erc/erc-tests.el
(erc--insert-before-markers-transplanting-hidden): New test.
(erc--delete-inserted-message, erc--delete-inserted-message-naively):
Update test name as well as namesake function in body.
* test/lisp/erc/resources/erc-scenarios-common.el
(erc-scenarios-common-with-cleanup): Validate `erc-stamp--date-stamps'
members after every scenario test.
(erc-scenarios-common--assert-date-stamps): New function.
* test/lisp/erc/resources/erc-tests-common.el: Require `erc-stamp'
atop file when compiling.
(erc-tests--common-display-message)
(erc-tests-common-display-message)
(erc-tests-common-with-date-aware-display-message): New functions and
macro for running `erc-display-message' while intercepting additions
to `erc-timer-hook' made by date-stamp-related post-insertion hooks.
(erc-tests-common-snapshot-compare): Insert expected output into its
own buffer for easier review during interactive sessions.  This change
is unrelated to the rest of this commit.  (Bug#60936)
2024-04-19 13:54:52 -07:00
F. Jason Park
21b372a57b Improve erc-fill-wrap-merge refilling and movement
* lisp/erc/erc-fill.el (erc-fill--wrap-escape-hidden-speaker): Add
parameter to suppress escaping of hidden prefixes.
(erc-fill--wrap-beginning-of-line): Remember original value of point,
and pass it to `erc-fill--wrap-escape-hidden-speaker'.
(erc-fill--wrap-previous-line, erc-fill--wrap-next-line): Guard call
to `erc-fill--wrap-escape-hidden-speaker' with conditional check for
`erc-fill-wrap-merge'.
(erc-fill--wrap-insert-merged-pre): Add additional text property,
`erc-fill--wrap-merge', to help identify `display' regions servicing
`erc-fill-wrap-merge'.  This should make resolving inconsistencies
easier when "splicing" new messages between existing ones.
(erc-fill-wrap): Add `erc-fill--wrap-merge' text property to merged
speaker region.
(erc-fill--wrap-rejigger-region): Remove assertion disallowing a
non-nil `erc-fill--wrap-rejigger-last-message'.  Instead, adopt the
existing value of that variable when shadowing it for the remaining
extent of the function's execution.  When removing the `display'
property, also look for nonempty replacement text, such as values
specified by the option `erc-fill-wrap-merge-indicator'.
(erc-fill--wrap-merged-button-p): Look for `erc-fill--wrap-merge'
property instead of `display'.
* test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: Update.
* test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: Update.
* test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld: Update.
* test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld:
Update.
* test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld: Update.
(Bug#60936)
2024-04-19 13:54:52 -07:00
F. Jason Park
c572c30fb1 Simplify option erc-merge-wrap-merge-indicator
* lisp/erc/erc-fill.el (erc-fill-wrap-merge-indicator): Reduce
offering of acceptable values by removing leading symbols and ditching
the `post' variant entirely.  The justification for the latter move
hinges on it not being well suited to next-gen requirements involving
the splicing and deletion of inserted messages.  Meeting these would
be overly burdensome and involve scanning the buffer in both
directions for every such operation.  This option is new in ERC 5.6,
which is yet unreleased.
(erc-fill--wrap-massage-legacy-indicator-type): New function to warn
of obsolete `erc-fill-wrap-merge-indicator' value and perform a
migration for the current session.
(erc-fill-wrap, erc-fill-wrap-enable): Preform preflight compat check
for obsolete `erc-fill-wrap-merge-indicator' value types.
(erc-fill-wrap-disable): Don't bother killing nonexistent variable
`erc-fill--wrap-merge-indicator-post'.
(erc-fill--wrap-merge-indicator-post): Remove unused variable.
(erc-fill--wrap-insert-merged-post): Remove unused function.
(erc-fill--wrap-insert-merged-pre): Adapt to simplified format for
option `erc-merge-wrap-merge-indicator'.
(erc-fill-wrap): Remove conditional dispatch because there is only one
path and only one indicator style.
(erc-fill--wrap-rejigger-region): Remove reference to nonexistent
variable `erc-fill--wrap-merge-indicator-post'.
* test/lisp/erc/erc-fill-tests.el
(erc-fill-wrap--merge-action/indicator-pre): Update format of value
for option `erc-fill-wrap-merge-indicator'.
(erc-fill-wrap--merge-action/indicator-post): Remove test focusing on
obsolete and unsupported `post' variant of option
`erc-fill-wrap-merge-indicator'.
(erc-fill--wrap-massage-legacy-indicator-type): New test.
* test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-post-01.eld:
Delete file.  (Bug#60936)
2024-04-19 13:54:52 -07:00
F. Jason Park
ff1d1f6df1 ; Improve erc-services and upgrade documentation
* doc/misc/erc.texi (Getting Help and Reporting Bugs): Describe
alternate method for upgrading from GNU ELPA.  This is a partial
workaround for bug#68660 discovered by ERC contributor Alcor.
* lisp/erc/erc-backend.el (erc-call-hooks): Add comment.
* lisp/erc/erc-services.el (erc-nickserv-alist): Doc.
* test/lisp/erc/erc-scenarios-base-renick.el
(erc-scenarios-base-renick-queries-bouncer): Adjust timeout.
2024-04-19 13:54:52 -07:00
F. Jason Park
ee377aaddf Fix invisible erc-speedbar cursor in text terminals
* lisp/erc/erc-speedbar.el
(erc-speedbar--reset-last-ran-on-timer): Use `with-current-buffer'
instead of `setf' and `buffer-local-value'.
(erc-nickbar-mode, erc-nickbar-enable, erc-nickbar-disable)
(erc-speedbar-toggle-nicknames-window-lock): Revise doc string.
(erc-speedbar-toggle-nicknames-window-lock): Set `cursor-type' in
speedbar buffer.
(erc-nickbar-toggle-nicknames-window-lock): New function alias.  Note
that this name flouts traditional library namespacing conventions.
* lisp/erc/erc-status-sidebar.el (erc-status-sidebar-get-window): Use
`cursor-type' instead of `internal-show-cursor'.  (Bug#63595)
2024-04-07 12:59:21 -07:00
F. Jason Park
e0df2841fb Allow updating of /IGNORE timeouts in ERC
* lisp/erc/erc.el (erc--read-time-period, erc--decode-time-period):
Move body of former, now a superficial wrapper, to latter, a new
function.
(erc--format-time-period): New function.
(erc--get-ignore-timer-args): New function.
(erc--find-ignore-timer): New function to search through `timer-list'
to find matching ignore timer.
(erc-cmd-IGNORE): Refactor and redo doc string.  Add new optional
`timespec' parameter, primarily to aid in testing.  Update an existing
timer instead of always creating one, and display time remaining in
"ignore list" output.  Pass server buffer instead of current buffer to
timer callbacks because `erc--unignore-user' displays its messages in
the `active' buffer, not necessarily the issuing one.  Note that doing
this does discard potentially useful information, so if ever reverting,
we can change the `cl-find' :test in `erc--find-ignore-timer' to
something that compares the `erc-server-process' of both buffers.
;;
;; Something like:
;;
;; (defun erc--ignore-timers-equal-p (a b)
;;   (and (equal (car a) (car b))
;;        (eq (buffer-local-value 'erc-server-process (cadr a))
;;            (buffer-local-value 'erc-server-process (cadr b)))))
;;
(erc-cmd-UNIGNORE): Pass `erc-ignore-list' member matching `user'
parameter to `erc--unignore-user' instead of original, raw parameter,
along with the server buffer.
(erc--unignore-user): Cancel existing timer and don't bother switching
to server buffer since we're already there.
(erc-message-english-ignore-list): New variable.
* test/lisp/erc/erc-scenarios-ignore.el: New file.
* test/lisp/erc/erc-tests.el (erc--read-time-period): New test.
(erc-cmd-UNIGNORE): New test.  (Bug#70127)
2024-04-07 12:59:21 -07:00
F. Jason Park
c1266d355a ; * lisp/erc/erc-nicks.el: Fix typo in Commentary. 2024-04-07 12:59:21 -07:00
F. Jason Park
a46789b56a Reuse command-indicator code for script lines in ERC
* lisp/erc/erc-goodies.el (erc-load-irc-script-lines): Move here from
main file and rework to always use `command-indicator' instead of only
partially, when available.  Also use internal "send-action" and
"send-message" interfaces to defer command-handler output until
command lines have been inserted.
* lisp/erc/erc.el (erc-process-input-line): Redo doc string.
(erc-process-script-line): Fold exceptionally overlong line.
(erc-load-irc-script-lines): Move to erc-goodies.el.  (Bug#67032)
2024-03-23 15:10:32 -07:00
F. Jason Park
b9bd78f78d Restore leading space to right-margin stamps in ERC
* lisp/erc/erc-stamp.el (erc-insert-timestamp-right): Insert a single
space character immediately before right-side stamps managed by
`erc-stamp--display-margin-mode'.  Include it as part of the
`timestamp' field.  This behavior was originally present in an earlier
draft of the changes for bug#60936, mainly to favor symmetry between
hard-wrapped fill styles and fill-wrap with regard to stamps.  It was
subsequently removed to simplify management, so that the `field' and
`display' intervals aligned.
* test/lisp/erc/erc-stamp-tests.el
(erc-stamp--display-margin-mode--right): Update expected output.

; test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-post-01.eld:
; Add space.
; test/lisp/erc/resources/fill/snapshots/merge-wrap-indicator-pre-01.eld:
; Add space.
; test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld: Add space.
; test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld: Add space.
2024-03-23 15:10:32 -07:00
F. Moukayed
525bc08315 Remove mishandled erc-control-default-{fg,bg} faces
Partially revert those portions of 7b4ca9e609 "Leverage inverse-video
for erc-inverse-face" that introduced and managed explicit faces for
the "default" 99 color code.

* lisp/erc/erc-goodies.el (erc-control-default-fg)
(erc-control-default-bg): Remove unused faces originally meant to be
new in ERC 5.6.
(erc-get-fg-color-face, erc-get-bg-color-face): Return nil for n=99.
(erc-controls-interpret, erc-controls-highlight): Preserve an
interval's existing background so "if only the foreground color is
set, the background color stays the same," as explained by
https://modern.ircdocs.horse/formatting#color.  (Bug#69860)

Copyright-paperwork-exempt: yes
2024-03-23 15:10:32 -07:00
Tim Landscheidt
6d1c1fca0a ; Simplify (with-current-buffer (get-buffer ...) ...)
There's no need to call 'get-buffer', since 'with-current-buffer'
does that internally.
* lisp/calendar/todo-mode.el (todo-merge-category):
* lisp/comint.el (comint-dynamic-list-completions):
* lisp/emacs-lisp/checkdoc.el (checkdoc-error):
* lisp/emacs-lisp/debug.el (debug, debugger-record-expression):
* lisp/emacs-lisp/eieio-opt.el (eieio-browse):
* lisp/emacs-lisp/re-builder.el (reb-restart-font-lock):
* lisp/erc/erc-dcc.el (erc-dcc-do-LIST-command):
* lisp/eshell/em-unix.el (eshell-poor-mans-grep):
* lisp/gnus/gnus-group.el (gnus-add-mark):
* lisp/net/eww.el (eww-next-bookmark, eww-previous-bookmark):
* lisp/net/sieve.el (sieve-upload):
* lisp/net/tramp-cmds.el (tramp-cleanup-some-buffers):
* lisp/obsolete/quickurl.el (quickurl-list-populate-buffer):
* lisp/org/ob-calc.el: (org-babel-execute:calc):
* lisp/org/org-agenda.el (org-agenda-use-sticky-p):
* lisp/pcomplete.el (pcomplete-show-completions):
* lisp/progmodes/bug-reference.el
(bug-reference--try-setup-gnus-article):
* lisp/progmodes/idlw-help.el
(idlwave-highlight-linked-completions):
* lisp/progmodes/verilog-mode.el (verilog-preprocess):
* lisp/replace.el (occur-1):
* lisp/term.el (term-dynamic-list-completions):
* lisp/time.el (world-clock-update):
* lisp/url/url-cache.el (url-store-in-cache):
* lisp/vc/vc-cvs.el (vc-cvs-merge, vc-cvs-merge-news):
* lisp/vc/vc-rcs.el (vc-rcs-system-release):
* lisp/vc/vc-svn.el (vc-svn-merge, vc-svn-merge-news):
* test/lisp/calendar/icalendar-tests.el
(icalendar-tests--get-error-string-for-export):
* test/lisp/erc/erc-dcc-tests.el
(pcomplete/erc-mode/DCC--get-1flag)
(pcomplete/erc-mode/DCC--get-2flags)
(pcomplete/erc-mode/DCC--get-2flags-reverse):
* test/lisp/erc/erc-networks-tests.el
(erc-networks--rename-server-buffer--existing--noreuse):
* test/lisp/erc/erc-scenarios-services-misc.el
(erc-scenarios-services-misc--reconnect-retry-nick):
* test/lisp/erc/erc-tests.el (erc--refresh-prompt):
Replace (with-current-buffer (get-buffer ...) ...) with
(with-current-buffer ...).
2024-03-14 12:40:26 +02:00
Po Lu
6b40d557c4 Port more notification senders to non-XDG systems
* doc/lispref/os.texi (Desktop Notifications): Document that
`:timeout' is now implemented.

* java/org/gnu/emacs/EmacsDesktopNotification.java
(EmacsDesktopNotification): New field delay.
(display1): Set delay on Android 8.0 and up.

* lisp/erc/erc-desktop-notifications.el
(erc-notifications-notify): Call Android or Haiku notification
functions on those systems.

* lisp/gnus/gnus-notifications.el (gnus-notifications-action)
(gnus-notification-close): Remove dismissed notifications from
the notification to message map.
(gnus-notifications-notify): Call android-notifications-notify
if possible.

* src/androidselect.c (android_init_emacs_desktop_notification):
Update accordingly.
(android_notifications_notify_1): New argument TIMEOUT.
(Fandroid_notifications_notify): New argument QCtimeout.
(syms_of_androidselect) <QCtimeout>: New symbol.
2024-03-13 11:01:39 +08:00