emacs/lisp/erc/erc-goodies.el

1057 lines
43 KiB
EmacsLisp
Raw Normal View History

;;; erc-goodies.el --- Collection of ERC modules -*- lexical-binding: t; -*-
2023-01-01 05:31:12 -05:00
;; Copyright (C) 2001-2023 Free Software Foundation, Inc.
;; Author: Jorgen Schaefer <forcer@forcix.cx>
;; Maintainer: Amin Bandali <bandali@gnu.org>, F. Jason Park <jp@neverwas.me>
;; Most code is taken verbatim from erc.el, see there for the original
;; authors.
;; This file is part of GNU Emacs.
;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>.
;;; Commentary:
;; This provides some small but still useful modes for ERC.
;;; Code:
Support local ERC modules in erc-mode buffers * doc/misc/erc.texi: Mention local modules in Modules chapter. * etc/ERC-NEWS: Mention changes to `erc-update-modules'. * lisp/erc/erc.el (erc-migrate-modules): Add some missing mappings. (erc-modules): When a user removes a module, disable it and kill its local variable in all ERC buffers. (erc-update-modules): Move body of `erc-update-modules' to new internal function. (erc--update-modules): Add new function, a renamed and slightly modified version of `erc-update-modules'. Specifically, change return value from nil to a list of minor-mode commands for local modules. Use `custom-variable-p' to detect flavor. (erc--merge-local-modes): Add helper for finding local modules already active as minor modes in an ERC buffer. (erc-open): Replace `erc-update-modules' with `erc--update-modules'. Defer enabling of local modules via `erc--update-modules' until after buffer is initialized with other local vars. Also defer major-mode hooks so they can detect things like whether the buffer is a server or target buffer. Also ensure local module setup code can detect when `erc-open' was called with a non-nil `erc--server-reconnecting'. * lisp/erc/erc-common.el (erc--module-name-migrations, erc--features-to-modules, erc--modules-to-features): Add alists of old-to-new module names to support module-name migrations. (erc--assemble-toggle): Add new helper for constructing mode toggles, like `erc-sasl-enable'. (define-erc-modules): Defer to `erc--assemble-toggle' to create toggle commands. (erc--normalize-module-symbol): Add helper for `erc-migrate-modules'. * lisp/erc/erc-goodies.el: Require cl-lib. * test/lisp/erc/erc-tests.el (erc-migrate-modules, erc--update-modules): Add rudimentary unit tests asserting correct module-name mappings. (erc--merge-local-modes): Add test for helper. (define-erc-module--global, define-erc-module--local): Add tests asserting module-creation macro. (Bug#57955.)
2021-07-12 03:44:28 -07:00
(eval-when-compile (require 'cl-lib))
(require 'erc)
Move ERC's core dependencies to separate file Asking people to order require's is about as effective as asking kids to keep off the grass. * lisp/erc/erc-backend.el (erc--target, erc-auto-query, erc-channel-list, erc-channel-users, erc-default-nicks, erc-default-recipients, erc-format-nick-function, erc-format-query-as-channel-p, erc-hide-prompt, erc-input-marker, erc-insert-marker, erc-invitation, erc-join-buffer, erc-kill-buffer-on-part, erc-kill-server-buffer-on-quit, erc-log-p, erc-minibuffer-ignored, erc-networks--id, erc-nick, erc-nick-change-attempt-count, erc-prompt-for-channel-key, erc-prompt-hidden, erc-reuse-buffers, erc-verbose-server-ping, erc-whowas-on-nosuchnick): Forward-declare variables. (erc--open-target, erc--target-from-string, erc-active-buffer, erc-add-default-channel, erc-banlist-update, erc-buffer-filter, erc-buffer-list-with-nick, erc-channel-begin-receiving-names, erc-channel-end-receiving-names, erc-channel-p, erc-channel-receive-names, erc-cmd-JOIN, erc-connection-established, erc-current-nick, erc-current-nick-p, erc-current-time, erc-default-target, erc-delete-default-channel, erc-display-error-notice, erc-display-server-message, erc-emacs-time-to-erc-time, erc-format-message, erc-format-privmessage, erc-get-buffer, erc-handle-login, erc-handle-user-status-change, erc-ignored-reply-p, erc-ignored-user-p, erc-is-message-ctcp-and-not-action-p, erc-is-message-ctcp-p, erc-log-irc-protocol, erc-login, erc-make-notice, erc-network, erc-networks--id-given, erc-networks--id-reload, erc-nickname-in-use, erc-parse-user, erc-process-away, erc-process-ctcp-query, erc-query-buffer-p, erc-remove-channel-member, erc-remove-channel-users, erc-remove-user, erc-sec-to-time, erc-server-buffer, erc-set-active-buffer, erc-set-current-nick, erc-set-modes, erc-time-diff, erc-trim-string, erc-update-mode-line, erc-update-mode-line-buffer, erc-wash-quit-reason, erc-display-message, erc-get-buffer-create, erc-process-ctcp-reply, erc-update-channel-topic, erc-update-modes, erc-update-user-nick, erc-open, erc-update-channel-member): Forward-declare functions. (erc-response): Move to lisp/erc/erc-common.el. (erc-compat--with-memoization): Use "erc-compat-" prefixed macro. * lisp/erc/erc-common.el: New file. Change indentation for `erc-with-all-buffers-of-server' from 1 to 2. * lisp/erc/erc-compat.el (erc-compat--with-memoization): Migrate macro from `erc-backend' and rename. * lisp/erc/erc-goodies.el: Require `erc-common' instead of `erc'. (erc-controls-highlight-regexp, erc-controls-remove-regexp, erc-input-marker, erc-insert-marker, erc-server-process, erc-modules, erc-log-p): Forward declare variables. (erc-buffer-list, erc-error, erc-extract-command-from-line): Forward-declare functions. * lisp/erc/erc-networks.el (erc--target, erc-insert-marker, erc-kill-buffer-hook, erc-kill-server-hook, erc-modules, erc-rename-buffers, erc-reuse-buffers, erc-server-announced-name, erc-server-connected, erc-server-parameters, erc-server-process, erc-session-server): Forward declare variables. (erc--default-target, erc--get-isupport-entry, erc-buffer-filter, erc-current-nick, erc-display-error-notice, erc-error, erc-get-buffer, erc-server-buffer, erc-server-process-alive): Forward-declare functions. (erc-obsolete-var): Also suppress free-variable warnings. * lisp/erc/erc.el: Require `erc-networks', `erc-goodies', and `erc-backend' at top of file. Don't require `erc-compat'. (erc--server-last-reconnect-count, erc--server-reconnecting, erc-channel-members-changed-hook, erc-network, erc-networks--id, erc-server-367-functions, erc-server-announced-name, erc-server-connect-function, erc-server-connected, erc-server-current-nick, erc-server-lag, erc-server-last-sent-time, erc-server-process, erc-server-quitting, erc-server-reconnect-count, erc-server-reconnecting, erc-session-client-certificate, erc-session-connector, erc-session-port, erc-session-server, erc-session-user-full-name) Remove superfluous forward declarations. (erc-message-parsed, tabbar--local-hlf, motif-version-string): Relocate forward declares to central location. (erc-session-password): Move to `erc-backend'. (erc-downcase, erc-with-server-buffer, erc-server-user, erc-channel-user, erc-get-channel-user, erc-get-server-user): Move to lisp/erc/erc-common.el. (erc-add-server-user, erc-remove-server-user, erc-channel-user-owner-p, erc-channel-user-admin-p, erc-channel-user-op-p, erc-channel-user-halfop-p, erc-channel-user-voice-p): Convert from inline functions to normal functions. (define-erc-module, erc--target, erc--target-channel, erc--target-channel-local, erc-log, erc-log-aux, erc-with-buffer, erc-with-all-buffers-of-server): Move to lisp/erc/erc-common.el. (erc-channel-members-changed-hook): Relocate option to avoid compiler warning. (erc-input, erc--input-split): Move to lisp/erc/erc-common.el. (erc-controls-strip): Remove forward declaration temporarily until this file stops requiring `erc-goodies'. * test/lisp/erc/erc-networks-tests.el: Require `erc' instead of `erc-networks'. * test/lisp/erc/erc.el (erc--meta--backend-dependencies): Remove obsolete test. Don't require `erc-networks'. Bug#56340.
2022-07-01 11:06:51 -04:00
(declare-function fringe-columns "fringe" (side &optional real))
(declare-function pulse-available-p "pulse" nil)
(declare-function pulse-momentary-highlight-overlay "pulse" (o &optional face))
;;; Automatically scroll to bottom
(defcustom erc-input-line-position nil
"Specify where to position the input line when using `erc-scroll-to-bottom'.
This should be an integer specifying the line of the buffer on which
the input line should stay. A value of \"-1\" would keep the input
line positioned on the last line in the buffer. This is passed as an
Skip post-minibuffer restore in erc-scrolltobottom-all * etc/ERC-NEWS: Remove mention of `erc-scrolltobottom-relaxed' in entry for module `scrolltobottom'. * lisp/erc/erc-goodies.el (erc-input-line-position): Fix mention of abandoned option `erc-scrolltobottom-relaxed'. (erc-scrolltobottom-all): Subsume option `erc-scrolltobottom-relaxed' by recognizing a third value state, `relaxed'. A separate option would make more sense if other options also depended on `erc-scrolltobottom-all'. (erc-scrolltobottom-relaxed): Remove redundant option, which was to be new in ERC 5.6. (erc-scrolltobottom-enable, erc-scrolltobottom-mode): Warn if user attempts to enable `erc-scrolltobottom-all' on Emacs 27, which is not supported. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): Remove unused variables. (erc--scrolltobottom-on-pre-command, erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): Remove unused functions. (erc--scrolltobottom-on-post-command): Remove conditional branch for dealing with a non-nil `erc--scrolltobottom-window-info'. (erc--scrolltobottom-setup): Convert from generic to normal function and remove setup and teardown for unused hooks. Set variable `read-minibuffer-restore-windows' locally when option `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-on-pre-insert): Replace reference to subsumed option `erc-scrolltobottom-relaxed' with new value `relaxed' for existing option `erc-scrolltobottom-all'. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el (erc-scenarios-scrolltobottom--relaxed): Replace option `erc-scrolltobottom-relaxed' with new value `relaxed' for `erc-scrolltobottom-all'. (Bug#64855)
2023-10-10 18:14:53 -07:00
argument to `recenter', unless `erc-scrolltobottom-all' is
`relaxed', in which case, ERC interprets it as additional lines
to scroll down by per message insertion (minus one for the
prompt)."
:group 'erc-display
:type '(choice integer (const nil)))
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
(defcustom erc-scrolltobottom-all nil
"Whether to scroll all windows or just the selected one.
ERC expects this option to be configured before module
Skip post-minibuffer restore in erc-scrolltobottom-all * etc/ERC-NEWS: Remove mention of `erc-scrolltobottom-relaxed' in entry for module `scrolltobottom'. * lisp/erc/erc-goodies.el (erc-input-line-position): Fix mention of abandoned option `erc-scrolltobottom-relaxed'. (erc-scrolltobottom-all): Subsume option `erc-scrolltobottom-relaxed' by recognizing a third value state, `relaxed'. A separate option would make more sense if other options also depended on `erc-scrolltobottom-all'. (erc-scrolltobottom-relaxed): Remove redundant option, which was to be new in ERC 5.6. (erc-scrolltobottom-enable, erc-scrolltobottom-mode): Warn if user attempts to enable `erc-scrolltobottom-all' on Emacs 27, which is not supported. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): Remove unused variables. (erc--scrolltobottom-on-pre-command, erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): Remove unused functions. (erc--scrolltobottom-on-post-command): Remove conditional branch for dealing with a non-nil `erc--scrolltobottom-window-info'. (erc--scrolltobottom-setup): Convert from generic to normal function and remove setup and teardown for unused hooks. Set variable `read-minibuffer-restore-windows' locally when option `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-on-pre-insert): Replace reference to subsumed option `erc-scrolltobottom-relaxed' with new value `relaxed' for existing option `erc-scrolltobottom-all'. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el (erc-scenarios-scrolltobottom--relaxed): Replace option `erc-scrolltobottom-relaxed' with new value `relaxed' for `erc-scrolltobottom-all'. (Bug#64855)
2023-10-10 18:14:53 -07:00
initialization. A value of nil preserves pre-5.6 behavior, in
which scrolling only affects the selected window. A value of t
means ERC attempts to recenter all visible windows whose point
resides in the input area.
A value of `relaxed' tells ERC to forgo forcing prompt to the
bottom of the window. When point is at the prompt, ERC scrolls
the window up when inserting messages, making the prompt appear
stationary. Users who find this effect too \"stagnant\" can
adjust the option `erc-input-line-position', borrowed here to
express a scroll step offset. Setting that value to zero lets
the prompt drift toward the bottom by one line per message, which
is generally slow enough not to distract while composing input.
Of course, this doesn't apply when receiving a large influx of
messages, such as after typing \"/msg NickServ help\".
Note that users should consider this option's non-nil behavior to
be experimental. It currently only works with Emacs 28+."
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
:group 'erc-display
:package-version '(ERC . "5.6") ; FIXME sync on release
Skip post-minibuffer restore in erc-scrolltobottom-all * etc/ERC-NEWS: Remove mention of `erc-scrolltobottom-relaxed' in entry for module `scrolltobottom'. * lisp/erc/erc-goodies.el (erc-input-line-position): Fix mention of abandoned option `erc-scrolltobottom-relaxed'. (erc-scrolltobottom-all): Subsume option `erc-scrolltobottom-relaxed' by recognizing a third value state, `relaxed'. A separate option would make more sense if other options also depended on `erc-scrolltobottom-all'. (erc-scrolltobottom-relaxed): Remove redundant option, which was to be new in ERC 5.6. (erc-scrolltobottom-enable, erc-scrolltobottom-mode): Warn if user attempts to enable `erc-scrolltobottom-all' on Emacs 27, which is not supported. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): Remove unused variables. (erc--scrolltobottom-on-pre-command, erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): Remove unused functions. (erc--scrolltobottom-on-post-command): Remove conditional branch for dealing with a non-nil `erc--scrolltobottom-window-info'. (erc--scrolltobottom-setup): Convert from generic to normal function and remove setup and teardown for unused hooks. Set variable `read-minibuffer-restore-windows' locally when option `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-on-pre-insert): Replace reference to subsumed option `erc-scrolltobottom-relaxed' with new value `relaxed' for existing option `erc-scrolltobottom-all'. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el (erc-scenarios-scrolltobottom--relaxed): Replace option `erc-scrolltobottom-relaxed' with new value `relaxed' for `erc-scrolltobottom-all'. (Bug#64855)
2023-10-10 18:14:53 -07:00
:type '(choice boolean (const relaxed)))
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
;;;###autoload(autoload 'erc-scrolltobottom-mode "erc-goodies" nil t)
(define-erc-module scrolltobottom nil
"This mode causes the prompt to stay at the end of the window."
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
((add-hook 'erc-mode-hook #'erc--scrolltobottom-setup)
Skip post-minibuffer restore in erc-scrolltobottom-all * etc/ERC-NEWS: Remove mention of `erc-scrolltobottom-relaxed' in entry for module `scrolltobottom'. * lisp/erc/erc-goodies.el (erc-input-line-position): Fix mention of abandoned option `erc-scrolltobottom-relaxed'. (erc-scrolltobottom-all): Subsume option `erc-scrolltobottom-relaxed' by recognizing a third value state, `relaxed'. A separate option would make more sense if other options also depended on `erc-scrolltobottom-all'. (erc-scrolltobottom-relaxed): Remove redundant option, which was to be new in ERC 5.6. (erc-scrolltobottom-enable, erc-scrolltobottom-mode): Warn if user attempts to enable `erc-scrolltobottom-all' on Emacs 27, which is not supported. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): Remove unused variables. (erc--scrolltobottom-on-pre-command, erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): Remove unused functions. (erc--scrolltobottom-on-post-command): Remove conditional branch for dealing with a non-nil `erc--scrolltobottom-window-info'. (erc--scrolltobottom-setup): Convert from generic to normal function and remove setup and teardown for unused hooks. Set variable `read-minibuffer-restore-windows' locally when option `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-on-pre-insert): Replace reference to subsumed option `erc-scrolltobottom-relaxed' with new value `relaxed' for existing option `erc-scrolltobottom-all'. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el (erc-scenarios-scrolltobottom--relaxed): Replace option `erc-scrolltobottom-relaxed' with new value `relaxed' for `erc-scrolltobottom-all'. (Bug#64855)
2023-10-10 18:14:53 -07:00
(when (and erc-scrolltobottom-all (< emacs-major-version 28))
(erc-button--display-error-notice-with-keys
"Option `erc-scrolltobottom-all' requires Emacs 28+. Disabling.")
(setopt erc-scrolltobottom-all nil))
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
(unless erc--updating-modules-p (erc-buffer-do #'erc--scrolltobottom-setup))
(if erc-scrolltobottom-all
(progn
(add-hook 'erc-insert-pre-hook #'erc--scrolltobottom-on-pre-insert 25)
(add-hook 'erc-pre-send-functions #'erc--scrolltobottom-on-pre-insert)
(add-hook 'erc-insert-done-hook #'erc--scrolltobottom-all)
(add-hook 'erc-send-completed-hook #'erc--scrolltobottom-all))
(add-hook 'erc-insert-done-hook #'erc-possibly-scroll-to-bottom)))
((remove-hook 'erc-mode-hook #'erc--scrolltobottom-setup)
(erc-buffer-do #'erc--scrolltobottom-setup)
Skip post-minibuffer restore in erc-scrolltobottom-all * etc/ERC-NEWS: Remove mention of `erc-scrolltobottom-relaxed' in entry for module `scrolltobottom'. * lisp/erc/erc-goodies.el (erc-input-line-position): Fix mention of abandoned option `erc-scrolltobottom-relaxed'. (erc-scrolltobottom-all): Subsume option `erc-scrolltobottom-relaxed' by recognizing a third value state, `relaxed'. A separate option would make more sense if other options also depended on `erc-scrolltobottom-all'. (erc-scrolltobottom-relaxed): Remove redundant option, which was to be new in ERC 5.6. (erc-scrolltobottom-enable, erc-scrolltobottom-mode): Warn if user attempts to enable `erc-scrolltobottom-all' on Emacs 27, which is not supported. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): Remove unused variables. (erc--scrolltobottom-on-pre-command, erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): Remove unused functions. (erc--scrolltobottom-on-post-command): Remove conditional branch for dealing with a non-nil `erc--scrolltobottom-window-info'. (erc--scrolltobottom-setup): Convert from generic to normal function and remove setup and teardown for unused hooks. Set variable `read-minibuffer-restore-windows' locally when option `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-on-pre-insert): Replace reference to subsumed option `erc-scrolltobottom-relaxed' with new value `relaxed' for existing option `erc-scrolltobottom-all'. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el (erc-scenarios-scrolltobottom--relaxed): Replace option `erc-scrolltobottom-relaxed' with new value `relaxed' for `erc-scrolltobottom-all'. (Bug#64855)
2023-10-10 18:14:53 -07:00
(remove-hook 'erc-insert-pre-hook #'erc--scrolltobottom-on-pre-insert)
(remove-hook 'erc-send-completed-hook #'erc--scrolltobottom-all)
(remove-hook 'erc-insert-done-hook #'erc--scrolltobottom-all)
(remove-hook 'erc-pre-send-functions #'erc--scrolltobottom-on-pre-insert)
(remove-hook 'erc-insert-done-hook #'erc-possibly-scroll-to-bottom)))
(defun erc-possibly-scroll-to-bottom ()
"Like `erc-add-scroll-to-bottom', but only if window is selected."
(when (eq (selected-window) (get-buffer-window))
(erc-scroll-to-bottom)))
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
(defvar-local erc--scrolltobottom-window-info nil
"Alist with windows as keys and lists of window-related info as values.
Values are lists containing the last window start position and
the last \"window line\" of point. The \"window line\", which
may be nil, is the number of lines between `window-start' and
`window-point', inclusive.")
Skip post-minibuffer restore in erc-scrolltobottom-all * etc/ERC-NEWS: Remove mention of `erc-scrolltobottom-relaxed' in entry for module `scrolltobottom'. * lisp/erc/erc-goodies.el (erc-input-line-position): Fix mention of abandoned option `erc-scrolltobottom-relaxed'. (erc-scrolltobottom-all): Subsume option `erc-scrolltobottom-relaxed' by recognizing a third value state, `relaxed'. A separate option would make more sense if other options also depended on `erc-scrolltobottom-all'. (erc-scrolltobottom-relaxed): Remove redundant option, which was to be new in ERC 5.6. (erc-scrolltobottom-enable, erc-scrolltobottom-mode): Warn if user attempts to enable `erc-scrolltobottom-all' on Emacs 27, which is not supported. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): Remove unused variables. (erc--scrolltobottom-on-pre-command, erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): Remove unused functions. (erc--scrolltobottom-on-post-command): Remove conditional branch for dealing with a non-nil `erc--scrolltobottom-window-info'. (erc--scrolltobottom-setup): Convert from generic to normal function and remove setup and teardown for unused hooks. Set variable `read-minibuffer-restore-windows' locally when option `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-on-pre-insert): Replace reference to subsumed option `erc-scrolltobottom-relaxed' with new value `relaxed' for existing option `erc-scrolltobottom-all'. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el (erc-scenarios-scrolltobottom--relaxed): Replace option `erc-scrolltobottom-relaxed' with new value `relaxed' for `erc-scrolltobottom-all'. (Bug#64855)
2023-10-10 18:14:53 -07:00
;; FIXME treat `end-of-buffer' specially and always recenter -1.
;; FIXME make this work when `erc-scrolltobottom-all' is set to
;; `relaxed'.
(defvar erc--scrolltobottom-post-ignore-commands '(text-scale-adjust)
"Commands to skip instead of force-scroll on `post-command-hook'.")
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
(defun erc--scrolltobottom-on-post-command ()
"Scroll selected window unless `this-command' is exempted."
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
(when (eq (selected-window) (get-buffer-window))
Skip post-minibuffer restore in erc-scrolltobottom-all * etc/ERC-NEWS: Remove mention of `erc-scrolltobottom-relaxed' in entry for module `scrolltobottom'. * lisp/erc/erc-goodies.el (erc-input-line-position): Fix mention of abandoned option `erc-scrolltobottom-relaxed'. (erc-scrolltobottom-all): Subsume option `erc-scrolltobottom-relaxed' by recognizing a third value state, `relaxed'. A separate option would make more sense if other options also depended on `erc-scrolltobottom-all'. (erc-scrolltobottom-relaxed): Remove redundant option, which was to be new in ERC 5.6. (erc-scrolltobottom-enable, erc-scrolltobottom-mode): Warn if user attempts to enable `erc-scrolltobottom-all' on Emacs 27, which is not supported. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): Remove unused variables. (erc--scrolltobottom-on-pre-command, erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): Remove unused functions. (erc--scrolltobottom-on-post-command): Remove conditional branch for dealing with a non-nil `erc--scrolltobottom-window-info'. (erc--scrolltobottom-setup): Convert from generic to normal function and remove setup and teardown for unused hooks. Set variable `read-minibuffer-restore-windows' locally when option `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-on-pre-insert): Replace reference to subsumed option `erc-scrolltobottom-relaxed' with new value `relaxed' for existing option `erc-scrolltobottom-all'. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el (erc-scenarios-scrolltobottom--relaxed): Replace option `erc-scrolltobottom-relaxed' with new value `relaxed' for `erc-scrolltobottom-all'. (Bug#64855)
2023-10-10 18:14:53 -07:00
(unless (memq this-command erc--scrolltobottom-post-ignore-commands)
(setq erc--scrolltobottom-window-info nil)
(erc--scrolltobottom-confirm))))
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
;; It may be desirable to also restore the relative line position of
;; window point after changing dimensions. Perhaps stashing the
;; previous ratio of window line to body height and later recentering
;; proportionally would achieve this.
(defun erc--scrolltobottom-on-win-conf-change ()
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
"Scroll window to bottom when at prompt and using the minibuffer."
(setq erc--scrolltobottom-window-info nil)
(erc--scrolltobottom-confirm))
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
(defun erc--scrolltobottom-all (&rest _)
"Maybe put prompt on last line in all windows displaying current buffer.
Expect to run when narrowing is in effect, such as on insertion
or send-related hooks. When recentering has not been performed,
attempt to restore last `window-start', if known."
(dolist (window (get-buffer-window-list nil nil 'visible))
(with-selected-window window
(when-let
((erc--scrolltobottom-window-info)
(found (assq window erc--scrolltobottom-window-info))
((not (erc--scrolltobottom-confirm (nth 2 found)))))
(set-window-start window (cadr found) 'no-force))))
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
;; Necessary unless we're sure `erc--scrolltobottom-on-pre-insert'
;; always runs between calls to this function.
(setq erc--scrolltobottom-window-info nil))
(defun erc-add-scroll-to-bottom ()
"A hook function for `erc-mode-hook' to recenter output at bottom of window.
If you find that ERC hangs when using this function, try customizing
the value of `erc-input-line-position'.
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
Note that the prior suggestion comes from a time when this
function used `window-scroll-functions', which was replaced by
`post-command-hook' in ERC 5.3."
(declare (obsolete erc--scrolltobottom-setup "30.1"))
lisp/erc: Use lexical-binding Also remove various redundant `:group` arguments. * lisp/erc/erc-backend.el (define-erc-response-handler): Move `declare` after the docstring. * lisp/erc/erc-capab.el: Use lexical-binding. (erc-capab-identify-activate): Simplify with `member`. * lisp/erc/erc-dcc.el (erc-dcc): Move before erc-dcc-mode definition, which refers to it. (erc-dcc-chat-accept): Remove unused vars `nick` and `buffer`. * lisp/erc/erc-imenu.el: Use lexical-binding. (erc-create-imenu-index): Remove unused var `prev-pos`. * lisp/erc/erc-match.el: Use lexical-binding. (erc-match-message): Remove unused var `old-pt`. (erc-match-message): Strength-reduce `eval` to `symbol-value`. * lisp/erc/erc-page.el: Use lexical-binding. (erc-page): Move Custom group before `erg-page-mode` which refers to it. * lisp/erc/erc-replace.el: Use lexical-binding. (erc-replace-insert): Use `functionp`. * lisp/erc/erc-status-sidebar.el: Use lexical-binding. (erc-status-sidebar-open): Remove unused var `sidebar-window`. * lisp/erc/erc.el: Fix header to use the customary 3 semi-colons. (erc-fill-column): Declare variable. * lisp/erc/erc-autoaway.el: Use lexical-binding. * lisp/erc/erc-ezbounce.el: Use lexical-binding. * lisp/erc/erc-fill.el: Use lexical-binding. * lisp/erc/erc-goodies.el: Use lexical-binding. * lisp/erc/erc-ibuffer.el: Use lexical-binding. * lisp/erc/erc-identd.el: Use lexical-binding. * lisp/erc/erc-join.el: Use lexical-binding. * lisp/erc/erc-lang.el: Use lexical-binding. * lisp/erc/erc-log.el: Use lexical-binding. * lisp/erc/erc-menu.el: Use lexical-binding. * lisp/erc/erc-netsplit.el: Use lexical-binding. * lisp/erc/erc-networks.el: Use lexical-binding. * lisp/erc/erc-pcomplete.el: Use lexical-binding. * lisp/erc/erc-ring.el: Use lexical-binding. * lisp/erc/erc-speedbar.el: Use lexical-binding. * lisp/erc/erc-spelling.el: Use lexical-binding. * lisp/erc/erc-truncate.el: Use lexical-binding. * lisp/erc/erc-xdcc.el: Use lexical-binding.
2021-03-18 23:14:33 -04:00
(add-hook 'post-command-hook #'erc-scroll-to-bottom nil t))
Skip post-minibuffer restore in erc-scrolltobottom-all * etc/ERC-NEWS: Remove mention of `erc-scrolltobottom-relaxed' in entry for module `scrolltobottom'. * lisp/erc/erc-goodies.el (erc-input-line-position): Fix mention of abandoned option `erc-scrolltobottom-relaxed'. (erc-scrolltobottom-all): Subsume option `erc-scrolltobottom-relaxed' by recognizing a third value state, `relaxed'. A separate option would make more sense if other options also depended on `erc-scrolltobottom-all'. (erc-scrolltobottom-relaxed): Remove redundant option, which was to be new in ERC 5.6. (erc-scrolltobottom-enable, erc-scrolltobottom-mode): Warn if user attempts to enable `erc-scrolltobottom-all' on Emacs 27, which is not supported. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): Remove unused variables. (erc--scrolltobottom-on-pre-command, erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): Remove unused functions. (erc--scrolltobottom-on-post-command): Remove conditional branch for dealing with a non-nil `erc--scrolltobottom-window-info'. (erc--scrolltobottom-setup): Convert from generic to normal function and remove setup and teardown for unused hooks. Set variable `read-minibuffer-restore-windows' locally when option `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-on-pre-insert): Replace reference to subsumed option `erc-scrolltobottom-relaxed' with new value `relaxed' for existing option `erc-scrolltobottom-all'. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el (erc-scenarios-scrolltobottom--relaxed): Replace option `erc-scrolltobottom-relaxed' with new value `relaxed' for `erc-scrolltobottom-all'. (Bug#64855)
2023-10-10 18:14:53 -07:00
(defun erc--scrolltobottom-setup ()
"Perform buffer-local setup for module `scrolltobottom'."
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
(if erc-scrolltobottom-mode
Skip post-minibuffer restore in erc-scrolltobottom-all * etc/ERC-NEWS: Remove mention of `erc-scrolltobottom-relaxed' in entry for module `scrolltobottom'. * lisp/erc/erc-goodies.el (erc-input-line-position): Fix mention of abandoned option `erc-scrolltobottom-relaxed'. (erc-scrolltobottom-all): Subsume option `erc-scrolltobottom-relaxed' by recognizing a third value state, `relaxed'. A separate option would make more sense if other options also depended on `erc-scrolltobottom-all'. (erc-scrolltobottom-relaxed): Remove redundant option, which was to be new in ERC 5.6. (erc-scrolltobottom-enable, erc-scrolltobottom-mode): Warn if user attempts to enable `erc-scrolltobottom-all' on Emacs 27, which is not supported. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): Remove unused variables. (erc--scrolltobottom-on-pre-command, erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): Remove unused functions. (erc--scrolltobottom-on-post-command): Remove conditional branch for dealing with a non-nil `erc--scrolltobottom-window-info'. (erc--scrolltobottom-setup): Convert from generic to normal function and remove setup and teardown for unused hooks. Set variable `read-minibuffer-restore-windows' locally when option `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-on-pre-insert): Replace reference to subsumed option `erc-scrolltobottom-relaxed' with new value `relaxed' for existing option `erc-scrolltobottom-all'. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el (erc-scenarios-scrolltobottom--relaxed): Replace option `erc-scrolltobottom-relaxed' with new value `relaxed' for `erc-scrolltobottom-all'. (Bug#64855)
2023-10-10 18:14:53 -07:00
(if erc-scrolltobottom-all
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
(progn
Skip post-minibuffer restore in erc-scrolltobottom-all * etc/ERC-NEWS: Remove mention of `erc-scrolltobottom-relaxed' in entry for module `scrolltobottom'. * lisp/erc/erc-goodies.el (erc-input-line-position): Fix mention of abandoned option `erc-scrolltobottom-relaxed'. (erc-scrolltobottom-all): Subsume option `erc-scrolltobottom-relaxed' by recognizing a third value state, `relaxed'. A separate option would make more sense if other options also depended on `erc-scrolltobottom-all'. (erc-scrolltobottom-relaxed): Remove redundant option, which was to be new in ERC 5.6. (erc-scrolltobottom-enable, erc-scrolltobottom-mode): Warn if user attempts to enable `erc-scrolltobottom-all' on Emacs 27, which is not supported. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): Remove unused variables. (erc--scrolltobottom-on-pre-command, erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): Remove unused functions. (erc--scrolltobottom-on-post-command): Remove conditional branch for dealing with a non-nil `erc--scrolltobottom-window-info'. (erc--scrolltobottom-setup): Convert from generic to normal function and remove setup and teardown for unused hooks. Set variable `read-minibuffer-restore-windows' locally when option `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-on-pre-insert): Replace reference to subsumed option `erc-scrolltobottom-relaxed' with new value `relaxed' for existing option `erc-scrolltobottom-all'. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el (erc-scenarios-scrolltobottom--relaxed): Replace option `erc-scrolltobottom-relaxed' with new value `relaxed' for `erc-scrolltobottom-all'. (Bug#64855)
2023-10-10 18:14:53 -07:00
(setq-local read-minibuffer-restore-windows nil)
(when (zerop scroll-conservatively)
(setq-local scroll-step 1))
Skip post-minibuffer restore in erc-scrolltobottom-all * etc/ERC-NEWS: Remove mention of `erc-scrolltobottom-relaxed' in entry for module `scrolltobottom'. * lisp/erc/erc-goodies.el (erc-input-line-position): Fix mention of abandoned option `erc-scrolltobottom-relaxed'. (erc-scrolltobottom-all): Subsume option `erc-scrolltobottom-relaxed' by recognizing a third value state, `relaxed'. A separate option would make more sense if other options also depended on `erc-scrolltobottom-all'. (erc-scrolltobottom-relaxed): Remove redundant option, which was to be new in ERC 5.6. (erc-scrolltobottom-enable, erc-scrolltobottom-mode): Warn if user attempts to enable `erc-scrolltobottom-all' on Emacs 27, which is not supported. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): Remove unused variables. (erc--scrolltobottom-on-pre-command, erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): Remove unused functions. (erc--scrolltobottom-on-post-command): Remove conditional branch for dealing with a non-nil `erc--scrolltobottom-window-info'. (erc--scrolltobottom-setup): Convert from generic to normal function and remove setup and teardown for unused hooks. Set variable `read-minibuffer-restore-windows' locally when option `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-on-pre-insert): Replace reference to subsumed option `erc-scrolltobottom-relaxed' with new value `relaxed' for existing option `erc-scrolltobottom-all'. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el (erc-scenarios-scrolltobottom--relaxed): Replace option `erc-scrolltobottom-relaxed' with new value `relaxed' for `erc-scrolltobottom-all'. (Bug#64855)
2023-10-10 18:14:53 -07:00
(unless (eq erc-scrolltobottom-all 'relaxed)
(add-hook 'window-configuration-change-hook
#'erc--scrolltobottom-on-win-conf-change 50 t)
Skip post-minibuffer restore in erc-scrolltobottom-all * etc/ERC-NEWS: Remove mention of `erc-scrolltobottom-relaxed' in entry for module `scrolltobottom'. * lisp/erc/erc-goodies.el (erc-input-line-position): Fix mention of abandoned option `erc-scrolltobottom-relaxed'. (erc-scrolltobottom-all): Subsume option `erc-scrolltobottom-relaxed' by recognizing a third value state, `relaxed'. A separate option would make more sense if other options also depended on `erc-scrolltobottom-all'. (erc-scrolltobottom-relaxed): Remove redundant option, which was to be new in ERC 5.6. (erc-scrolltobottom-enable, erc-scrolltobottom-mode): Warn if user attempts to enable `erc-scrolltobottom-all' on Emacs 27, which is not supported. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): Remove unused variables. (erc--scrolltobottom-on-pre-command, erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): Remove unused functions. (erc--scrolltobottom-on-post-command): Remove conditional branch for dealing with a non-nil `erc--scrolltobottom-window-info'. (erc--scrolltobottom-setup): Convert from generic to normal function and remove setup and teardown for unused hooks. Set variable `read-minibuffer-restore-windows' locally when option `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-on-pre-insert): Replace reference to subsumed option `erc-scrolltobottom-relaxed' with new value `relaxed' for existing option `erc-scrolltobottom-all'. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el (erc-scenarios-scrolltobottom--relaxed): Replace option `erc-scrolltobottom-relaxed' with new value `relaxed' for `erc-scrolltobottom-all'. (Bug#64855)
2023-10-10 18:14:53 -07:00
(add-hook 'post-command-hook
#'erc--scrolltobottom-on-post-command 50 t)))
(add-hook 'post-command-hook #'erc-scroll-to-bottom nil t))
(remove-hook 'post-command-hook #'erc-scroll-to-bottom t)
(remove-hook 'post-command-hook #'erc--scrolltobottom-on-post-command t)
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
(remove-hook 'window-configuration-change-hook
#'erc--scrolltobottom-on-win-conf-change t)
Skip post-minibuffer restore in erc-scrolltobottom-all * etc/ERC-NEWS: Remove mention of `erc-scrolltobottom-relaxed' in entry for module `scrolltobottom'. * lisp/erc/erc-goodies.el (erc-input-line-position): Fix mention of abandoned option `erc-scrolltobottom-relaxed'. (erc-scrolltobottom-all): Subsume option `erc-scrolltobottom-relaxed' by recognizing a third value state, `relaxed'. A separate option would make more sense if other options also depended on `erc-scrolltobottom-all'. (erc-scrolltobottom-relaxed): Remove redundant option, which was to be new in ERC 5.6. (erc-scrolltobottom-enable, erc-scrolltobottom-mode): Warn if user attempts to enable `erc-scrolltobottom-all' on Emacs 27, which is not supported. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): Remove unused variables. (erc--scrolltobottom-on-pre-command, erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): Remove unused functions. (erc--scrolltobottom-on-post-command): Remove conditional branch for dealing with a non-nil `erc--scrolltobottom-window-info'. (erc--scrolltobottom-setup): Convert from generic to normal function and remove setup and teardown for unused hooks. Set variable `read-minibuffer-restore-windows' locally when option `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-on-pre-insert): Replace reference to subsumed option `erc-scrolltobottom-relaxed' with new value `relaxed' for existing option `erc-scrolltobottom-all'. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el (erc-scenarios-scrolltobottom--relaxed): Replace option `erc-scrolltobottom-relaxed' with new value `relaxed' for `erc-scrolltobottom-all'. (Bug#64855)
2023-10-10 18:14:53 -07:00
(kill-local-variable 'read-minibuffer-restore-windows)
(kill-local-variable 'scroll-step)
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
(kill-local-variable 'erc--scrolltobottom-window-info)))
(defun erc--scrolltobottom-on-pre-insert (_)
Skip post-minibuffer restore in erc-scrolltobottom-all * etc/ERC-NEWS: Remove mention of `erc-scrolltobottom-relaxed' in entry for module `scrolltobottom'. * lisp/erc/erc-goodies.el (erc-input-line-position): Fix mention of abandoned option `erc-scrolltobottom-relaxed'. (erc-scrolltobottom-all): Subsume option `erc-scrolltobottom-relaxed' by recognizing a third value state, `relaxed'. A separate option would make more sense if other options also depended on `erc-scrolltobottom-all'. (erc-scrolltobottom-relaxed): Remove redundant option, which was to be new in ERC 5.6. (erc-scrolltobottom-enable, erc-scrolltobottom-mode): Warn if user attempts to enable `erc-scrolltobottom-all' on Emacs 27, which is not supported. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): Remove unused variables. (erc--scrolltobottom-on-pre-command, erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): Remove unused functions. (erc--scrolltobottom-on-post-command): Remove conditional branch for dealing with a non-nil `erc--scrolltobottom-window-info'. (erc--scrolltobottom-setup): Convert from generic to normal function and remove setup and teardown for unused hooks. Set variable `read-minibuffer-restore-windows' locally when option `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-on-pre-insert): Replace reference to subsumed option `erc-scrolltobottom-relaxed' with new value `relaxed' for existing option `erc-scrolltobottom-all'. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el (erc-scenarios-scrolltobottom--relaxed): Replace option `erc-scrolltobottom-relaxed' with new value `relaxed' for `erc-scrolltobottom-all'. (Bug#64855)
2023-10-10 18:14:53 -07:00
"Remember `window-start' before inserting a message."
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
(setq erc--scrolltobottom-window-info
(mapcar (lambda (w)
(list w
(window-start w)
(and-let*
Skip post-minibuffer restore in erc-scrolltobottom-all * etc/ERC-NEWS: Remove mention of `erc-scrolltobottom-relaxed' in entry for module `scrolltobottom'. * lisp/erc/erc-goodies.el (erc-input-line-position): Fix mention of abandoned option `erc-scrolltobottom-relaxed'. (erc-scrolltobottom-all): Subsume option `erc-scrolltobottom-relaxed' by recognizing a third value state, `relaxed'. A separate option would make more sense if other options also depended on `erc-scrolltobottom-all'. (erc-scrolltobottom-relaxed): Remove redundant option, which was to be new in ERC 5.6. (erc-scrolltobottom-enable, erc-scrolltobottom-mode): Warn if user attempts to enable `erc-scrolltobottom-all' on Emacs 27, which is not supported. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): Remove unused variables. (erc--scrolltobottom-on-pre-command, erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): Remove unused functions. (erc--scrolltobottom-on-post-command): Remove conditional branch for dealing with a non-nil `erc--scrolltobottom-window-info'. (erc--scrolltobottom-setup): Convert from generic to normal function and remove setup and teardown for unused hooks. Set variable `read-minibuffer-restore-windows' locally when option `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-on-pre-insert): Replace reference to subsumed option `erc-scrolltobottom-relaxed' with new value `relaxed' for existing option `erc-scrolltobottom-all'. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el (erc-scenarios-scrolltobottom--relaxed): Replace option `erc-scrolltobottom-relaxed' with new value `relaxed' for `erc-scrolltobottom-all'. (Bug#64855)
2023-10-10 18:14:53 -07:00
(((eq erc-scrolltobottom-all 'relaxed))
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
(c (count-screen-lines (window-start w)
(point-max) nil w)))
(if (= ?\n (char-before (point-max))) (1+ c) c))))
(get-buffer-window-list nil nil 'visible))))
(defun erc--scrolltobottom-confirm (&optional scroll-to)
"Like `erc-scroll-to-bottom', but use `window-point'.
Position current line (with `recenter') SCROLL-TO lines below
window's top. Return nil if point is not in prompt area or if
prompt isn't ready."
(when erc-insert-marker
(let ((resize-mini-windows nil))
(save-restriction
(widen)
(when (>= (window-point) erc-input-marker)
(save-excursion
(goto-char (point-max))
(recenter (+ (or scroll-to 0) (or erc-input-line-position -1)))
t))))))
(defun erc-scroll-to-bottom ()
"Recenter WINDOW so that `point' is on the last line.
You can control which line is recentered to by customizing the
variable `erc-input-line-position'."
;; Temporarily bind resize-mini-windows to nil so that users who have it
;; set to a non-nil value will not suffer from premature minibuffer
;; shrinkage due to the below recenter call. I have no idea why this
;; works, but it solves the problem, and has no negative side effects.
;; (Fran Litterio, 2003/01/07)
(let ((resize-mini-windows nil))
(save-restriction
(widen)
(when (and erc-insert-marker
(eq (current-buffer) (window-buffer))
;; we're editing a line. Scroll.
(> (point) erc-insert-marker))
(save-excursion
(goto-char (point-max))
(recenter (or erc-input-line-position -1)))))))
;;; Make read only
;;;###autoload(autoload 'erc-readonly-mode "erc-goodies" nil t)
(define-erc-module readonly nil
"This mode causes all inserted text to be read-only."
Manage some text props for ERC insertion-hook members * etc/ERC-NEWS: Mention that ERC only adds the text property `cursor-sensor-functions' when `erc-echo-timestamps' is enabled. Also mention that date stamps are now inserted as separate messages. * lisp/erc/erc-fill.el (erc-fill): Look for text prop `erc-cmd' instead of `erc-command' and use helper utility to do so. (erc-fill-static): Skip date stamps because this fill style leaves them flush left. (erc-fill-wrap-mode, erc-fill-wrap-enable, erc-fill-wrap-disable): Don't hook on the soon-to-be-removed function interface `erc-stamp--insert-date-function' because date stamps are now separate messages. (erc-fill--wrap-continued-message-p): Restore accidentally discarded doc string. Derive context about current message from text props at `point-min', and use updated property names and utility functions. Abort when previous message is now hidden. (erc-fill--wrap-stamp-insert-prefixed-date): Remove unused function, originally meant to be new in ERC 5.6, and move logic for date-stamp measuring portion directly to `erc-fill-wrap' itself. (erc-fill--wrap-measure): New helper function. (erc-fill-wrap): Use helper `erc-fill--wrap-measure' and incorporate date-stamp detection and width measuring from removed helper. Don't dedent first word for messages of unknown origin, such as those inserted by `erc-display-line' alone without prior preparation from `erc-display-message'. * lisp/erc/erc-goodies.el (erc-readonly-mode, erc-readonly-enable): Set hook depth explicitly to 70. * lisp/erc/erc-stamp.el (erc-timestamp-format-left): Mention that a trailing newline is implicit if not provided and that users who don't want date stamps should use `erc-timestamp-format-right' instead. (erc-stamp-mode, erc-stamp-enable): Call `erc-stamp--setup' instead of `erc-munge-invisibility-spec', and bump hook depth for `erc-add-timestamp' to 70. (erc-stamp--current-time): Use `erc-ts' instead of `erc-timestamp' text property in doc string. (erc-stamp--skip): New internal variable. (erc-stamp--allow-unmanaged): New variable for legacy code to force `erc-add-timestamps' to run when `erc--msg-props' is nil. (erc-add-timestamp): Always run when `erc-stamp--allow-unmanaged' is non-nil unless `erc-stamp--skip' is as well because the latter takes precedence. Don't add `erc-ts' text prop directly unless `erc-stamp--allow-unmanaged is non-nil. Instead, use the new `erc--msg-props' facility to defer until after modification hooks. Likewise, don't add `cursor-senor-functions' directly either unless the same compatibility flag is enabled. Instead, expect the latter to be handled by a post-modify hook conditioned on the option `erc-echo-timestamps'. (erc-timestamp-last-inserted-left): Mention that the final trailing newline specified in the format string no longer appears in the recorded value. (erc-stamp-prefix-log-filter): Use updated name for timestamp property as well as helper utility for accessing it. (erc-stamp--inherited-props): Add doc string. (erc-insert-timestamp-right): Fix bug involving object cycle where the time-stamp string would appear in its own `display' property. (erc-stamp--insert-date-function, erc-stamp--insert-date-hook): Remove unused internal function-valued interface variable and replace with the latter, a normal hook. (erc-stamp--date-format-end, erc-stamp--propertize-left-date-stamp): New function and auxiliary variable to apply date stamp properties at the post-modify stage. Add text property `erc-stamp-type' to inserted date stamps to help folks distinguish between them and other left-sided stamps. (erc-stamp--current-datestamp-left, erc-stamp--format-date-stamp, erc-stamp--insert-date-stamp-as-phony-message, erc-stamp--lr-date-on-pre-modify): New functions and state variable to help ERC treat date stamps as separate messages while working within the established mechanism for processing inserted messages. Shadow `erc-stamp--invisible-property' when calling `erc-format-timestamp' in order to prevent date stamps from inheriting other `invisible' props. These date stamps are special in that they have no business being hidden along with the current message. (erc-insert-timestamp-left-and-right): On initial run in any buffer, remember whether the date stamp needed newline massaging on insertion. Move all business for inserting date stamps to post-modify hooks, but run them forcibly if this is the very first date stamp in the current buffer. Also mention some specifics related to relevant text props in the doc string. (erc-format-timestamp): Don't add `invisible' prop to stamp unless `erc-stamp--invisible-property' is non-nil. (erc-stamp--csf-props-updated-p): New local variable. (erc-munge-invisibility-spec): Restore `cursor-sensor-functions' text property for existing messages when a user enables the option mid-session. Add and remove hooks for use with automatic timestamp echoing. (erc-stamp--add-csf-on-post-modify): New function to add `cursor-sensor-functions' property on post-modify hooks. (erc-stamp--setup): Perform some additional teardown. (erc-stamp--on-clear-message): Look for text property `erc-ts' instead of `erc-timestamp'. (erc-echo-timestamp, erc--echo-ts-csf): Use utility to find time-stamp text prop in current message. (erc-stamp--update-saved-position, erc-stamp--reset-on-clear): Use hook `erc-stamp--insert-date-hook' instead of excised function-valued variable interface `erc-stamp--insert-date-function'. * lisp/erc/erc-truncate.el (erc-truncate-buffer-to-size): Use internal utility to find beginning of message. * lisp/erc/erc.el (erc--msg-props, erc--msg-props-overrides): New internal variables for initializing and conveying metadata-oriented text properties among insert and send hooks. (erc-insert-modify-hook): Mention reserved depth ranges for built-in members in doc string. (erc-send-action): Use convenience variable to modifying text props instead of awkwardly overriding `erc-insert-pre-hook'. (erc--check-msg-prop, erc--get-inserted-msg-bounds, erc--get-inserted-msg-prop, erc--with-inserted-msg, erc--traverse-inserted): New utility functions and macros to help modules find metadata and message-delimiting text props. (erc-display-line-1): Ensure the first character of every message in an ERC buffer has the `erc-msg' property, as well as any other props in `erc--msg-props', when populated. (erc--hide-message): Don't bother offsetting start of first message in a buffer. (erc--ranked-properties, erc--order-text-properties-from-hash): New variable and function to convert `erc--msg-props' into a plist suitable for `add-text-properties'. (erc-display-message): Make doc string more informative. Bind and initialize `erc--msg-props' for use by all hooks. Respect `erc--msg-prop-overrides' when non-nil. Don't add `erc-command' property. Instead, ensure `erc--msg-props' contains an `erc-cmd' item when the parameter PARSED is non-nil. (erc--own-property-names): Add `erc-stamp-type'. (erc--get-speaker-bounds): Use helper to find message start. (erc-process-ctcp-query, erc-send-current-line): Use convenience variable to leverage framework for manipulating message metadata instead of overriding `erc-insert-pre-hook'. (erc-display-msg): Bind `erc--msg-props' for use by all send-related hooks. Add text props from table after `erc-send-post-hook'. (erc-restore-text-properties): Improve doc string. (erc--get-eq-comparable-cmd): Use `if-let' instead of `if-let*'. * test/lisp/erc/erc-fill-tests.el (erc-fill-tests--insert-privmsg): Make phony message more realistic. (erc-fill-tests--wrap-populate): Shorten overlong line. (erc-fill-tests--wrap-check-prefixes): Make test utility more vigilant in asserting no gaps exist in `line-prefix' property interval. (erc-fill-tests--compare): Compare text props on text-prop values that are themselves strings. * test/lisp/erc/erc-scenarios-log.el (erc-scenarios-log--clear-stamp): Ensure `erc-stamp' is loaded. * test/lisp/erc/erc-scenarios-match.el (erc-scenarios-match--stamp-left-current-nick, erc-scenarios-match--invisible-stamp): Use `default-value' for `erc-insert-modify-hook' in ordering assertion. (erc-scenarios-match--find-bol, erc-scenarios-match--find-eol): Remove unused assertion helper functions. (erc-scenarios-match--stamp-right-fools-invisible): Remove misplaced ERT tag from function and use utility to find message bounds. (erc-scenarios-match--stamp-right-fools-invisible): Use real utility from main library to find message end. (erc-scenarios-match--fill-wrap-stamp-dedented-p): New assertion utility function. (erc-scenarios-match--hide-fools/stamp-both/fill-wrap) New test. (erc-scenarios-match--hide-fools/stamp-both/fill-wrap/speak): New test. (erc-scenarios-match--stamp-both-invisible-fill-static): Expect `erc-cmd' at beginning of inserted message's filled line, even if the line starts with white space. Also, add new function parameter `assert-ds', a callback to run when visiting the second date stamp, which is followed by a hidden message. In the test of the same name, expect the date stamp's invisibility interval to begin at the newline after the previous message and to not contain any existing invisibility props, namely, those belonging to the subsequent hidden "fools" message. Also use shortened "metadata" text prop names. (erc-scenarios-match--stamp-both-invisible-fill-static--nooffset): Expect the date stamp's invisibility interval to match its field's instead of starting and ending sooner. * test/lisp/erc/erc-stamp-tests.el: Put well-known metadata prop at the start of the message. * test/lisp/erc/erc-tests.el (erc--refresh-prompt): Prevent modules from mutating hooks. (erc--order-text-properties-from-hash, erc--check-msg-prop): New tests. * test/lisp/erc/resources/fill/snapshots/merge-01-start.eld: Update test data. * test/lisp/erc/resources/fill/snapshots/merge-02-right.eld: Update test data. * test/lisp/erc/resources/fill/snapshots/merge-wrap-01.eld: Update. * test/lisp/erc/resources/fill/snapshots/monospace-01-start.eld: Update. * test/lisp/erc/resources/fill/snapshots/monospace-02-right.eld: Update. * test/lisp/erc/resources/fill/snapshots/monospace-03-left.eld: Update. * test/lisp/erc/resources/fill/snapshots/monospace-04-reset.eld: Update. * test/lisp/erc/resources/fill/snapshots/spacing-01-mono.eld: Update. * test/lisp/erc/resources/fill/snapshots/stamps-left-01.eld: Update. * test/lisp/erc/resources/match/fools/fill-wrap.eld: New file. (Bug#60936)
2023-09-21 23:54:31 -07:00
((add-hook 'erc-insert-post-hook #'erc-make-read-only 70)
(add-hook 'erc-send-post-hook #'erc-make-read-only 70))
lisp/erc: Use lexical-binding Also remove various redundant `:group` arguments. * lisp/erc/erc-backend.el (define-erc-response-handler): Move `declare` after the docstring. * lisp/erc/erc-capab.el: Use lexical-binding. (erc-capab-identify-activate): Simplify with `member`. * lisp/erc/erc-dcc.el (erc-dcc): Move before erc-dcc-mode definition, which refers to it. (erc-dcc-chat-accept): Remove unused vars `nick` and `buffer`. * lisp/erc/erc-imenu.el: Use lexical-binding. (erc-create-imenu-index): Remove unused var `prev-pos`. * lisp/erc/erc-match.el: Use lexical-binding. (erc-match-message): Remove unused var `old-pt`. (erc-match-message): Strength-reduce `eval` to `symbol-value`. * lisp/erc/erc-page.el: Use lexical-binding. (erc-page): Move Custom group before `erg-page-mode` which refers to it. * lisp/erc/erc-replace.el: Use lexical-binding. (erc-replace-insert): Use `functionp`. * lisp/erc/erc-status-sidebar.el: Use lexical-binding. (erc-status-sidebar-open): Remove unused var `sidebar-window`. * lisp/erc/erc.el: Fix header to use the customary 3 semi-colons. (erc-fill-column): Declare variable. * lisp/erc/erc-autoaway.el: Use lexical-binding. * lisp/erc/erc-ezbounce.el: Use lexical-binding. * lisp/erc/erc-fill.el: Use lexical-binding. * lisp/erc/erc-goodies.el: Use lexical-binding. * lisp/erc/erc-ibuffer.el: Use lexical-binding. * lisp/erc/erc-identd.el: Use lexical-binding. * lisp/erc/erc-join.el: Use lexical-binding. * lisp/erc/erc-lang.el: Use lexical-binding. * lisp/erc/erc-log.el: Use lexical-binding. * lisp/erc/erc-menu.el: Use lexical-binding. * lisp/erc/erc-netsplit.el: Use lexical-binding. * lisp/erc/erc-networks.el: Use lexical-binding. * lisp/erc/erc-pcomplete.el: Use lexical-binding. * lisp/erc/erc-ring.el: Use lexical-binding. * lisp/erc/erc-speedbar.el: Use lexical-binding. * lisp/erc/erc-spelling.el: Use lexical-binding. * lisp/erc/erc-truncate.el: Use lexical-binding. * lisp/erc/erc-xdcc.el: Use lexical-binding.
2021-03-18 23:14:33 -04:00
((remove-hook 'erc-insert-post-hook #'erc-make-read-only)
(remove-hook 'erc-send-post-hook #'erc-make-read-only)))
(defun erc-make-read-only ()
"Make all the text in the current buffer read-only.
Put this function on `erc-insert-post-hook' and/or `erc-send-post-hook'."
(put-text-property (point-min) (point-max) 'read-only t)
(put-text-property (point-min) (point-max) 'front-sticky t)
(put-text-property (point-min) (point-max) 'rear-nonsticky t))
;;; Move to prompt when typing text
;;;###autoload(autoload 'erc-move-to-prompt-mode "erc-goodies" nil t)
(define-erc-module move-to-prompt nil
"This mode causes the point to be moved to the prompt when typing text."
lisp/erc: Use lexical-binding Also remove various redundant `:group` arguments. * lisp/erc/erc-backend.el (define-erc-response-handler): Move `declare` after the docstring. * lisp/erc/erc-capab.el: Use lexical-binding. (erc-capab-identify-activate): Simplify with `member`. * lisp/erc/erc-dcc.el (erc-dcc): Move before erc-dcc-mode definition, which refers to it. (erc-dcc-chat-accept): Remove unused vars `nick` and `buffer`. * lisp/erc/erc-imenu.el: Use lexical-binding. (erc-create-imenu-index): Remove unused var `prev-pos`. * lisp/erc/erc-match.el: Use lexical-binding. (erc-match-message): Remove unused var `old-pt`. (erc-match-message): Strength-reduce `eval` to `symbol-value`. * lisp/erc/erc-page.el: Use lexical-binding. (erc-page): Move Custom group before `erg-page-mode` which refers to it. * lisp/erc/erc-replace.el: Use lexical-binding. (erc-replace-insert): Use `functionp`. * lisp/erc/erc-status-sidebar.el: Use lexical-binding. (erc-status-sidebar-open): Remove unused var `sidebar-window`. * lisp/erc/erc.el: Fix header to use the customary 3 semi-colons. (erc-fill-column): Declare variable. * lisp/erc/erc-autoaway.el: Use lexical-binding. * lisp/erc/erc-ezbounce.el: Use lexical-binding. * lisp/erc/erc-fill.el: Use lexical-binding. * lisp/erc/erc-goodies.el: Use lexical-binding. * lisp/erc/erc-ibuffer.el: Use lexical-binding. * lisp/erc/erc-identd.el: Use lexical-binding. * lisp/erc/erc-join.el: Use lexical-binding. * lisp/erc/erc-lang.el: Use lexical-binding. * lisp/erc/erc-log.el: Use lexical-binding. * lisp/erc/erc-menu.el: Use lexical-binding. * lisp/erc/erc-netsplit.el: Use lexical-binding. * lisp/erc/erc-networks.el: Use lexical-binding. * lisp/erc/erc-pcomplete.el: Use lexical-binding. * lisp/erc/erc-ring.el: Use lexical-binding. * lisp/erc/erc-speedbar.el: Use lexical-binding. * lisp/erc/erc-spelling.el: Use lexical-binding. * lisp/erc/erc-truncate.el: Use lexical-binding. * lisp/erc/erc-xdcc.el: Use lexical-binding.
2021-03-18 23:14:33 -04:00
((add-hook 'erc-mode-hook #'erc-move-to-prompt-setup)
(unless erc--updating-modules-p (erc-buffer-do #'erc-move-to-prompt-setup)))
lisp/erc: Use lexical-binding Also remove various redundant `:group` arguments. * lisp/erc/erc-backend.el (define-erc-response-handler): Move `declare` after the docstring. * lisp/erc/erc-capab.el: Use lexical-binding. (erc-capab-identify-activate): Simplify with `member`. * lisp/erc/erc-dcc.el (erc-dcc): Move before erc-dcc-mode definition, which refers to it. (erc-dcc-chat-accept): Remove unused vars `nick` and `buffer`. * lisp/erc/erc-imenu.el: Use lexical-binding. (erc-create-imenu-index): Remove unused var `prev-pos`. * lisp/erc/erc-match.el: Use lexical-binding. (erc-match-message): Remove unused var `old-pt`. (erc-match-message): Strength-reduce `eval` to `symbol-value`. * lisp/erc/erc-page.el: Use lexical-binding. (erc-page): Move Custom group before `erg-page-mode` which refers to it. * lisp/erc/erc-replace.el: Use lexical-binding. (erc-replace-insert): Use `functionp`. * lisp/erc/erc-status-sidebar.el: Use lexical-binding. (erc-status-sidebar-open): Remove unused var `sidebar-window`. * lisp/erc/erc.el: Fix header to use the customary 3 semi-colons. (erc-fill-column): Declare variable. * lisp/erc/erc-autoaway.el: Use lexical-binding. * lisp/erc/erc-ezbounce.el: Use lexical-binding. * lisp/erc/erc-fill.el: Use lexical-binding. * lisp/erc/erc-goodies.el: Use lexical-binding. * lisp/erc/erc-ibuffer.el: Use lexical-binding. * lisp/erc/erc-identd.el: Use lexical-binding. * lisp/erc/erc-join.el: Use lexical-binding. * lisp/erc/erc-lang.el: Use lexical-binding. * lisp/erc/erc-log.el: Use lexical-binding. * lisp/erc/erc-menu.el: Use lexical-binding. * lisp/erc/erc-netsplit.el: Use lexical-binding. * lisp/erc/erc-networks.el: Use lexical-binding. * lisp/erc/erc-pcomplete.el: Use lexical-binding. * lisp/erc/erc-ring.el: Use lexical-binding. * lisp/erc/erc-speedbar.el: Use lexical-binding. * lisp/erc/erc-spelling.el: Use lexical-binding. * lisp/erc/erc-truncate.el: Use lexical-binding. * lisp/erc/erc-xdcc.el: Use lexical-binding.
2021-03-18 23:14:33 -04:00
((remove-hook 'erc-mode-hook #'erc-move-to-prompt-setup)
(dolist (buffer (erc-buffer-list))
(with-current-buffer buffer
lisp/erc: Use lexical-binding Also remove various redundant `:group` arguments. * lisp/erc/erc-backend.el (define-erc-response-handler): Move `declare` after the docstring. * lisp/erc/erc-capab.el: Use lexical-binding. (erc-capab-identify-activate): Simplify with `member`. * lisp/erc/erc-dcc.el (erc-dcc): Move before erc-dcc-mode definition, which refers to it. (erc-dcc-chat-accept): Remove unused vars `nick` and `buffer`. * lisp/erc/erc-imenu.el: Use lexical-binding. (erc-create-imenu-index): Remove unused var `prev-pos`. * lisp/erc/erc-match.el: Use lexical-binding. (erc-match-message): Remove unused var `old-pt`. (erc-match-message): Strength-reduce `eval` to `symbol-value`. * lisp/erc/erc-page.el: Use lexical-binding. (erc-page): Move Custom group before `erg-page-mode` which refers to it. * lisp/erc/erc-replace.el: Use lexical-binding. (erc-replace-insert): Use `functionp`. * lisp/erc/erc-status-sidebar.el: Use lexical-binding. (erc-status-sidebar-open): Remove unused var `sidebar-window`. * lisp/erc/erc.el: Fix header to use the customary 3 semi-colons. (erc-fill-column): Declare variable. * lisp/erc/erc-autoaway.el: Use lexical-binding. * lisp/erc/erc-ezbounce.el: Use lexical-binding. * lisp/erc/erc-fill.el: Use lexical-binding. * lisp/erc/erc-goodies.el: Use lexical-binding. * lisp/erc/erc-ibuffer.el: Use lexical-binding. * lisp/erc/erc-identd.el: Use lexical-binding. * lisp/erc/erc-join.el: Use lexical-binding. * lisp/erc/erc-lang.el: Use lexical-binding. * lisp/erc/erc-log.el: Use lexical-binding. * lisp/erc/erc-menu.el: Use lexical-binding. * lisp/erc/erc-netsplit.el: Use lexical-binding. * lisp/erc/erc-networks.el: Use lexical-binding. * lisp/erc/erc-pcomplete.el: Use lexical-binding. * lisp/erc/erc-ring.el: Use lexical-binding. * lisp/erc/erc-speedbar.el: Use lexical-binding. * lisp/erc/erc-spelling.el: Use lexical-binding. * lisp/erc/erc-truncate.el: Use lexical-binding. * lisp/erc/erc-xdcc.el: Use lexical-binding.
2021-03-18 23:14:33 -04:00
(remove-hook 'pre-command-hook #'erc-move-to-prompt t)))))
(defun erc-move-to-prompt ()
"Move the point to the ERC prompt if this is a self-inserting command."
(when (and erc-input-marker (< (point) erc-input-marker)
(eq 'self-insert-command this-command))
(deactivate-mark)
(push-mark)
(goto-char (point-max))))
(defun erc-move-to-prompt-setup ()
"Initialize the move-to-prompt module."
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
(add-hook 'pre-command-hook #'erc-move-to-prompt 70 t))
;;; Keep place in unvisited channels
;;;###autoload(autoload 'erc-keep-place-mode "erc-goodies" nil t)
(define-erc-module keep-place nil
"Leave point above un-viewed text in other channels."
((add-hook 'erc-insert-pre-hook #'erc-keep-place 65))
lisp/erc: Use lexical-binding Also remove various redundant `:group` arguments. * lisp/erc/erc-backend.el (define-erc-response-handler): Move `declare` after the docstring. * lisp/erc/erc-capab.el: Use lexical-binding. (erc-capab-identify-activate): Simplify with `member`. * lisp/erc/erc-dcc.el (erc-dcc): Move before erc-dcc-mode definition, which refers to it. (erc-dcc-chat-accept): Remove unused vars `nick` and `buffer`. * lisp/erc/erc-imenu.el: Use lexical-binding. (erc-create-imenu-index): Remove unused var `prev-pos`. * lisp/erc/erc-match.el: Use lexical-binding. (erc-match-message): Remove unused var `old-pt`. (erc-match-message): Strength-reduce `eval` to `symbol-value`. * lisp/erc/erc-page.el: Use lexical-binding. (erc-page): Move Custom group before `erg-page-mode` which refers to it. * lisp/erc/erc-replace.el: Use lexical-binding. (erc-replace-insert): Use `functionp`. * lisp/erc/erc-status-sidebar.el: Use lexical-binding. (erc-status-sidebar-open): Remove unused var `sidebar-window`. * lisp/erc/erc.el: Fix header to use the customary 3 semi-colons. (erc-fill-column): Declare variable. * lisp/erc/erc-autoaway.el: Use lexical-binding. * lisp/erc/erc-ezbounce.el: Use lexical-binding. * lisp/erc/erc-fill.el: Use lexical-binding. * lisp/erc/erc-goodies.el: Use lexical-binding. * lisp/erc/erc-ibuffer.el: Use lexical-binding. * lisp/erc/erc-identd.el: Use lexical-binding. * lisp/erc/erc-join.el: Use lexical-binding. * lisp/erc/erc-lang.el: Use lexical-binding. * lisp/erc/erc-log.el: Use lexical-binding. * lisp/erc/erc-menu.el: Use lexical-binding. * lisp/erc/erc-netsplit.el: Use lexical-binding. * lisp/erc/erc-networks.el: Use lexical-binding. * lisp/erc/erc-pcomplete.el: Use lexical-binding. * lisp/erc/erc-ring.el: Use lexical-binding. * lisp/erc/erc-speedbar.el: Use lexical-binding. * lisp/erc/erc-spelling.el: Use lexical-binding. * lisp/erc/erc-truncate.el: Use lexical-binding. * lisp/erc/erc-xdcc.el: Use lexical-binding.
2021-03-18 23:14:33 -04:00
((remove-hook 'erc-insert-pre-hook #'erc-keep-place)))
(defcustom erc-keep-place-indicator-style t
"Flavor of visual indicator applied to kept place.
For use with the `keep-place-indicator' module. A value of `arrow'
displays an arrow in the left fringe or margin. When it's
`face', ERC adds the face `erc-keep-place-indicator-line' to the
appropriate line. A value of t does both."
:group 'erc
Add helper for restoring local session vars in ERC * lisp/erc/erc-common.el (erc--input-split): Suppress warning for obsolete variable `erc-send-this' in init form. * lisp/erc/erc-goodies.el (erc--keep-place-indicator-setup): Use macro `erc--restore-initialize-priors' to preserve last session's indicator position, if any. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Use convenience function to show missing-dependency notice. * lisp/erc/erc-sasl.el (erc-sasl-auth-source-password-as-host): Merge redundant `when' forms for clarity. (erc-sasl--init): Remove unused function. (erc-sasl-mode, erc-sasl-enable): Use helper to restore `erc-sasl--options', essentially inlining the body of the now defunct `erc-sasl--init'. * lisp/erc/erc.el (erc--restore-initialize-priors): New macro to help local modules and mode hooks prefer existing state over initializing anew. (erc--warn-once-before-connect): Add helper function to display an "error notice" just after module setup. (erc-accidental-paste-threshold-seconds) Improve doc string. * test/lisp/erc/erc-goodies-tests.el (erc-controls-highlight--examples, erc-controls-highlight--inverse, erc-controls-highlight--motd, erc-keep-place-indicator-mode): Remove feature check. For the latter, also start fake process and shadow `erc-connect-pre-hook'. * test/lisp/erc/erc-tests.el (erc--restore-initialize-priors): New test. Also see test/lisp/erc/erc-scenarios-base-local-modules.el for a more realistic exercising of this functionality. (Bug#60936)
2023-05-07 19:43:57 -07:00
:package-version '(ERC . "5.6") ; FIXME sync on release
:type '(choice (const :tag "Use arrow" arrow)
(const :tag "Use face" face)
(const :tag "Use both arrow and face" t)))
(defcustom erc-keep-place-indicator-buffer-type t
"ERC buffer type in which to display `keep-place-indicator'.
A value of t means \"all\" ERC buffers."
:group 'erc
Add helper for restoring local session vars in ERC * lisp/erc/erc-common.el (erc--input-split): Suppress warning for obsolete variable `erc-send-this' in init form. * lisp/erc/erc-goodies.el (erc--keep-place-indicator-setup): Use macro `erc--restore-initialize-priors' to preserve last session's indicator position, if any. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Use convenience function to show missing-dependency notice. * lisp/erc/erc-sasl.el (erc-sasl-auth-source-password-as-host): Merge redundant `when' forms for clarity. (erc-sasl--init): Remove unused function. (erc-sasl-mode, erc-sasl-enable): Use helper to restore `erc-sasl--options', essentially inlining the body of the now defunct `erc-sasl--init'. * lisp/erc/erc.el (erc--restore-initialize-priors): New macro to help local modules and mode hooks prefer existing state over initializing anew. (erc--warn-once-before-connect): Add helper function to display an "error notice" just after module setup. (erc-accidental-paste-threshold-seconds) Improve doc string. * test/lisp/erc/erc-goodies-tests.el (erc-controls-highlight--examples, erc-controls-highlight--inverse, erc-controls-highlight--motd, erc-keep-place-indicator-mode): Remove feature check. For the latter, also start fake process and shadow `erc-connect-pre-hook'. * test/lisp/erc/erc-tests.el (erc--restore-initialize-priors): New test. Also see test/lisp/erc/erc-scenarios-base-local-modules.el for a more realistic exercising of this functionality. (Bug#60936)
2023-05-07 19:43:57 -07:00
:package-version '(ERC . "5.6") ; FIXME sync on release
:type '(choice (const t) (const server) (const target)))
(defcustom erc-keep-place-indicator-follow nil
"Whether to sync visual kept place to window's top when reading.
For use with `erc-keep-place-indicator-mode'."
:group 'erc
Add helper for restoring local session vars in ERC * lisp/erc/erc-common.el (erc--input-split): Suppress warning for obsolete variable `erc-send-this' in init form. * lisp/erc/erc-goodies.el (erc--keep-place-indicator-setup): Use macro `erc--restore-initialize-priors' to preserve last session's indicator position, if any. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Use convenience function to show missing-dependency notice. * lisp/erc/erc-sasl.el (erc-sasl-auth-source-password-as-host): Merge redundant `when' forms for clarity. (erc-sasl--init): Remove unused function. (erc-sasl-mode, erc-sasl-enable): Use helper to restore `erc-sasl--options', essentially inlining the body of the now defunct `erc-sasl--init'. * lisp/erc/erc.el (erc--restore-initialize-priors): New macro to help local modules and mode hooks prefer existing state over initializing anew. (erc--warn-once-before-connect): Add helper function to display an "error notice" just after module setup. (erc-accidental-paste-threshold-seconds) Improve doc string. * test/lisp/erc/erc-goodies-tests.el (erc-controls-highlight--examples, erc-controls-highlight--inverse, erc-controls-highlight--motd, erc-keep-place-indicator-mode): Remove feature check. For the latter, also start fake process and shadow `erc-connect-pre-hook'. * test/lisp/erc/erc-tests.el (erc--restore-initialize-priors): New test. Also see test/lisp/erc/erc-scenarios-base-local-modules.el for a more realistic exercising of this functionality. (Bug#60936)
2023-05-07 19:43:57 -07:00
:package-version '(ERC . "5.6") ; FIXME sync on release
:type 'boolean)
(defface erc-keep-place-indicator-line
'((((class color) (min-colors 88) (background light)
(supports :underline (:style wave)))
(:underline (:color "PaleGreen3" :style wave)))
(((class color) (min-colors 88) (background dark)
(supports :underline (:style wave)))
(:underline (:color "PaleGreen1" :style wave)))
(t :underline t))
"Face for option `erc-keep-place-indicator-style'."
:group 'erc-faces)
(defface erc-keep-place-indicator-arrow
'((((class color) (min-colors 88) (background light))
(:foreground "PaleGreen3"))
(((class color) (min-colors 88) (background dark))
(:foreground "PaleGreen1"))
(t :inherit fringe))
"Face for arrow value of option `erc-keep-place-indicator-style'."
:group 'erc-faces)
(defvar-local erc--keep-place-indicator-overlay nil
"Overlay for `erc-keep-place-indicator-mode'.")
(defun erc--keep-place-indicator-on-window-configuration-change ()
"Maybe sync `erc--keep-place-indicator-overlay'.
Specifically, do so unless switching to or from another window in
the active frame."
(when erc-keep-place-indicator-follow
(unless (or (minibuffer-window-active-p (minibuffer-window))
(eq (window-old-buffer) (current-buffer)))
(when (< (overlay-end erc--keep-place-indicator-overlay)
(window-start)
erc-insert-marker)
(erc-keep-place-move (window-start))))))
(defun erc--keep-place-indicator-setup ()
"Initialize buffer for maintaining `erc--keep-place-indicator-overlay'."
(require 'fringe)
Add helper for restoring local session vars in ERC * lisp/erc/erc-common.el (erc--input-split): Suppress warning for obsolete variable `erc-send-this' in init form. * lisp/erc/erc-goodies.el (erc--keep-place-indicator-setup): Use macro `erc--restore-initialize-priors' to preserve last session's indicator position, if any. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Use convenience function to show missing-dependency notice. * lisp/erc/erc-sasl.el (erc-sasl-auth-source-password-as-host): Merge redundant `when' forms for clarity. (erc-sasl--init): Remove unused function. (erc-sasl-mode, erc-sasl-enable): Use helper to restore `erc-sasl--options', essentially inlining the body of the now defunct `erc-sasl--init'. * lisp/erc/erc.el (erc--restore-initialize-priors): New macro to help local modules and mode hooks prefer existing state over initializing anew. (erc--warn-once-before-connect): Add helper function to display an "error notice" just after module setup. (erc-accidental-paste-threshold-seconds) Improve doc string. * test/lisp/erc/erc-goodies-tests.el (erc-controls-highlight--examples, erc-controls-highlight--inverse, erc-controls-highlight--motd, erc-keep-place-indicator-mode): Remove feature check. For the latter, also start fake process and shadow `erc-connect-pre-hook'. * test/lisp/erc/erc-tests.el (erc--restore-initialize-priors): New test. Also see test/lisp/erc/erc-scenarios-base-local-modules.el for a more realistic exercising of this functionality. (Bug#60936)
2023-05-07 19:43:57 -07:00
(erc--restore-initialize-priors erc-keep-place-indicator-mode
erc--keep-place-indicator-overlay (make-overlay 0 0))
(add-hook 'erc-keep-place-mode-hook
#'erc--keep-place-indicator-on-global-module nil t)
(add-hook 'window-configuration-change-hook
#'erc--keep-place-indicator-on-window-configuration-change nil t)
(when-let* (((memq erc-keep-place-indicator-style '(t arrow)))
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
(ov-property (if (zerop (fringe-columns 'left))
'after-string
'before-string))
(display (if (zerop (fringe-columns 'left))
`((margin left-margin) ,overlay-arrow-string)
'(left-fringe right-triangle
erc-keep-place-indicator-arrow)))
(bef (propertize " " 'display display)))
Consider all windows in erc-scrolltobottom-mode * etc/ERC-NEWS: Add entry for option `erc-scrolltobottom-all', and mention explicit hook-depth intervals reserved by ERC. * lisp/erc/erc-backend.el (erc--hide-prompt): Change hook depth on `pre-command-hook' from 91 to 80. * lisp/erc/erc-goodies.el (erc-input-line-position): Mention secondary role when new option `erc-scroll-to-bottom-relaxed' is non-nil. (erc-scrolltobottom-all): New option that decides whether module `scrolltobottom' affects all windows or just the selected one, as it always has. (erc-scrolltobottom-relaxed): New option to leave the prompt stationary instead of forcing it to the bottom of the window. (erc-scrolltobottom-mode, erc-scrolltobottom-enable, erc-scrolltobottom-disable): Use `erc--scrolltobottom-setup' instead of `erc-add-scroll-to-bottom' for adding and removing local hooks and instead of ranging over buffers when removing them. Also add and remove new hook members when `erc-scrolltobottom-all' is non-nil. (erc--scrolltobottom-relaxed-commands, erc--scrolltobottom-window-info, erc--scrolltobottom-post-force-commands, erc--scrolltobottom-relaxed-skip-commands): New internal variables. (erc--scrolltobottom-on-pre-command erc--scrolltobottom-on-post-command): New functions resembling `erc-possibly-scroll-to-bottom' that try to avoid scrolling repeatedly for no reason. (erc--scrolltobottom-on-pre-command-relaxed, erc--scrolltobottom-on-post-command-relaxed): New commands to help implement `erc-scroll-to-bottom-relaxed'. (erc--scrolltobottom-at-prompt-minibuffer-active): New function to scroll to bottom on window configuration changes when using the minibuffer. (erc--scrolltobottom-all): New function to scroll all windows displaying the current buffer. (erc-add-scroll-to-bottom): Deprecate this function because it is now unused in the default client and trivial to implement otherwise. (erc--scrolltobottom-setup): New generic function to perform teardown as well as setup depending on the state of the module's mode variable. Also add an implementation specifically for `erc-scrolltobottom-all' that locally modifies different sets of hooks depending on `erc-scrolltobottom-relaxed'. (erc--scrolltobottom-on-pre-insert): New generic function that remembers the last `window-start' and maybe the current screen line before inserting a message, in order to restore it afterward. (erc--scrolltobottom-confirm): New function, a replacement for `erc-scroll-to-bottom' that returns non-nil when it's actually recentered the window. For now, used only when `erc-scrolltobottom-all' is enabled. (erc-move-to-prompt-setup): Add `erc-move-to-prompt' to `pre-command-hook' at a depth of 70 in the current buffer. (erc-keep-place-mode, erc-keep-place-enable): Change hook depth from 0 to 85. (erc--keep-place-indicator-setup): Add overlay arrow `after-string' in non-graphical settings in case users have time stamps or other content occupying the left margin. (erc-keep-place-indicator-mode, erc-keep-place-indicator-enable): Change hook depth from 90 to 85 locally so as not to conflict with a value of t, for append. (erc--keep-place-indicator-on-global-module): Change hook depth from 90 to 85 locally. * test/lisp/erc/erc-scenarios-scrolltobottom-relaxed.el: New file. * test/lisp/erc/erc-scenarios-scrolltobottom.el: New file. * test/lisp/erc/resources/erc-scenarios-common.el (erc-scenarios-common--term-size, erc-scenarios-common--run-in-term, erc-scenarios-common-interactive-debug-term-p, erc-scenarios-common-with-noninteractive-in-term): New test macro and supporting helper function and variables to facilitate running scenario-based tests in an inferior Emacs, in term-mode. (erc-scenarios-common--at-win-end-p, erc-scenarios-common--above-win-end-p, erc-scenarios-common--prompt-past-win-end-p, erc-scenarios-common--recenter-top-bottom-around, erc-scenarios-common--recenter-top-bottom, erc-scenarios-scrolltobottom--normal): New test fixture and assertion helper functions. * test/lisp/erc/resources/scrolltobottom/help.eld: New file. (Bug#64855)
2023-07-22 00:46:44 -07:00
(overlay-put erc--keep-place-indicator-overlay ov-property bef))
(when (memq erc-keep-place-indicator-style '(t face))
(overlay-put erc--keep-place-indicator-overlay 'face
'erc-keep-place-indicator-line)))
;;;###autoload(put 'keep-place-indicator 'erc--feature 'erc-goodies)
(define-erc-module keep-place-indicator nil
"Buffer-local `keep-place' with fringe arrow and/or highlighted face.
Play nice with global module `keep-place' but don't depend on it.
Expect that users may want different combinations of `keep-place'
and `keep-place-indicator' in different buffers."
((cond (erc-keep-place-mode)
((memq 'keep-place erc-modules)
(erc-keep-place-mode +1))
;; Enable a local version of `keep-place-mode'.
(t (add-hook 'erc-insert-pre-hook #'erc-keep-place 65 t)))
(if (pcase erc-keep-place-indicator-buffer-type
('target erc--target)
('server (not erc--target))
('t t))
(erc--keep-place-indicator-setup)
(erc-keep-place-indicator-mode -1)))
((when erc--keep-place-indicator-overlay
(delete-overlay erc--keep-place-indicator-overlay))
(remove-hook 'window-configuration-change-hook
#'erc--keep-place-indicator-on-window-configuration-change t)
(remove-hook 'erc-keep-place-mode-hook
#'erc--keep-place-indicator-on-global-module t)
(remove-hook 'erc-insert-pre-hook #'erc-keep-place t)
(kill-local-variable 'erc--keep-place-indicator-overlay))
'local)
(defun erc--keep-place-indicator-on-global-module ()
"Ensure `keep-place-indicator' can cope with `erc-keep-place-mode'.
That is, ensure the local module can survive a user toggling the
global one."
(if erc-keep-place-mode
(remove-hook 'erc-insert-pre-hook #'erc-keep-place t)
(add-hook 'erc-insert-pre-hook #'erc-keep-place 65 t)))
(defun erc-keep-place-move (pos)
"Move keep-place indicator to current line or POS.
For use with `keep-place-indicator' module. When called
interactively, interpret POS as an offset. Specifically, when
POS is a raw prefix arg, like (4), move the indicator to the
window's last line. When it's the minus sign, put it on the
window's first line. Interpret an integer as an offset in lines."
(interactive
(progn
(unless erc-keep-place-indicator-mode
(user-error "`erc-keep-place-indicator-mode' not enabled"))
(list (pcase current-prefix-arg
((and (pred integerp) v)
(save-excursion
(let ((inhibit-field-text-motion t))
(forward-line v)
(point))))
(`(,_) (1- (min erc-insert-marker (window-end))))
('- (min (1- erc-insert-marker) (window-start)))))))
(save-excursion
(let ((inhibit-field-text-motion t))
(when pos
(goto-char pos))
(move-overlay erc--keep-place-indicator-overlay
(line-beginning-position)
(line-end-position)))))
(defun erc-keep-place-goto ()
"Jump to keep-place indicator.
For use with `keep-place-indicator' module."
(interactive
(prog1 nil
(unless erc-keep-place-indicator-mode
(user-error "`erc-keep-place-indicator-mode' not enabled"))
(deactivate-mark)
(push-mark)))
(goto-char (overlay-start erc--keep-place-indicator-overlay))
(recenter (truncate (* (window-height) 0.25)) t)
(require 'pulse)
(when (pulse-available-p)
(pulse-momentary-highlight-overlay erc--keep-place-indicator-overlay)))
lisp/erc: Use lexical-binding Also remove various redundant `:group` arguments. * lisp/erc/erc-backend.el (define-erc-response-handler): Move `declare` after the docstring. * lisp/erc/erc-capab.el: Use lexical-binding. (erc-capab-identify-activate): Simplify with `member`. * lisp/erc/erc-dcc.el (erc-dcc): Move before erc-dcc-mode definition, which refers to it. (erc-dcc-chat-accept): Remove unused vars `nick` and `buffer`. * lisp/erc/erc-imenu.el: Use lexical-binding. (erc-create-imenu-index): Remove unused var `prev-pos`. * lisp/erc/erc-match.el: Use lexical-binding. (erc-match-message): Remove unused var `old-pt`. (erc-match-message): Strength-reduce `eval` to `symbol-value`. * lisp/erc/erc-page.el: Use lexical-binding. (erc-page): Move Custom group before `erg-page-mode` which refers to it. * lisp/erc/erc-replace.el: Use lexical-binding. (erc-replace-insert): Use `functionp`. * lisp/erc/erc-status-sidebar.el: Use lexical-binding. (erc-status-sidebar-open): Remove unused var `sidebar-window`. * lisp/erc/erc.el: Fix header to use the customary 3 semi-colons. (erc-fill-column): Declare variable. * lisp/erc/erc-autoaway.el: Use lexical-binding. * lisp/erc/erc-ezbounce.el: Use lexical-binding. * lisp/erc/erc-fill.el: Use lexical-binding. * lisp/erc/erc-goodies.el: Use lexical-binding. * lisp/erc/erc-ibuffer.el: Use lexical-binding. * lisp/erc/erc-identd.el: Use lexical-binding. * lisp/erc/erc-join.el: Use lexical-binding. * lisp/erc/erc-lang.el: Use lexical-binding. * lisp/erc/erc-log.el: Use lexical-binding. * lisp/erc/erc-menu.el: Use lexical-binding. * lisp/erc/erc-netsplit.el: Use lexical-binding. * lisp/erc/erc-networks.el: Use lexical-binding. * lisp/erc/erc-pcomplete.el: Use lexical-binding. * lisp/erc/erc-ring.el: Use lexical-binding. * lisp/erc/erc-speedbar.el: Use lexical-binding. * lisp/erc/erc-spelling.el: Use lexical-binding. * lisp/erc/erc-truncate.el: Use lexical-binding. * lisp/erc/erc-xdcc.el: Use lexical-binding.
2021-03-18 23:14:33 -04:00
(defun erc-keep-place (_ignored)
"Move point away from the last line in a non-selected ERC buffer."
(when (and (not (eq (window-buffer (selected-window))
(current-buffer)))
(>= (point) erc-insert-marker))
(deactivate-mark)
(goto-char (erc-beg-of-input-line))
(forward-line -1)
(when erc-keep-place-indicator-mode
(unless (or (minibuffer-window-active-p (selected-window))
(and (frame-visible-p (selected-frame))
(get-buffer-window (current-buffer) (selected-frame))))
(erc-keep-place-move nil)))
;; if `switch-to-buffer-preserve-window-point' is set,
;; we cannot rely on point being saved, and must commit
;; it to window-prev-buffers.
(when switch-to-buffer-preserve-window-point
(dolist (frame (frame-list))
(walk-window-tree
(lambda (window)
(let ((prev (assq (current-buffer)
(window-prev-buffers window))))
(when prev
(setf (nth 2 prev) (point-marker)))))
frame nil 'nominibuf)))))
;;; Distinguish non-commands
(defvar erc-noncommands-list '(erc-cmd-ME
erc-cmd-COUNTRY
erc-cmd-SV
erc-cmd-SM
Revive erc-command-indicator as new module * doc/misc/erc.texi: Add entry for `command-indicator' to Modules chapter. * etc/ERC-NEWS: Mention new module `command-indicator'. * lisp/erc/erc-goodies.el (erc-noncommands-list): Replace the nonexistent `erc-cmd-SMV' with function `erc-cmd-SAY'. (erc-noncommands-mode, erc-noncommands-enable, erc-noncommands-disable): Deprecate this module because it's a no-op. (erc-command-indicator-face, erc-command-indicator): Migrate from main library. (erc-command-indicator-mode, erc-command-indicator-enable, erc-command-indicator-disable): New module to take the spiritual place of `noncommands'. (erc-command-indicator): Move function here from main library, along with option namesake mentioned above. (erc-command-indicator-toggle-hidden): New command to toggle echoed command-line visibility. (erc--command-indicator-permit-insertion): New function. (erc--command-indicator-display): New function, a slightly revised version of the old `erc-display-command' from the main library. Its only call site was removed back in d1036d288de "backport: erc bugfixes". However, references were left behind to associated assets, like `erc-command-indicator', etc. The function was later commented out in 0c599ee2e2c "* lisp/erc/erc.el: Use `run-hook-with-args` for `erc-pre-send-functions`", and then removed by a63ed6f78a6 "Remove duplicate ERC prompt on reconnect". * lisp/erc/erc-match.el (erc-match-toggle-hidden-fools): Use new non-module-specific name for `erc-match--toggle-hidden'. (erc-match--toggle-hidden): Move to main library for shared use by other modules. * lisp/erc/erc.el (erc-hide-prompt): Leave note explaining updated role. (erc-command-indicator): Move option and function of same name to erc-goodies. (erc-command-indicator-face): Move to erc-goodies. (erc-modules): Remove module `noncommands' from standard value and Custom set. Add `command-indicator' to set. (erc--toggle-hidden): "New" function, a rebranded version of the utility `erc-match--toggle-hidden' from erc-match. (erc--send-input-lines): Accommodate modules wanting alternate insertion functions. (erc-load-irc-script-lines): Account for `erc-command-indicator' no longer being defined in this library. * test/lisp/erc/erc-scenarios-base-send-message.el (erc-scenarios-base-send-message--command-indicator): New test. * test/lisp/erc/erc-tests.el (erc-tests--modules): Remove deprecated module `noncommands' from manifest. (Bug#67031)
2023-11-10 13:34:31 -08:00
erc-cmd-SAY
erc-cmd-LASTLOG)
Revive erc-command-indicator as new module * doc/misc/erc.texi: Add entry for `command-indicator' to Modules chapter. * etc/ERC-NEWS: Mention new module `command-indicator'. * lisp/erc/erc-goodies.el (erc-noncommands-list): Replace the nonexistent `erc-cmd-SMV' with function `erc-cmd-SAY'. (erc-noncommands-mode, erc-noncommands-enable, erc-noncommands-disable): Deprecate this module because it's a no-op. (erc-command-indicator-face, erc-command-indicator): Migrate from main library. (erc-command-indicator-mode, erc-command-indicator-enable, erc-command-indicator-disable): New module to take the spiritual place of `noncommands'. (erc-command-indicator): Move function here from main library, along with option namesake mentioned above. (erc-command-indicator-toggle-hidden): New command to toggle echoed command-line visibility. (erc--command-indicator-permit-insertion): New function. (erc--command-indicator-display): New function, a slightly revised version of the old `erc-display-command' from the main library. Its only call site was removed back in d1036d288de "backport: erc bugfixes". However, references were left behind to associated assets, like `erc-command-indicator', etc. The function was later commented out in 0c599ee2e2c "* lisp/erc/erc.el: Use `run-hook-with-args` for `erc-pre-send-functions`", and then removed by a63ed6f78a6 "Remove duplicate ERC prompt on reconnect". * lisp/erc/erc-match.el (erc-match-toggle-hidden-fools): Use new non-module-specific name for `erc-match--toggle-hidden'. (erc-match--toggle-hidden): Move to main library for shared use by other modules. * lisp/erc/erc.el (erc-hide-prompt): Leave note explaining updated role. (erc-command-indicator): Move option and function of same name to erc-goodies. (erc-command-indicator-face): Move to erc-goodies. (erc-modules): Remove module `noncommands' from standard value and Custom set. Add `command-indicator' to set. (erc--toggle-hidden): "New" function, a rebranded version of the utility `erc-match--toggle-hidden' from erc-match. (erc--send-input-lines): Accommodate modules wanting alternate insertion functions. (erc-load-irc-script-lines): Account for `erc-command-indicator' no longer being defined in this library. * test/lisp/erc/erc-scenarios-base-send-message.el (erc-scenarios-base-send-message--command-indicator): New test. * test/lisp/erc/erc-tests.el (erc-tests--modules): Remove deprecated module `noncommands' from manifest. (Bug#67031)
2023-11-10 13:34:31 -08:00
"List of client \"slash commands\" that perform their own buffer I/O.
The `command-indicator' module forgoes echoing these commands,
most of which aren't actual interactive lisp commands.")
;;;###autoload(autoload 'erc-noncommands-mode "erc-goodies" nil t)
(define-erc-module noncommands nil
Revive erc-command-indicator as new module * doc/misc/erc.texi: Add entry for `command-indicator' to Modules chapter. * etc/ERC-NEWS: Mention new module `command-indicator'. * lisp/erc/erc-goodies.el (erc-noncommands-list): Replace the nonexistent `erc-cmd-SMV' with function `erc-cmd-SAY'. (erc-noncommands-mode, erc-noncommands-enable, erc-noncommands-disable): Deprecate this module because it's a no-op. (erc-command-indicator-face, erc-command-indicator): Migrate from main library. (erc-command-indicator-mode, erc-command-indicator-enable, erc-command-indicator-disable): New module to take the spiritual place of `noncommands'. (erc-command-indicator): Move function here from main library, along with option namesake mentioned above. (erc-command-indicator-toggle-hidden): New command to toggle echoed command-line visibility. (erc--command-indicator-permit-insertion): New function. (erc--command-indicator-display): New function, a slightly revised version of the old `erc-display-command' from the main library. Its only call site was removed back in d1036d288de "backport: erc bugfixes". However, references were left behind to associated assets, like `erc-command-indicator', etc. The function was later commented out in 0c599ee2e2c "* lisp/erc/erc.el: Use `run-hook-with-args` for `erc-pre-send-functions`", and then removed by a63ed6f78a6 "Remove duplicate ERC prompt on reconnect". * lisp/erc/erc-match.el (erc-match-toggle-hidden-fools): Use new non-module-specific name for `erc-match--toggle-hidden'. (erc-match--toggle-hidden): Move to main library for shared use by other modules. * lisp/erc/erc.el (erc-hide-prompt): Leave note explaining updated role. (erc-command-indicator): Move option and function of same name to erc-goodies. (erc-command-indicator-face): Move to erc-goodies. (erc-modules): Remove module `noncommands' from standard value and Custom set. Add `command-indicator' to set. (erc--toggle-hidden): "New" function, a rebranded version of the utility `erc-match--toggle-hidden' from erc-match. (erc--send-input-lines): Accommodate modules wanting alternate insertion functions. (erc-load-irc-script-lines): Account for `erc-command-indicator' no longer being defined in this library. * test/lisp/erc/erc-scenarios-base-send-message.el (erc-scenarios-base-send-message--command-indicator): New test. * test/lisp/erc/erc-tests.el (erc-tests--modules): Remove deprecated module `noncommands' from manifest. (Bug#67031)
2023-11-10 13:34:31 -08:00
"Treat commands that display themselves specially.
This module has been a no-op since ERC 5.3 and has likely only
ever made sense in the context of `erc-command-indicator'. It
was deprecated in ERC 5.6."
Preprocess prompt input linewise in ERC * etc/ERC-NEWS: Mention revised role of `erc-pre-send-functions' relative to line splitting. * lisp/erc/erc-common.el (erc-input): Add new slot `refoldp' to allow `erc-pre-send-functions' members to indicate that splitting should occur a second time after all members have had their say. (erc--input-split): Specify some defaults for overridden slots and explicitly declare some types for good measure. * lisp/erc/erc-goodies.el (erc-noncommands-mode, erc-noncommands-enable, erc-noncommands-disable): Replace `erc-pre-send-functions' with `erc--input-review-functions'. * lisp/erc/erc-ring.el (erc-ring-enable, erc-ring-disable, erc-ring-mode): Subscribe to `erc--input-review-functions' instead of `erc-pre-send-functions' for `erc--add-to-input-ring'. * lisp/erc/erc.el (erc-pre-send-functions): Note some nuances regarding line splitting in doc string and note that a new slot is available. (erc--pre-send-split-functions, erc--input-review-functions): Rename former to latter, while also obsoleting. Remove large comment. Add new default member `erc--run-input-validation-checks'. (erc-send-modify-hook): Replace the obsolete `erc-send-pre-hook' and `erc-send-this' with `erc-pre-send-functions' in doc string. (erc--check-prompt-input-for-excess-lines): Don't trim trailing blanks. Rework to also report overages in characters as well as lines. (erc--run-input-validation-hooks): New function to adapt an `erc--input-split' object to `erc--check-prompt-input-functions'. (erc-send-current-line): Run `erc--input-review-functions' in place of the validation hooks they've subsumed. Call `erc--send-input-lines' instead of the now retired but not deprecated `erc-send-input'. (erc--run-send-hooks, erc--send-input-lines): New functions that together form an alternate version of `erc-send-input'. They operate on input linewise but make accommodations for older interfaces. * test/lisp/erc/erc-tests.el (erc-ring-previous-command): Replace `erc-pre-send-functions' with `erc--input-review-functions'. (erc-tests--with-process-input-spy): Shadow `erc--input-review-functions'. (erc-check-prompt-input-for-excess-lines): Don't expect trailing blanks to be trimmed. (erc--run-send-hooks): New test. (Bug#62947)
2023-04-30 07:12:56 -07:00
((add-hook 'erc--input-review-functions #'erc-send-distinguish-noncommands))
((remove-hook 'erc--input-review-functions
#'erc-send-distinguish-noncommands)))
Revive erc-command-indicator as new module * doc/misc/erc.texi: Add entry for `command-indicator' to Modules chapter. * etc/ERC-NEWS: Mention new module `command-indicator'. * lisp/erc/erc-goodies.el (erc-noncommands-list): Replace the nonexistent `erc-cmd-SMV' with function `erc-cmd-SAY'. (erc-noncommands-mode, erc-noncommands-enable, erc-noncommands-disable): Deprecate this module because it's a no-op. (erc-command-indicator-face, erc-command-indicator): Migrate from main library. (erc-command-indicator-mode, erc-command-indicator-enable, erc-command-indicator-disable): New module to take the spiritual place of `noncommands'. (erc-command-indicator): Move function here from main library, along with option namesake mentioned above. (erc-command-indicator-toggle-hidden): New command to toggle echoed command-line visibility. (erc--command-indicator-permit-insertion): New function. (erc--command-indicator-display): New function, a slightly revised version of the old `erc-display-command' from the main library. Its only call site was removed back in d1036d288de "backport: erc bugfixes". However, references were left behind to associated assets, like `erc-command-indicator', etc. The function was later commented out in 0c599ee2e2c "* lisp/erc/erc.el: Use `run-hook-with-args` for `erc-pre-send-functions`", and then removed by a63ed6f78a6 "Remove duplicate ERC prompt on reconnect". * lisp/erc/erc-match.el (erc-match-toggle-hidden-fools): Use new non-module-specific name for `erc-match--toggle-hidden'. (erc-match--toggle-hidden): Move to main library for shared use by other modules. * lisp/erc/erc.el (erc-hide-prompt): Leave note explaining updated role. (erc-command-indicator): Move option and function of same name to erc-goodies. (erc-command-indicator-face): Move to erc-goodies. (erc-modules): Remove module `noncommands' from standard value and Custom set. Add `command-indicator' to set. (erc--toggle-hidden): "New" function, a rebranded version of the utility `erc-match--toggle-hidden' from erc-match. (erc--send-input-lines): Accommodate modules wanting alternate insertion functions. (erc-load-irc-script-lines): Account for `erc-command-indicator' no longer being defined in this library. * test/lisp/erc/erc-scenarios-base-send-message.el (erc-scenarios-base-send-message--command-indicator): New test. * test/lisp/erc/erc-tests.el (erc-tests--modules): Remove deprecated module `noncommands' from manifest. (Bug#67031)
2023-11-10 13:34:31 -08:00
(make-obsolete-variable 'erc-noncommand-mode
'erc-command-indicator-mode "30.1")
(make-obsolete 'erc-noncommand-mode 'erc-command-indicator-mode "30.1")
(make-obsolete 'erc-noncommand-enable 'erc-command-indicator-enable "30.1")
(make-obsolete 'erc-noncommand-disable 'erc-command-indicator-disable "30.1")
(defun erc-send-distinguish-noncommands (state)
"If STR is an ERC non-command, set `insertp' in STATE to nil."
(let* ((string (erc-input-string state))
(command (erc-extract-command-from-line string))
(cmd-fun (and command
(car command))))
(when (and cmd-fun
(not (string-match "\n.+$" string))
(memq cmd-fun erc-noncommands-list))
;; Inhibit sending this string.
(setf (erc-input-insertp state) nil))))
Revive erc-command-indicator as new module * doc/misc/erc.texi: Add entry for `command-indicator' to Modules chapter. * etc/ERC-NEWS: Mention new module `command-indicator'. * lisp/erc/erc-goodies.el (erc-noncommands-list): Replace the nonexistent `erc-cmd-SMV' with function `erc-cmd-SAY'. (erc-noncommands-mode, erc-noncommands-enable, erc-noncommands-disable): Deprecate this module because it's a no-op. (erc-command-indicator-face, erc-command-indicator): Migrate from main library. (erc-command-indicator-mode, erc-command-indicator-enable, erc-command-indicator-disable): New module to take the spiritual place of `noncommands'. (erc-command-indicator): Move function here from main library, along with option namesake mentioned above. (erc-command-indicator-toggle-hidden): New command to toggle echoed command-line visibility. (erc--command-indicator-permit-insertion): New function. (erc--command-indicator-display): New function, a slightly revised version of the old `erc-display-command' from the main library. Its only call site was removed back in d1036d288de "backport: erc bugfixes". However, references were left behind to associated assets, like `erc-command-indicator', etc. The function was later commented out in 0c599ee2e2c "* lisp/erc/erc.el: Use `run-hook-with-args` for `erc-pre-send-functions`", and then removed by a63ed6f78a6 "Remove duplicate ERC prompt on reconnect". * lisp/erc/erc-match.el (erc-match-toggle-hidden-fools): Use new non-module-specific name for `erc-match--toggle-hidden'. (erc-match--toggle-hidden): Move to main library for shared use by other modules. * lisp/erc/erc.el (erc-hide-prompt): Leave note explaining updated role. (erc-command-indicator): Move option and function of same name to erc-goodies. (erc-command-indicator-face): Move to erc-goodies. (erc-modules): Remove module `noncommands' from standard value and Custom set. Add `command-indicator' to set. (erc--toggle-hidden): "New" function, a rebranded version of the utility `erc-match--toggle-hidden' from erc-match. (erc--send-input-lines): Accommodate modules wanting alternate insertion functions. (erc-load-irc-script-lines): Account for `erc-command-indicator' no longer being defined in this library. * test/lisp/erc/erc-scenarios-base-send-message.el (erc-scenarios-base-send-message--command-indicator): New test. * test/lisp/erc/erc-tests.el (erc-tests--modules): Remove deprecated module `noncommands' from manifest. (Bug#67031)
2023-11-10 13:34:31 -08:00
;;; Command-indicator
(defface erc-command-indicator-face
'((t :inherit (erc-input-face fixed-pitch-serif)))
"Face for echoed command lines, including the prompt.
See option `erc-command-indicator'."
:package-version '(ERC . "5.6") ; standard value, from bold
:group 'erc-faces)
(defcustom erc-command-indicator 'erc-prompt
"Pseudo prompt for echoed command lines.
An analog of the option `erc-prompt' that replaces the \"speaker
label\" for echoed \"slash\" commands submitted at the prompt. A
value of nil means ERC only inserts the command-line portion
alone, without the prompt, which may trick certain modules, like
`fill', into treating the leading slash command itself as the
message's speaker."
:package-version '(ERC . "5.6")
:group 'erc-display
:type '(choice (const :tag "Defer to `erc-prompt'" erc-prompt)
(const :tag "Print command lines without a prompt" nil)
(string :tag "User-provided string")
(function :tag "User-provided function")))
;;;###autoload(autoload 'erc-command-indicator-mode "erc-goodies" nil t)
(define-erc-module command-indicator nil
"Echo command lines for \"slash commands,\" like /JOIN, /HELP, etc.
Skip those appearing in `erc-noncommands-list'.
Users can run \\[erc-command-indicator-toggle-hidden] to hide and
reveal echoed command lines after they've been inserted."
((add-hook 'erc--input-review-functions
#'erc--command-indicator-permit-insertion 80 t)
(erc-command-indicator-toggle-hidden -1))
((remove-hook 'erc--input-review-functions
#'erc--command-indicator-permit-insertion t)
(erc-command-indicator-toggle-hidden +1))
'local)
(defun erc-command-indicator ()
"Return the command-indicator prompt as a string.
Do nothing if the variable `erc-command-indicator' is nil."
(and erc-command-indicator
(let ((prompt (if (functionp erc-command-indicator)
(funcall erc-command-indicator)
erc-command-indicator)))
(concat prompt (and (not (string-empty-p prompt))
(not (string-suffix-p " " prompt))
" ")))))
(defun erc-command-indicator-toggle-hidden (arg)
"Toggle whether echoed \"slash commands\" are visible."
(interactive "P")
(erc--toggle-hidden 'command-indicator arg))
(defun erc--command-indicator-permit-insertion (state)
"Insert `erc-input' STATE's message if it's an echoed command."
(cl-assert erc-command-indicator-mode)
(when (erc--input-split-cmdp state)
(setf (erc--input-split-insertp state) #'erc--command-indicator-display)
(erc-send-distinguish-noncommands state)))
;; This function used to be called `erc-display-command'. It was
;; neutered in ERC 5.3.x (Emacs 24.5), commented out in 5.4, removed
;; in 5.5, and restored in 5.6.
(defun erc--command-indicator-display (line)
"Insert command LINE as echoed input resembling that of REPLs and shells."
(when erc-insert-this
(save-excursion
(erc--assert-input-bounds)
(let ((insert-position (marker-position (goto-char erc-insert-marker)))
(erc--msg-props (or erc--msg-props
(let ((ovs erc--msg-prop-overrides))
(map-into `((erc-msg . slash-cmd)
,@(reverse ovs))
'hash-table)))))
(when-let ((string (erc-command-indicator))
(erc-input-marker (copy-marker erc-input-marker)))
(erc-display-prompt nil nil string 'erc-command-indicator-face)
(remove-text-properties insert-position (point)
'(field nil erc-prompt nil))
(set-marker erc-input-marker nil))
(let ((beg (point)))
(insert line)
(erc-put-text-property beg (point)
'font-lock-face 'erc-command-indicator-face)
(insert "\n"))
(save-restriction
(narrow-to-region insert-position (point))
(run-hooks 'erc-send-modify-hook)
(run-hooks 'erc-send-post-hook)
(cl-assert (> (- (point-max) (point-min)) 1))
(erc--hide-message 'command-indicator)
(add-text-properties (point-min) (1+ (point-min))
(erc--order-text-properties-from-hash
erc--msg-props))))
(erc--refresh-prompt))))
;;; IRC control character processing.
(defgroup erc-control-characters nil
"Dealing with control characters."
:group 'erc)
(defcustom erc-interpret-controls-p t
"If non-nil, display IRC colors and other highlighting effects.
If this is set to the symbol `remove', ERC removes all IRC colors and
highlighting effects. When this variable is non-nil, it can cause Emacs to run
slowly on systems lacking sufficient CPU speed. In chatty channels, or in an
emergency (message flood) it can be turned off to save processing time. See
`erc-toggle-interpret-controls'."
:type '(choice (const :tag "Highlight control characters" t)
(const :tag "Remove control characters" remove)
(const :tag "Display raw control characters" nil)))
(defcustom erc-interpret-mirc-color nil
"If non-nil, ERC will interpret mIRC color codes."
:type 'boolean)
(defcustom erc-beep-p nil
"Beep if C-g is in the server message.
The value `erc-interpret-controls-p' must also be t for this to work."
:type 'boolean)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface erc-bold-face '((t :weight bold))
"ERC bold face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface erc-italic-face '((t :slant italic))
"ERC italic face."
:group 'erc-faces)
(defface erc-inverse-face
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
'((t :foreground "White" :background "Black"))
"ERC inverse face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface erc-spoiler-face
'((((background light)) :foreground "DimGray" :background "DimGray")
(((background dark)) :foreground "LightGray" :background "LightGray"))
"ERC spoiler face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface erc-underline-face '((t :underline t))
"ERC underline face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface fg:erc-color-face0 '((t :foreground "White"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface fg:erc-color-face1 '((t :foreground "black"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface fg:erc-color-face2 '((t :foreground "blue4"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface fg:erc-color-face3 '((t :foreground "green4"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface fg:erc-color-face4 '((t :foreground "red"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface fg:erc-color-face5 '((t :foreground "brown"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface fg:erc-color-face6 '((t :foreground "purple"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface fg:erc-color-face7 '((t :foreground "orange"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface fg:erc-color-face8 '((t :foreground "yellow"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface fg:erc-color-face9 '((t :foreground "green"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface fg:erc-color-face10 '((t :foreground "lightblue1"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface fg:erc-color-face11 '((t :foreground "cyan"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface fg:erc-color-face12 '((t :foreground "blue"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface fg:erc-color-face13 '((t :foreground "deeppink"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface fg:erc-color-face14 '((t :foreground "gray50"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface fg:erc-color-face15 '((t :foreground "gray90"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface bg:erc-color-face0 '((t :background "White"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface bg:erc-color-face1 '((t :background "black"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface bg:erc-color-face2 '((t :background "blue4"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface bg:erc-color-face3 '((t :background "green4"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface bg:erc-color-face4 '((t :background "red"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface bg:erc-color-face5 '((t :background "brown"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface bg:erc-color-face6 '((t :background "purple"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface bg:erc-color-face7 '((t :background "orange"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface bg:erc-color-face8 '((t :background "yellow"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface bg:erc-color-face9 '((t :background "green"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface bg:erc-color-face10 '((t :background "lightblue1"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface bg:erc-color-face11 '((t :background "cyan"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface bg:erc-color-face12 '((t :background "blue"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface bg:erc-color-face13 '((t :background "deeppink"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface bg:erc-color-face14 '((t :background "gray50"))
"ERC face."
:group 'erc-faces)
Face cleanups. Remove some uses of old-style face spec and :bold/:italic. * faces.el (set-face-attribute): Doc fix. (modify-face): Don't use :bold and :italic. (error, warning, success): Tweak definitions. * cus-edit.el (custom-modified, custom-invalid, custom-rogue) (custom-modified, custom-set, custom-changed, custom-themed) (custom-saved, custom-button, custom-button-mouse) (custom-button-pressed, custom-state, custom-comment-tag) (custom-variable-tag, custom-group-tag-1, custom-group-tag) (custom-group-subtitle): Use new-style face specs. (custom-invalid-face, custom-rogue-face, custom-modified-face) (custom-set-face, custom-changed-face, custom-saved-face) (custom-button-face, custom-button-pressed-face) (custom-documentation-face, custom-state-face) (custom-comment-face, custom-comment-tag-face) (custom-variable-tag-face, custom-variable-button-face) (custom-face-tag-face, custom-group-tag-face-1) (custom-group-tag-face): Remove obsolete face alias. * epa.el (epa-validity-high, epa-validity-medium) (epa-validity-low, epa-mark, epa-field-name, epa-string) (epa-field-name, epa-field-body): * font-lock.el (font-lock-comment-face, font-lock-string-face) (font-lock-keyword-face, font-lock-builtin-face) (font-lock-function-name-face, font-lock-variable-name-face) (font-lock-type-face, font-lock-constant-face): * ido.el (ido-first-match, ido-only-match, ido-subdir) (ido-virtual, ido-indicator, ido-incomplete-regexp): * speedbar.el (speedbar-button-face, speedbar-file-face) (speedbar-directory-face, speedbar-tag-face) (speedbar-selected-face, speedbar-highlight-face) (speedbar-separator-face): * whitespace.el (whitespace-newline, whitespace-space) (whitespace-hspace, whitespace-tab, whitespace-trailing) (whitespace-line, whitespace-space-before-tab) (whitespace-space-after-tab, whitespace-indentation) (whitespace-empty): * emulation/cua-base.el (cua-global-mark): * eshell/em-prompt.el (eshell-prompt): * net/newst-plainview.el (newsticker-new-item-face) (newsticker-old-item-face, newsticker-immortal-item-face) (newsticker-obsolete-item-face, newsticker-date-face) (newsticker-statistics-face, newsticker-default-face): * net/newst-reader.el (newsticker-feed-face) (newsticker-extra-face, newsticker-enclosure-face): * net/newst-treeview.el (newsticker-treeview-face) (newsticker-treeview-new-face, newsticker-treeview-old-face) (newsticker-treeview-immortal-face) (newsticker-treeview-obsolete-face) (newsticker-treeview-selection-face): * net/rcirc.el (rcirc-my-nick, rcirc-other-nick) (rcirc-bright-nick, rcirc-server, rcirc-timestamp) (rcirc-nick-in-message, rcirc-nick-in-message-full-line) (rcirc-prompt, rcirc-track-keyword, rcirc-url, rcirc-keyword): * nxml/nxml-outln.el (nxml-heading, nxml-outline-indicator) (nxml-outline-active-indicator, nxml-outline-ellipsis): * play/mpuz.el (mpuz-unsolved, mpuz-solved, mpuz-trivial) (mpuz-text): * progmodes/vera-mode.el (vera-font-lock-number) (vera-font-lock-function, vera-font-lock-interface): * textmodes/table.el (table-cell): Use new-style face specs, and don't use the old :bold and :italic attributes. * erc-button.el (erc-button): * erc-goodies.el (erc-bold-face, erc-inverse-face) (erc-underline-face, fg:erc-color-*): * erc-match.el (erc-current-nick-face, erc-dangerous-host-face) (erc-pal-face, erc-fool-face, erc-keyword-face): * erc-stamp.el (erc-timestamp-face): Likewise. * erc.el (erc-direct-msg-face, erc-header-line, erc-input-face) (erc-command-indicator-face, erc-notice-face, erc-action-face) (erc-error-face, erc-my-nick-face, erc-nick-default-face) (erc-nick-msg-face): Use new-style face specs, and avoid :bold. * progmodes/ebrowse.el (ebrowse-tree-mark, ebrowse-root-class) (ebrowse-member-attribute, ebrowse-default, ebrowse-file-name) (ebrowse-member-class, ebrowse-progress): Likewise. (ebrowse-tree-mark-face, ebrowse-root-class-face) (ebrowse-file-name-face, ebrowse-default-face) (ebrowse-member-attribute-face, ebrowse-member-class-face) (ebrowse-progress-face): Remove obsolete faces. * progmodes/flymake.el (flymake-errline, flymake-warnline): Inherit from error and warning faces respectively. * textmodes/flyspell.el (flyspell-incorrect, flyspell-duplicate): Likewise. (flyspell-incorrect-face, flyspell-duplicate-face): Remove obsolete aliases. * display.texi (Face Attributes): Font family does not accept wildcards. De-document obsolete :bold and :italic attributes. (Defining Faces): Use new-style face spec format.
2012-06-09 00:39:49 +08:00
(defface bg:erc-color-face15 '((t :background "gray90"))
"ERC face."
:group 'erc-faces)
;; https://lists.gnu.org/archive/html/emacs-erc/2021-07/msg00005.html
(defvar erc--controls-additional-colors
["#470000" "#472100" "#474700" "#324700" "#004700" "#00472c"
"#004747" "#002747" "#000047" "#2e0047" "#470047" "#47002a"
"#740000" "#743a00" "#747400" "#517400" "#007400" "#007449"
"#007474" "#004074" "#000074" "#4b0074" "#740074" "#740045"
"#b50000" "#b56300" "#b5b500" "#7db500" "#00b500" "#00b571"
"#00b5b5" "#0063b5" "#0000b5" "#7500b5" "#b500b5" "#b5006b"
"#ff0000" "#ff8c00" "#ffff00" "#b2ff00" "#00ff00" "#00ffa0"
"#00ffff" "#008cff" "#0000ff" "#a500ff" "#ff00ff" "#ff0098"
"#ff5959" "#ffb459" "#ffff71" "#cfff60" "#6fff6f" "#65ffc9"
"#6dffff" "#59b4ff" "#5959ff" "#c459ff" "#ff66ff" "#ff59bc"
"#ff9c9c" "#ffd39c" "#ffff9c" "#e2ff9c" "#9cff9c" "#9cffdb"
"#9cffff" "#9cd3ff" "#9c9cff" "#dc9cff" "#ff9cff" "#ff94d3"
"#000000" "#131313" "#282828" "#363636" "#4d4d4d" "#656565"
"#818181" "#9f9f9f" "#bcbcbc" "#e2e2e2" "#ffffff"])
(defun erc-get-bg-color-face (n)
"Fetches the right face for background color N (0-15)."
(if (stringp n) (setq n (string-to-number n)))
(if (not (numberp n))
2007-09-08 03:07:09 +00:00
(prog1 'default
(erc-error "erc-get-bg-color-face: n is NaN: %S" n))
(when (> n 99)
(erc-log (format " Wrong color: %s" n))
(setq n (mod n 16)))
(cond
((and (>= n 0) (< n 16))
(intern (concat "bg:erc-color-face" (number-to-string n))))
((< 15 n 99)
(list :background (aref erc--controls-additional-colors (- n 16))))
(t (erc-log (format " Wrong color: %s" n)) '(default)))))
(defun erc-get-fg-color-face (n)
"Fetches the right face for foreground color N (0-15)."
(if (stringp n) (setq n (string-to-number n)))
(if (not (numberp n))
2007-09-08 03:07:09 +00:00
(prog1 'default
(erc-error "erc-get-fg-color-face: n is NaN: %S" n))
(when (> n 99)
(erc-log (format " Wrong color: %s" n))
(setq n (mod n 16)))
(cond
((and (>= n 0) (< n 16))
(intern (concat "fg:erc-color-face" (number-to-string n))))
((< 15 n 99)
(list :foreground (aref erc--controls-additional-colors (- n 16))))
(t (erc-log (format " Wrong color: %s" n)) '(default)))))
;;;###autoload(autoload 'erc-irccontrols-mode "erc-goodies" nil t)
(define-erc-module irccontrols nil
"This mode enables the interpretation of IRC control chars."
lisp/erc: Use lexical-binding Also remove various redundant `:group` arguments. * lisp/erc/erc-backend.el (define-erc-response-handler): Move `declare` after the docstring. * lisp/erc/erc-capab.el: Use lexical-binding. (erc-capab-identify-activate): Simplify with `member`. * lisp/erc/erc-dcc.el (erc-dcc): Move before erc-dcc-mode definition, which refers to it. (erc-dcc-chat-accept): Remove unused vars `nick` and `buffer`. * lisp/erc/erc-imenu.el: Use lexical-binding. (erc-create-imenu-index): Remove unused var `prev-pos`. * lisp/erc/erc-match.el: Use lexical-binding. (erc-match-message): Remove unused var `old-pt`. (erc-match-message): Strength-reduce `eval` to `symbol-value`. * lisp/erc/erc-page.el: Use lexical-binding. (erc-page): Move Custom group before `erg-page-mode` which refers to it. * lisp/erc/erc-replace.el: Use lexical-binding. (erc-replace-insert): Use `functionp`. * lisp/erc/erc-status-sidebar.el: Use lexical-binding. (erc-status-sidebar-open): Remove unused var `sidebar-window`. * lisp/erc/erc.el: Fix header to use the customary 3 semi-colons. (erc-fill-column): Declare variable. * lisp/erc/erc-autoaway.el: Use lexical-binding. * lisp/erc/erc-ezbounce.el: Use lexical-binding. * lisp/erc/erc-fill.el: Use lexical-binding. * lisp/erc/erc-goodies.el: Use lexical-binding. * lisp/erc/erc-ibuffer.el: Use lexical-binding. * lisp/erc/erc-identd.el: Use lexical-binding. * lisp/erc/erc-join.el: Use lexical-binding. * lisp/erc/erc-lang.el: Use lexical-binding. * lisp/erc/erc-log.el: Use lexical-binding. * lisp/erc/erc-menu.el: Use lexical-binding. * lisp/erc/erc-netsplit.el: Use lexical-binding. * lisp/erc/erc-networks.el: Use lexical-binding. * lisp/erc/erc-pcomplete.el: Use lexical-binding. * lisp/erc/erc-ring.el: Use lexical-binding. * lisp/erc/erc-speedbar.el: Use lexical-binding. * lisp/erc/erc-spelling.el: Use lexical-binding. * lisp/erc/erc-truncate.el: Use lexical-binding. * lisp/erc/erc-xdcc.el: Use lexical-binding.
2021-03-18 23:14:33 -04:00
((add-hook 'erc-insert-modify-hook #'erc-controls-highlight)
(add-hook 'erc-send-modify-hook #'erc-controls-highlight)
(erc--modify-local-map t "C-c C-c" #'erc-toggle-interpret-controls))
lisp/erc: Use lexical-binding Also remove various redundant `:group` arguments. * lisp/erc/erc-backend.el (define-erc-response-handler): Move `declare` after the docstring. * lisp/erc/erc-capab.el: Use lexical-binding. (erc-capab-identify-activate): Simplify with `member`. * lisp/erc/erc-dcc.el (erc-dcc): Move before erc-dcc-mode definition, which refers to it. (erc-dcc-chat-accept): Remove unused vars `nick` and `buffer`. * lisp/erc/erc-imenu.el: Use lexical-binding. (erc-create-imenu-index): Remove unused var `prev-pos`. * lisp/erc/erc-match.el: Use lexical-binding. (erc-match-message): Remove unused var `old-pt`. (erc-match-message): Strength-reduce `eval` to `symbol-value`. * lisp/erc/erc-page.el: Use lexical-binding. (erc-page): Move Custom group before `erg-page-mode` which refers to it. * lisp/erc/erc-replace.el: Use lexical-binding. (erc-replace-insert): Use `functionp`. * lisp/erc/erc-status-sidebar.el: Use lexical-binding. (erc-status-sidebar-open): Remove unused var `sidebar-window`. * lisp/erc/erc.el: Fix header to use the customary 3 semi-colons. (erc-fill-column): Declare variable. * lisp/erc/erc-autoaway.el: Use lexical-binding. * lisp/erc/erc-ezbounce.el: Use lexical-binding. * lisp/erc/erc-fill.el: Use lexical-binding. * lisp/erc/erc-goodies.el: Use lexical-binding. * lisp/erc/erc-ibuffer.el: Use lexical-binding. * lisp/erc/erc-identd.el: Use lexical-binding. * lisp/erc/erc-join.el: Use lexical-binding. * lisp/erc/erc-lang.el: Use lexical-binding. * lisp/erc/erc-log.el: Use lexical-binding. * lisp/erc/erc-menu.el: Use lexical-binding. * lisp/erc/erc-netsplit.el: Use lexical-binding. * lisp/erc/erc-networks.el: Use lexical-binding. * lisp/erc/erc-pcomplete.el: Use lexical-binding. * lisp/erc/erc-ring.el: Use lexical-binding. * lisp/erc/erc-speedbar.el: Use lexical-binding. * lisp/erc/erc-spelling.el: Use lexical-binding. * lisp/erc/erc-truncate.el: Use lexical-binding. * lisp/erc/erc-xdcc.el: Use lexical-binding.
2021-03-18 23:14:33 -04:00
((remove-hook 'erc-insert-modify-hook #'erc-controls-highlight)
(remove-hook 'erc-send-modify-hook #'erc-controls-highlight)
(erc--modify-local-map nil "C-c C-c" #'erc-toggle-interpret-controls)))
;; These patterns were moved here to circumvent compiler warnings but
;; otherwise translated verbatim from their original string-literal
;; definitions (minus a small bug fix to satisfy newly added tests).
(defvar erc-controls-remove-regexp
(rx (or ?\C-b ?\C-\] ?\C-_ ?\C-v ?\C-g ?\C-o
(: ?\C-c (? (any "0-9")) (? (any "0-9"))
(? (group ?, (any "0-9") (? (any "0-9")))))))
"Regular expression matching control characters to remove.")
;; Before the change to `rx', group 3 used to be a sibling of group 2.
;; This was assumed to be a bug. A few minor simplifications were
;; also performed. If incorrect, please admonish.
(defvar erc-controls-highlight-regexp
(rx (group (or ?\C-b ?\C-\] ?\C-v ?\C-_ ?\C-g ?\C-o
(: ?\C-c (? (group (** 1 2 (any "0-9")))
(? (group ?, (group (** 1 2 (any "0-9")))))))))
(group (* (not (any ?\C-b ?\C-c ?\C-g ?\n ?\C-o ?\C-v ?\C-\] ?\C-_)))))
"Regular expression matching control chars to highlight.")
(defun erc-controls-interpret (str)
"Return a copy of STR after dealing with IRC control characters.
See `erc-interpret-controls-p' and `erc-interpret-mirc-color' for options."
(when str
(let ((s str))
(cond ((eq erc-interpret-controls-p 'remove)
(erc-controls-strip s))
(erc-interpret-controls-p
(let ((boldp nil)
(italicp nil)
(inversep nil)
(underlinep nil)
(fg nil)
(bg nil))
(while (string-match erc-controls-highlight-regexp s)
(let ((control (match-string 1 s))
(fg-color (match-string 2 s))
(bg-color (match-string 4 s))
(start (match-beginning 0))
(end (+ (match-beginning 0)
(length (match-string 5 s)))))
(setq s (replace-match "" nil nil s 1))
(cond ((and erc-interpret-mirc-color (or fg-color bg-color))
(setq fg fg-color)
(setq bg bg-color))
((string= control "\C-b")
(setq boldp (not boldp)))
((string= control "\C-]")
(setq italicp (not italicp)))
((string= control "\C-v")
(setq inversep (not inversep)))
((string= control "\C-_")
(setq underlinep (not underlinep)))
((string= control "\C-c")
(setq fg nil
bg nil))
((string= control "\C-g")
(when erc-beep-p
(ding)))
((string= control "\C-o")
(setq boldp nil
italicp nil
inversep nil
underlinep nil
fg nil
bg nil))
(t nil))
(erc-controls-propertize
start end boldp italicp inversep underlinep fg bg s)))
s))
(t s)))))
;;;###autoload
(defun erc-controls-strip (str)
"Return a copy of STR with all IRC control characters removed."
(when str
(let ((s str))
(while (string-match erc-controls-remove-regexp s)
(setq s (replace-match "" nil nil s)))
s)))
(defun erc-controls-highlight ()
"Highlight IRC control chars in the buffer.
This is useful for `erc-insert-modify-hook' and `erc-send-modify-hook'.
Also see `erc-interpret-controls-p' and `erc-interpret-mirc-color'."
(goto-char (point-min))
(cond ((eq erc-interpret-controls-p 'remove)
(while (re-search-forward erc-controls-remove-regexp nil t)
(replace-match "")))
(erc-interpret-controls-p
(let ((boldp nil)
(italicp nil)
(inversep nil)
(underlinep nil)
(fg nil)
(bg nil))
(while (re-search-forward erc-controls-highlight-regexp nil t)
(let ((control (match-string 1))
(fg-color (match-string 2))
(bg-color (match-string 4))
(start (match-beginning 0))
(end (+ (match-beginning 0) (length (match-string 5)))))
(replace-match "" nil nil nil 1)
(cond ((and erc-interpret-mirc-color (or fg-color bg-color))
(setq fg fg-color)
(setq bg bg-color))
((string= control "\C-b")
(setq boldp (not boldp)))
((string= control "\C-]")
(setq italicp (not italicp)))
((string= control "\C-v")
(setq inversep (not inversep)))
((string= control "\C-_")
(setq underlinep (not underlinep)))
((string= control "\C-c")
(setq fg nil
bg nil))
((string= control "\C-g")
(when erc-beep-p
(ding)))
((string= control "\C-o")
(setq boldp nil
italicp nil
inversep nil
underlinep nil
fg nil
bg nil))
(t nil))
(erc-controls-propertize start end
boldp italicp inversep underlinep fg bg)))))
(t nil)))
(defun erc-controls-propertize (from to boldp italicp inversep underlinep fg bg
&optional str)
"Prepend properties from IRC control characters between FROM and TO.
If optional argument STR is provided, apply to STR, otherwise prepend properties
to a region in the current buffer."
(if (and fg bg (equal fg bg))
(progn
(setq fg 'erc-spoiler-face
bg nil)
(put-text-property from to 'mouse-face 'erc-inverse-face str))
(when fg (setq fg (erc-get-fg-color-face fg)))
(when bg (setq bg (erc-get-bg-color-face bg))))
(font-lock-prepend-text-property
from
to
'font-lock-face
(append (if boldp
'(erc-bold-face)
nil)
(if italicp
'(erc-italic-face)
nil)
(if inversep
'(erc-inverse-face)
nil)
(if underlinep
'(erc-underline-face)
nil)
(if fg
(list fg)
nil)
(if bg
(list bg)
nil))
str)
str)
(defun erc-toggle-interpret-controls (&optional arg)
"Toggle interpretation of control sequences in messages.
If ARG is positive, interpretation is turned on.
Else interpretation is turned off."
(interactive "P")
(cond ((and (numberp arg) (> arg 0))
(setq erc-interpret-controls-p t))
(arg (setq erc-interpret-controls-p nil))
(t (setq erc-interpret-controls-p (not erc-interpret-controls-p))))
(message "ERC color interpretation %s"
(if erc-interpret-controls-p "ON" "OFF")))
;; Smiley
;;;###autoload(autoload 'erc-smiley-mode "erc-goodies" nil t)
(define-erc-module smiley nil
"This mode translates text-smileys such as :-) into pictures.
This requires the function `smiley-region', which is defined in
smiley.el, which is part of Gnus."
lisp/erc: Use lexical-binding Also remove various redundant `:group` arguments. * lisp/erc/erc-backend.el (define-erc-response-handler): Move `declare` after the docstring. * lisp/erc/erc-capab.el: Use lexical-binding. (erc-capab-identify-activate): Simplify with `member`. * lisp/erc/erc-dcc.el (erc-dcc): Move before erc-dcc-mode definition, which refers to it. (erc-dcc-chat-accept): Remove unused vars `nick` and `buffer`. * lisp/erc/erc-imenu.el: Use lexical-binding. (erc-create-imenu-index): Remove unused var `prev-pos`. * lisp/erc/erc-match.el: Use lexical-binding. (erc-match-message): Remove unused var `old-pt`. (erc-match-message): Strength-reduce `eval` to `symbol-value`. * lisp/erc/erc-page.el: Use lexical-binding. (erc-page): Move Custom group before `erg-page-mode` which refers to it. * lisp/erc/erc-replace.el: Use lexical-binding. (erc-replace-insert): Use `functionp`. * lisp/erc/erc-status-sidebar.el: Use lexical-binding. (erc-status-sidebar-open): Remove unused var `sidebar-window`. * lisp/erc/erc.el: Fix header to use the customary 3 semi-colons. (erc-fill-column): Declare variable. * lisp/erc/erc-autoaway.el: Use lexical-binding. * lisp/erc/erc-ezbounce.el: Use lexical-binding. * lisp/erc/erc-fill.el: Use lexical-binding. * lisp/erc/erc-goodies.el: Use lexical-binding. * lisp/erc/erc-ibuffer.el: Use lexical-binding. * lisp/erc/erc-identd.el: Use lexical-binding. * lisp/erc/erc-join.el: Use lexical-binding. * lisp/erc/erc-lang.el: Use lexical-binding. * lisp/erc/erc-log.el: Use lexical-binding. * lisp/erc/erc-menu.el: Use lexical-binding. * lisp/erc/erc-netsplit.el: Use lexical-binding. * lisp/erc/erc-networks.el: Use lexical-binding. * lisp/erc/erc-pcomplete.el: Use lexical-binding. * lisp/erc/erc-ring.el: Use lexical-binding. * lisp/erc/erc-speedbar.el: Use lexical-binding. * lisp/erc/erc-spelling.el: Use lexical-binding. * lisp/erc/erc-truncate.el: Use lexical-binding. * lisp/erc/erc-xdcc.el: Use lexical-binding.
2021-03-18 23:14:33 -04:00
((add-hook 'erc-insert-modify-hook #'erc-smiley)
(add-hook 'erc-send-modify-hook #'erc-smiley))
((remove-hook 'erc-insert-modify-hook #'erc-smiley)
(remove-hook 'erc-send-modify-hook #'erc-smiley)))
(defun erc-smiley ()
"Smilify a region.
This function should be used with `erc-insert-modify-hook'."
(when (fboundp 'smiley-region)
(smiley-region (point-min) (point-max))))
;; Unmorse
;;;###autoload(autoload 'erc-unmorse-mode "erc-goodies" nil t)
(define-erc-module unmorse nil
"This mode causes morse code in the current channel to be unmorsed."
lisp/erc: Use lexical-binding Also remove various redundant `:group` arguments. * lisp/erc/erc-backend.el (define-erc-response-handler): Move `declare` after the docstring. * lisp/erc/erc-capab.el: Use lexical-binding. (erc-capab-identify-activate): Simplify with `member`. * lisp/erc/erc-dcc.el (erc-dcc): Move before erc-dcc-mode definition, which refers to it. (erc-dcc-chat-accept): Remove unused vars `nick` and `buffer`. * lisp/erc/erc-imenu.el: Use lexical-binding. (erc-create-imenu-index): Remove unused var `prev-pos`. * lisp/erc/erc-match.el: Use lexical-binding. (erc-match-message): Remove unused var `old-pt`. (erc-match-message): Strength-reduce `eval` to `symbol-value`. * lisp/erc/erc-page.el: Use lexical-binding. (erc-page): Move Custom group before `erg-page-mode` which refers to it. * lisp/erc/erc-replace.el: Use lexical-binding. (erc-replace-insert): Use `functionp`. * lisp/erc/erc-status-sidebar.el: Use lexical-binding. (erc-status-sidebar-open): Remove unused var `sidebar-window`. * lisp/erc/erc.el: Fix header to use the customary 3 semi-colons. (erc-fill-column): Declare variable. * lisp/erc/erc-autoaway.el: Use lexical-binding. * lisp/erc/erc-ezbounce.el: Use lexical-binding. * lisp/erc/erc-fill.el: Use lexical-binding. * lisp/erc/erc-goodies.el: Use lexical-binding. * lisp/erc/erc-ibuffer.el: Use lexical-binding. * lisp/erc/erc-identd.el: Use lexical-binding. * lisp/erc/erc-join.el: Use lexical-binding. * lisp/erc/erc-lang.el: Use lexical-binding. * lisp/erc/erc-log.el: Use lexical-binding. * lisp/erc/erc-menu.el: Use lexical-binding. * lisp/erc/erc-netsplit.el: Use lexical-binding. * lisp/erc/erc-networks.el: Use lexical-binding. * lisp/erc/erc-pcomplete.el: Use lexical-binding. * lisp/erc/erc-ring.el: Use lexical-binding. * lisp/erc/erc-speedbar.el: Use lexical-binding. * lisp/erc/erc-spelling.el: Use lexical-binding. * lisp/erc/erc-truncate.el: Use lexical-binding. * lisp/erc/erc-xdcc.el: Use lexical-binding.
2021-03-18 23:14:33 -04:00
((add-hook 'erc-insert-modify-hook #'erc-unmorse))
((remove-hook 'erc-insert-modify-hook #'erc-unmorse)))
(defun erc-unmorse ()
"Unmorse some text.
Add this to `erc-insert-modify-hook' if you happen to be on a
channel that has weird people talking in morse to each other.
See also `unmorse-region'."
(goto-char (point-min))
(when (re-search-forward "[.-]+[./ -]*[.-]/?" nil t)
(save-restriction
(narrow-to-region (match-beginning 0) (match-end 0))
;; Turn " / " into " "
(goto-char (point-min))
(while (re-search-forward " / " nil t)
(replace-match " "))
;; Turn "/ " into "/"
(goto-char (point-min))
(while (re-search-forward "/ " nil t)
(replace-match "/"))
;; Unmorse region
(unmorse-region (point-min) (point-max)))))
;;; erc-occur
(defun erc-occur (string &optional proc)
"Search for STRING in all buffers related to current server.
If called interactively and prefix argument is given, search on all connected
servers. If called from a program, PROC specifies the server process."
(interactive
(list (read-string "Search for: ")
(if current-prefix-arg
nil erc-server-process)))
(multi-occur (erc-buffer-list nil proc) string))
(provide 'erc-goodies)
;;; erc-goodies.el ends here
;; Local Variables:
;; generated-autoload-file: "erc-loaddefs.el"
;; End: