emacs/lisp/erc
F. Jason Park 3c9cba9df3 Don't inherit properties when refreshing ERC's prompt
* lisp/erc/erc.el (erc--merge-prop-behind-p): New variable to be
dynamically bound around rare calls to `erc--merge-props' when the
latter should append to the end of existing list-valued text
properties.
(erc--inhibit-prompt-display-property-p): New variable to be non-nil
in buffers where an active module needs to reserve all uses of the
`display' text property in the prompt region for itself.
(erc--prompt-properties): Collect all common prompt properties in one
place for code reuse and maintenance purposes.
(erc--refresh-prompt-continue, erc--refresh-prompt-continue-request):
New function and state variable for custom `erc-prompt' functions to
indicate to ERC that they need the prompt to be refreshed in all
buffers and not just the current one.
(erc--refresh-prompt): Merge `erc-prompt-face' behind any applied by a
customized `erc-prompt' function value.  Crucially, don't inherit
properties at the beginning of the prompt because doing so may clobber
any added by a custom `erc-prompt' function.  Instead, apply known
properties from `erc-display-prompt' manually.  Integrate
`erc--refresh-prompt-continue' logic.
(erc--merge-prop): Recognize flag to activate `append' behavior in
which new prop values are appended to the tail of existing ones rather
than consed in front.  This functionality could be extended to
arbitrary splices as well.
(erc-display-prompt): Use common text properties defined elsewhere.
* test/lisp/erc/erc-tests.el (erc--merge-prop): Add assertion for
`erc--merge-prop-behind-p' non-nil behavior.  (Bug#51082)
2023-11-24 13:38:52 -08:00
..
ChangeLog.1 ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
ChangeLog.2 ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-autoaway.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-backend.el Favor ISUPPORT params for MODE processing in ERC 2023-11-18 12:34:56 -08:00
erc-button.el ; Prepare for ERC 5.6 release 2023-11-12 20:37:49 -08:00
erc-capab.el Don't associate ERC modules with undefined groups 2023-04-08 14:23:51 -07:00
erc-common.el Cache UI string for channel modes in ERC 2023-11-24 13:38:52 -08:00
erc-compat.el Prefer ticks/hz pairs for some ERC timestamps on 29+ 2023-10-02 17:31:28 -07:00
erc-dcc.el Fix command-line parsing regression in erc-cmd-DCC 2023-07-13 18:45:31 -07:00
erc-desktop-notifications.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-ezbounce.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-fill.el ; Prepare for ERC 5.6 release 2023-11-12 20:37:49 -08:00
erc-goodies.el ; Prepare for ERC 5.6 release 2023-11-12 20:37:49 -08:00
erc-ibuffer.el Fix wrong "User" column count in erc-ibuffer 2023-10-02 17:23:29 -07:00
erc-identd.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-imenu.el Define missing groups for ERC modules 2023-06-11 20:53:48 -07:00
erc-join.el Allow custom display-buffer actions in ERC 2023-07-13 18:45:31 -07:00
erc-lang.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-list.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-log.el Rename erc-server-buffer-p 2023-10-20 15:22:56 -07:00
erc-match.el Revive erc-command-indicator as new module 2023-11-12 20:37:49 -08:00
erc-menu.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-netsplit.el ; Silence byte compiler in erc-netsplit-JOIN 2023-05-21 18:59:33 -07:00
erc-networks.el ; Prepare for ERC 5.6 release 2023-11-12 20:37:49 -08:00
erc-nicks.el ; Prepare for ERC 5.6 release 2023-11-12 20:37:49 -08:00
erc-notify.el Rename erc-server-buffer-p 2023-10-20 15:22:56 -07:00
erc-page.el Don't require erc-goodies in erc.el 2023-04-08 14:23:51 -07:00
erc-pcomplete.el Leverage loaddefs for migrating ERC modules 2023-04-08 14:23:50 -07:00
erc-replace.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc-ring.el Preprocess prompt input linewise in ERC 2023-05-05 17:18:01 -07:00
erc-sasl.el Add helper for restoring local session vars in ERC 2023-05-13 07:05:22 -07:00
erc-services.el Redo erc-nickname-in-use-functions as a local module 2023-07-01 07:21:30 -07:00
erc-sound.el Define missing groups for ERC modules 2023-06-11 20:53:48 -07:00
erc-speedbar.el Fix speedbar help-echo in erc-nickbar-mode 2023-11-24 13:38:52 -08:00
erc-spelling.el Define missing groups for ERC modules 2023-06-11 20:53:48 -07:00
erc-stamp.el ; Prepare for ERC 5.6 release 2023-11-12 20:37:49 -08:00
erc-status-sidebar.el ; Prepare for ERC 5.6 release 2023-11-12 20:37:49 -08:00
erc-track.el Ignore date stamps completely in erc-track 2023-10-27 13:08:44 -07:00
erc-truncate.el Manage some text props for ERC insertion-hook members 2023-10-13 07:47:01 -07:00
erc-xdcc.el ; Add 2023 to copyright years. 2023-01-01 05:31:12 -05:00
erc.el Don't inherit properties when refreshing ERC's prompt 2023-11-24 13:38:52 -08:00