Skip to content

Commit 8af96d8

Browse files
committed
; Address some ambiguities in ERC's documentation
* doc/misc/erc.texi: Change name of example function from `erc-my-enable-read-indicator-on-join' to `erc-my-enable-keep-place-indicator-on-join'. Fix example functions `erc-cmd-TRACK' and `erc-cmd-UNTRACK' to work with server buffers as well as target buffers. * etc/ERC-NEWS: Revise `keep-place' entry and make headlines less redundant. * lisp/erc/erc.el (erc-accidental-paste-threshold-seconds): Fix portion of existing wording that was more likely interpreted as a single multiline submission, whereas the intended meaning is three separate submissions.
1 parent f9f9c95 commit 8af96d8

File tree

3 files changed

+31
-23
lines changed

3 files changed

+31
-23
lines changed

doc/misc/erc.texi

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1218,15 +1218,14 @@ you aren't familiar with @samp{use-package} or have no interest in
12181218
learning it. For our purposes, it's just a means of presenting
12191219
configuration details in a tidy, standardized format. If it helps,
12201220
just pretend it's some make-believe, pseudo configuration language.
1221-
Although the syntax below is easy enough to intuit and adapt to your
1222-
setup, you may wish to keep the following in mind (or @pxref{Top,,,
1223-
use-package,}):
1221+
And while the syntax below is easy enough to intuit and adapt to your
1222+
setup, you may wish to keep the following in mind:
12241223

12251224
@itemize @bullet
12261225
@item
12271226
Each @code{use-package} ``declaration'' focuses on a library
12281227
``feature'', which is just a symbol you'd normally @code{require} in
1229-
your config @pxref{Named Features,,, elisp,}).
1228+
your config.
12301229

12311230
@item
12321231
Emacs loads anything in a @code{:config} section @emph{after} loading
@@ -1235,6 +1234,10 @@ whatever library @code{provide}s the declaration's feature.
12351234
@item
12361235
Everything in a @code{:custom} or @code{:custom-face} section is
12371236
basically something you'd find in your @code{custom-file}.
1237+
1238+
@item
1239+
For more info, @pxref{Named Features,,, elisp,}, or @pxref{Top,,,
1240+
use-package,}.
12381241
@end itemize
12391242

12401243
@noindent
@@ -1300,27 +1303,29 @@ settings (@pxref{Sample configuration via Customize}).
13001303
13011304
(use-package erc-goodies
13021305
;; Turn on read indicators when joining channels.
1303-
:hook (erc-join . my-erc-enable-read-indicator-on-join))
1306+
:hook (erc-join . my-erc-enable-keep-place-indicator-on-join))
13041307
13051308
(defvar my-erc-read-indicator-channels '("#emacs")
13061309
"Channels in which to show a `keep-place-indicator'.")
13071310
1308-
(defun my-erc-enable-read-indicator-on-join ()
1311+
(defun my-erc-enable-keep-place-indicator-on-join ()
13091312
"Enable read indicators for certain queries or channels."
13101313
(when (member (erc-default-target) my-erc-read-indicator-channels)
13111314
(erc-keep-place-indicator-mode +1)))
13121315
13131316
;; Handy commands from the Emacs Wiki.
13141317
(defun erc-cmd-TRACK (&optional target)
13151318
"Start tracking TARGET or that of current buffer."
1316-
(setq erc-track-exclude (delete (or target (erc-default-target))
1317-
erc-track-exclude)))
1319+
(setq erc-track-exclude
1320+
(delete (or target (erc-default-target) (current-buffer))
1321+
erc-track-exclude)))
13181322
13191323
(defun erc-cmd-UNTRACK (&optional target)
13201324
"Stop tracking TARGET or that of current buffer."
1321-
(setq erc-track-exclude (cl-pushnew (or target (erc-default-target))
1322-
erc-track-exclude
1323-
:test #'equal)))
1325+
(setq erc-track-exclude
1326+
(cl-pushnew (or target (erc-default-target) (current-buffer))
1327+
erc-track-exclude
1328+
:test #'equal)))
13241329
13251330
@end lisp
13261331

etc/ERC-NEWS

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,21 +15,22 @@ GNU Emacs since Emacs version 22.1.
1515
* Changes in ERC 5.6
1616

1717
** Module 'keep-place' has gained a more flamboyant cousin.
18-
Remember your place in ERC buffers a bit more easily while retaining
19-
the freedom to look around. Optionally sync the indicator to any
20-
progress made when you haven't yet caught up to the live stream. See
21-
options 'erc-keep-place-indicator-style' and friends, and try M-x
18+
Remember your place in ERC buffers more easily while retaining the
19+
freedom to look around, all with the help of a configurable, visible
20+
indicator. Optionally sync the indicator to any progress made when
21+
you haven't yet caught up to the live stream. See options
22+
'erc-keep-place-indicator-style' and friends, and try M-x
2223
keep-place-indicator-mode to see it in action.
2324

24-
** Module 'fill' now offers a style based on 'visual-line-mode'.
25+
** Module 'fill' offers a style based on 'visual-line-mode'.
2526
This fill style mimics the "hanging indent" look of 'erc-fill-static'
2627
and provides some movement and editing commands to optionally tame the
2728
less familiar aspects of 'visual-line' behavior. An interactive
2829
helper called 'erc-fill-wrap-nudge' allows for dynamic "refilling" of
2930
buffers on the fly. Set 'erc-fill-function' to 'erc-fill-wrap' to get
3031
started.
3132

32-
** A new module for nickname highlighting has joined ERC.
33+
** A module for nickname highlighting has joined ERC.
3334
Automatic nickname coloring has come to ERC core. Users familiar with
3435
'erc-hl-nicks', from which this module directly descends, will already
3536
be familiar with its suite of handy options. By default, each
@@ -140,7 +141,7 @@ This is especially handy when using the option 'erc-fill-wrap-merge'
140141
to omit repeated speaker tags, which can make message boundaries less
141142
detectable by tired eyes.
142143

143-
** Some keybindings are now set by modules rather than their libraries.
144+
** Modules rather than their libraries set major-mode keybindings.
144145
To put it another way, simply loading a built-in module's library no
145146
longer modifies 'erc-mode-map'. Instead, modifications occur during
146147
module setup. This should not impact most user configs since ERC
@@ -149,7 +150,7 @@ previously created. Note that while all affected bindings still
149150
reside in 'erc-mode-map', future built-in modules will use their own
150151
minor-mode maps, and new third-party modules should do the same.
151152

152-
** The option 'erc-timestamp-format-right' has been deprecated.
153+
** Option 'erc-timestamp-format-right' deprecated.
153154
Having to account for this option prevented other ERC modules from
154155
easily determining what right-hand stamps would look like before
155156
insertion, which is knowledge needed for certain UI decisions. The
@@ -270,7 +271,7 @@ encouraged to keep a module's name aligned with its group's as well as
270271
the provided feature of its containing library, if only for the usual
271272
reasons of namespace hygiene and discoverability.
272273

273-
*** ERC now supports arbitrary CHANTYPES.
274+
*** ERC supports arbitrary CHANTYPES.
274275
Specifically, channels can be prefixed with any predesignated
275276
character, mainly to afford more flexibility to specialty services,
276277
like bridges to other protocols.
@@ -281,7 +282,7 @@ specify a subcommand to actually carry out anything of consequence.
281282
Built-in modules can now provide more detailed help for a particular
282283
subcommand by telling ERC to defer to a specialized handler.
283284

284-
*** Longtime quasi modules have been made proper.
285+
*** Longtime quasi modules made proper.
285286
The 'fill' module is now defined by 'define-erc-module'. The same
286287
goes for ERC's imenu integration, which has 'imenu' now appearing in
287288
the default value of 'erc-modules'.
@@ -299,7 +300,7 @@ third-party code, the key takeaway is that more 'font-lock-face'
299300
properties encountered in the wild may be combinations of faces rather
300301
than lone ones.
301302

302-
*** Prompt input is split before 'erc-pre-send-functions' has a say.
303+
*** Prompt input split before 'erc-pre-send-functions' gets a say.
303304
Hook members are now treated to input whose lines have already been
304305
adjusted to fall within the allowed length limit. For convenience,
305306
third-party code can request that the final input be "re-filled" prior

lisp/erc/erc.el

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6350,7 +6350,9 @@ This option mainly prevents text accidentally entered into Emacs
63506350
from being sent to the server. Offending sources include
63516351
terminal multiplexers, desktop-automation scripts, and anything
63526352
capable of rapidly submitting successive lines of prompt input.
6353-
For example, entering \"one\\ntwo\\nthree\\n\" will send \"one\"
6353+
For example, if you could somehow manage to type \"one \\`RET'
6354+
two \\`RET' three \\`RET'\" at the prompt in less than
6355+
`erc-accidental-paste-threshold-seconds', ERC would send \"one\"
63546356
to the server, leave \"two\" at the prompt, and insert \"three\"
63556357
into an \"overflow\" buffer. See `erc-inhibit-multiline-input'
63566358
and `erc-warn-about-blank-lines' for suppression involving input

0 commit comments

Comments
 (0)