diff options
| author | F. Jason Park | 2023-11-18 23:04:50 -0800 |
|---|---|---|
| committer | F. Jason Park | 2023-11-24 13:38:52 -0800 |
| commit | 3c9cba9df3d392a89314e06a6396c4157065f3b0 (patch) | |
| tree | dd7adccbc70444883197ad8859968309199b7a59 /java | |
| parent | 4064985b807e00432775543798180e7b81eb5ea9 (diff) | |
| download | emacs-3c9cba9df3d392a89314e06a6396c4157065f3b0.tar.gz emacs-3c9cba9df3d392a89314e06a6396c4157065f3b0.zip | |
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)
Diffstat (limited to 'java')
0 files changed, 0 insertions, 0 deletions