unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: "J.P." <jp@neverwas.me>
To: 60954@debbugs.gnu.org
Cc: emacs-erc@gnu.org
Subject: bug#60954: 30.0.50; ERC >5.5: Stop requiring erc-goodies in erc.el
Date: Sat, 21 Jan 2023 07:03:11 -0800	[thread overview]
Message-ID: <87edroj5g0.fsf__31448.491841887$1674313463$gmane$org@neverwas.me> (raw)
In-Reply-To: <87pmb9wyz6.fsf@neverwas.me> (J. P.'s message of "Thu, 19 Jan 2023 21:34:37 -0800")

[-- Attachment #1: Type: text/plain, Size: 3788 bytes --]

"J.P." <jp@neverwas.me> writes:

> diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el
> index 05a21019042..0bf4bb9537c 100644
> --- a/lisp/erc/erc-goodies.el
> +++ b/lisp/erc/erc-goodies.el
> @@ -38,9 +38,10 @@ erc-controls-highlight-regexp
> [...]
>  (declare-function erc-buffer-list "erc" (&optional predicate proc))
>  (declare-function erc-error "erc" (&rest args))
> @@ -384,9 +385,11 @@ erc-get-fg-color-face
>  (define-erc-module irccontrols nil
>    "This mode enables the interpretation of IRC control chars."
>    ((add-hook 'erc-insert-modify-hook #'erc-controls-highlight)
> -   (add-hook 'erc-send-modify-hook #'erc-controls-highlight))
> +   (add-hook 'erc-send-modify-hook #'erc-controls-highlight)
> +   (define-key erc-mode-map "\C-c\C-c" #'erc-toggle-interpret-controls))
>    ((remove-hook 'erc-insert-modify-hook #'erc-controls-highlight)
> -   (remove-hook 'erc-send-modify-hook #'erc-controls-highlight)))
> +   (remove-hook 'erc-send-modify-hook #'erc-controls-highlight)
> +   (erc-compat-call define-key erc-mode-map "\C-c\C-c" nil t)))

Actually, messing with `erc-mode-map' like this is sure to break
configs. Snippets like

  (with-eval-after-load 'erc
    (define-key erc-mode-map (kbd "RET") nil)
    (define-key erc-mode-map (kbd "C-c C-c") #'erc-send-current-line))

are fairly common [1]. Of course, mutating `erc-mode-map' is prevalent
throughout ERC [2], but we probably shouldn't perpetuate the practice.
If this were a brand new module, we could just give it its own
minor-mode map. But doing so now might just serve to confuse.

Here are two possibilities that seem relatively benign:

  1. Leave the original binding in `erc-mode-map' but autoload its
     command, `erc-toggle-interpret-controls', and make it smart enough
     to enable `erc-irccontrols-mode' when necessary and maybe print a
     message explaining why.

  2. Mutate the local map when the module's loaded, but only do so
     conditionally, by first checking to see if the key is taken
     (locally or in `erc-mode-map'). Likewise, only remove the binding
     if it's set to `erc-toggle-interpret-controls' locally.

Door #1 is more conservative because it introduces zero churn, AFAICT.
But without any plan for deprecation, it's tantamount to kicking the can
down the road. Door #2 keeps things more compartmentalized and walled
off (ERC does tout itself as being modular, after all), but there's a
nonzero chance of churn in some cases, for example, when

  - someone sets a binding for `erc-mode-map' after the module is loaded
  - some map depends on `erc-mode-map' as a parent

Otherwise, conditionally updating the current local map seems to have
the same functional effect here as using a minor-mode map and
conditionally overriding that in all ERC buffers (since this is a global
module).

The main downside I see for #2 is that it adds yet another facet of
complexity to an already cluttered landscape, seeing as minor-mode maps
are likely to become more common with the introduction of local modules.
Perhaps of less concern is that there's no precedent for it (in ERC).
That said, if we were to go bold and convert all `erc-mode-map'
mutations across all ERC libraries, it would at least offer some sense
of consistency and predictability going forward. (I suspect there may be
other downsides I've not yet considered, though, so if you're privy to
any, please do share.)

Because #1 is pretty easy to visualize, I've gone ahead and provided a
POC of #2 (for the `irccontrols' module only) in the third patch below.
Anyone interested, please have a look.

Thanks.


[1] See (info "(erc) Sample Configuration").

[2] See `erc-button-setup' and the modules toggles for `erc-sound' and
    `erc-ring' and top-level forms in erc-match.el and erc-log.el.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0000-v1-v2.diff --]
[-- Type: text/x-patch, Size: 2242 bytes --]

From a8bd3a2964babe131cb6c04dd14d7b537e1a90b2 Mon Sep 17 00:00:00 2001
From: "F. Jason Park" <jp@neverwas.me>
Date: Sat, 21 Jan 2023 06:35:53 -0800
Subject: [PATCH 0/4] *** NOT A PATCH ***

*** BLURB HERE ***

F. Jason Park (4):
  Don't load erc-goodies atop erc.el
  [5.6] Copy over upstream Compat macros to erc-compat
  [5.6] Don't require erc-goodies in erc.el
  [5.6] Convert ERC's Imenu integration into proper module

 lisp/erc/erc-backend.el |  2 +-
 lisp/erc/erc-common.el  | 10 ++++++++-
 lisp/erc/erc-compat.el  | 49 +++++++++++++++++++++++++++++++++--------
 lisp/erc/erc-goodies.el | 31 ++++++++++++++++----------
 lisp/erc/erc-imenu.el   | 19 ++++++++++++++++
 lisp/erc/erc.el         | 13 +++++++----
 6 files changed, 97 insertions(+), 27 deletions(-)

Interdiff:
diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el
index f6c1376bb58..01e51df0481 100644
--- a/lisp/erc/erc-goodies.el
+++ b/lisp/erc/erc-goodies.el
@@ -378,10 +378,22 @@ irccontrols
   "This mode enables the interpretation of IRC control chars."
   ((add-hook 'erc-insert-modify-hook #'erc-controls-highlight)
    (add-hook 'erc-send-modify-hook #'erc-controls-highlight)
-   (define-key erc-mode-map "\C-c\C-c" #'erc-toggle-interpret-controls))
+   (add-hook 'erc-mode-hook #'erc--irccontrols-on-major-mode))
   ((remove-hook 'erc-insert-modify-hook #'erc-controls-highlight)
    (remove-hook 'erc-send-modify-hook #'erc-controls-highlight)
-   (erc-compat-call define-key erc-mode-map "\C-c\C-c" nil t)))
+   (remove-hook 'erc-mode-hook #'erc--irccontrols-on-major-mode)
+   (erc-with-all-buffers-of-server nil nil
+      (erc--irccontrols-on-major-mode))))
+
+(defun erc--irccontrols-on-major-mode ()
+  ;; FIXME all these keymap-* functions require Compat 29
+  (if erc-irccontrols-mode
+      ;; Interrogate composed view of local map and `erc-mode-map'
+      (unless (keymap-lookup (current-local-map) "C-c C-c")
+        (keymap-local-set "C-c C-c" #'erc-toggle-interpret-controls))
+    (when (eq (keymap-local-lookup "C-c C-c")
+              #'erc-toggle-interpret-controls)
+      (keymap-local-unset "C-c C-c" t))))
 
 (defun erc-controls-interpret (str)
    "Return a copy of STR after dealing with IRC control characters.
-- 
2.38.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0001-Don-t-load-erc-goodies-atop-erc.el.patch --]
[-- Type: text/x-patch, Size: 1228 bytes --]

From 22e2577f4cd461d866254959572d85831715f61f Mon Sep 17 00:00:00 2001
From: "F. Jason Park" <jp@neverwas.me>
Date: Thu, 19 Jan 2023 20:19:40 -0800
Subject: [PATCH 1/4] Don't load erc-goodies atop erc.el

* lisp/erc/erc.el: Commit c2d657e7c4fd9685591f2120007eabf78745919d
"Move ERC's core dependencies to a separate file" ironed out ERC's
interwoven dependencies for the better but didn't cleanly sidestep the
goodies interdependency, specifically with regard to custom options.
This reverts the tiny portion impacting this aspect by once again
requiring `erc-goodies' at the very end of ERC's main library. Special
thanks to Libera.Chat user jrm for reporting this bug.
---
 lisp/erc/erc.el | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 7f51b7bfb2e..ff1820cfaf2 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -61,7 +61,6 @@
 (load "erc-loaddefs" 'noerror 'nomessage)
 
 (require 'erc-networks)
-(require 'erc-goodies)
 (require 'erc-backend)
 (require 'cl-lib)
 (require 'format-spec)
@@ -7386,4 +7385,6 @@ erc-handle-irc-url
 
 (provide 'erc)
 
+;; FIXME this is a temporary stopgap for Emacs 29.
+(require 'erc-goodies)
 ;;; erc.el ends here
-- 
2.38.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #4: 0002-5.6-Copy-over-upstream-Compat-macros-to-erc-compat.patch --]
[-- Type: text/x-patch, Size: 3995 bytes --]

From 2d4dce2e09890ad28edf056df0bc23d818ace185 Mon Sep 17 00:00:00 2001
From: "F. Jason Park" <jp@neverwas.me>
Date: Thu, 19 Jan 2023 20:52:47 -0800
Subject: [PATCH 2/4] [5.6] Copy over upstream Compat macros to erc-compat

* lisp/erc/erc-backend: (erc--get-isupport-entry): Replace call to
`erc-compat--with-memoization' with the built-in `with-memoization'.
* lisp/erc/erc-compat.el: (erc-compat-function, erc-compat-call): Add
new macros from Compat 29.1.2.0.
(erc-compat--with-memoization): Remove because it's now provided by
Compat.
---
 lisp/erc/erc-backend.el |  2 +-
 lisp/erc/erc-compat.el  | 49 +++++++++++++++++++++++++++++++++--------
 2 files changed, 41 insertions(+), 10 deletions(-)

diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index 1da701aebc4..f00c8b2841a 100644
--- a/lisp/erc/erc-backend.el
+++ b/lisp/erc/erc-backend.el
@@ -1878,7 +1878,7 @@ erc--get-isupport-entry
 primitive value."
   (if-let* ((table (or erc--isupport-params
                        (erc-with-server-buffer erc--isupport-params)))
-            (value (erc-compat--with-memoization (gethash key table)
+            (value (with-memoization (gethash key table)
                      (when-let ((v (assoc (symbol-name key)
                                           erc-server-parameters)))
                        (if (cdr v)
diff --git a/lisp/erc/erc-compat.el b/lisp/erc/erc-compat.el
index 5601ede27a5..fb354a1d3f7 100644
--- a/lisp/erc/erc-compat.el
+++ b/lisp/erc/erc-compat.el
@@ -34,6 +34,46 @@
 (require 'compat nil 'noerror)
 (eval-when-compile (require 'cl-lib) (require 'url-parse))
 
+;; Except for the "erc-" namespacing, these two definitions should be
+;; continuously updated to match the latest upstream ones verbatim.
+;; Although they're pretty simple, it's likely not worth checking for
+;; and possibly deferring to the non-prefixed versions.
+;;
+;; BEGIN Compat macros
+
+;;;; Macros for explicit compatibility function calls
+
+(defmacro erc-compat-function (fun)
+  "Return compatibility function symbol for FUN.
+
+If the Emacs version provides a sufficiently recent version of
+FUN, the symbol FUN is returned itself.  Otherwise the macro
+returns the symbol of a compatibility function which supports the
+behavior and calling convention of the current stable Emacs
+version.  For example Compat 29.1 will provide compatibility
+functions which implement the behavior and calling convention of
+Emacs 29.1.
+
+An example is the function `plist-get' which got an additional
+predicate argument in Emacs 29.  The compatibility function,
+which supports this additional argument can be obtained
+via (compat-function plist-get) and called with the additional
+predicate argument via (compat-call plist-get plist prop
+predicate).  It is not possible to directly call (plist-get plist
+prop predicate), since the function does not yet support the
+predicate argument on older Emacs versions and the Compat library
+does not override existing functions."
+  (let ((compat (intern (format "compat--%s" fun))))
+    `#',(if (fboundp compat) compat fun)))
+
+(defmacro erc-compat-call (fun &rest args)
+  "Call compatibility function or macro FUN with ARGS.
+See `compat-function' for details."
+  (let ((compat (intern (format "compat--%s" fun))))
+    `(,(if (fboundp compat) compat fun) ,@args)))
+
+;; END Compat macros
+
 ;;;###autoload(autoload 'erc-define-minor-mode "erc-compat")
 (define-obsolete-function-alias 'erc-define-minor-mode
   #'define-minor-mode "28.1")
@@ -368,15 +408,6 @@ erc-compat--29-sasl-scram--client-final-message
 
 ;;;; Misc 29.1
 
-(defmacro erc-compat--with-memoization (table &rest forms)
-  (declare (indent defun))
-  (cond
-   ((fboundp 'with-memoization)
-    `(with-memoization ,table ,@forms)) ; 29.1
-   ((fboundp 'cl--generic-with-memoization)
-    `(cl--generic-with-memoization ,table ,@forms))
-   (t `(progn ,@forms))))
-
 (defvar url-irc-function)
 
 (defun erc-compat--29-browse-url-irc (string &rest _)
-- 
2.38.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #5: 0003-5.6-Don-t-require-erc-goodies-in-erc.el.patch --]
[-- Type: text/x-patch, Size: 5504 bytes --]

From 1bf40a08fbc49b5cadc856f8717cec642be1f06b Mon Sep 17 00:00:00 2001
From: "F. Jason Park" <jp@neverwas.me>
Date: Thu, 19 Jan 2023 21:07:27 -0800
Subject: [PATCH 3/4] [5.6] Don't require erc-goodies in erc.el

* lisp/erc/erc-common.el: (erc--features-to-modules): Add mappings
from erc-goodies.
* lisp/erc/erc-goodies.el: Sort `defvar' forward declarations for
maintainability.
(erc-irccontrols-mode, erc-enable-irccontrols,
erc-disable-irccontrols): Add and remove key for
`erc-toggle-interpret-controls' to `erc-mode-map'.
* lisp/erc/erc.el: Add some forward declarations from `erc-goodies'
and remove the `require' call for `erc-goodies' at the end of the
file.
(erc-mode-map): Remove C-c C-c binding for
`erc-toggle-interpret-controls'.
(erc-update-mode-line-buffer): Only strip control chars when
`erc-irccontrols-mode' is active.  This is arguably a minor breaking
change perhaps deserving of a NEWS entry.
---
 lisp/erc/erc-common.el  | 10 +++++++++-
 lisp/erc/erc-goodies.el | 23 +++++++++++++++++++----
 lisp/erc/erc.el         | 10 ++++++----
 3 files changed, 34 insertions(+), 9 deletions(-)

diff --git a/lisp/erc/erc-common.el b/lisp/erc/erc-common.el
index 994555acecf..e567a108191 100644
--- a/lisp/erc/erc-common.el
+++ b/lisp/erc/erc-common.el
@@ -96,7 +96,15 @@ erc--features-to-modules
     (erc-page page ctcp-page)
     (erc-sound sound ctcp-sound)
     (erc-stamp stamp timestamp)
-    (erc-services services nickserv))
+    (erc-services services nickserv)
+    (erc-goodies scrolltobottom)
+    (erc-goodies readonly)
+    (erc-goodies move-to-prompt)
+    (erc-goodies keep-place)
+    (erc-goodies noncommands)
+    (erc-goodies irccontrols)
+    (erc-goodies smiley)
+    (erc-goodies unmorse))
   "Migration alist mapping a library feature to module names.
 Keys need not be unique: a library may define more than one
 module.  Sometimes a module's downcased alias will be its
diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el
index 05a21019042..801c3276499 100644
--- a/lisp/erc/erc-goodies.el
+++ b/lisp/erc/erc-goodies.el
@@ -38,9 +38,10 @@ erc-controls-highlight-regexp
 (defvar erc-controls-remove-regexp)
 (defvar erc-input-marker)
 (defvar erc-insert-marker)
-(defvar erc-server-process)
-(defvar erc-modules)
 (defvar erc-log-p)
+(defvar erc-mode-map)
+(defvar erc-modules)
+(defvar erc-server-process)
 
 (declare-function erc-buffer-list "erc" (&optional predicate proc))
 (declare-function erc-error "erc" (&rest args))
@@ -384,9 +385,23 @@ erc-get-fg-color-face
 (define-erc-module irccontrols nil
   "This mode enables the interpretation of IRC control chars."
   ((add-hook 'erc-insert-modify-hook #'erc-controls-highlight)
-   (add-hook 'erc-send-modify-hook #'erc-controls-highlight))
+   (add-hook 'erc-send-modify-hook #'erc-controls-highlight)
+   (add-hook 'erc-mode-hook #'erc--irccontrols-on-major-mode))
   ((remove-hook 'erc-insert-modify-hook #'erc-controls-highlight)
-   (remove-hook 'erc-send-modify-hook #'erc-controls-highlight)))
+   (remove-hook 'erc-send-modify-hook #'erc-controls-highlight)
+   (remove-hook 'erc-mode-hook #'erc--irccontrols-on-major-mode)
+   (erc-with-all-buffers-of-server nil nil
+      (erc--irccontrols-on-major-mode))))
+
+(defun erc--irccontrols-on-major-mode ()
+  ;; FIXME all these keymap-* functions require Compat 29
+  (if erc-irccontrols-mode
+      ;; Interrogate composed view of local map and `erc-mode-map'
+      (unless (keymap-lookup (current-local-map) "C-c C-c")
+        (keymap-local-set "C-c C-c" #'erc-toggle-interpret-controls))
+    (when (eq (keymap-local-lookup "C-c C-c")
+              #'erc-toggle-interpret-controls)
+      (keymap-local-unset "C-c C-c" t))))
 
 (defun erc-controls-interpret (str)
    "Return a copy of STR after dealing with IRC control characters.
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index ff1820cfaf2..007f70b8671 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -134,11 +134,14 @@ erc-scripts
 
 ;; Forward declarations
 (defvar erc-message-parsed)
+(defvar erc-irccontrols-mode)
 
 (defvar tabbar--local-hlf)
 (defvar motif-version-string)
 (defvar gtk-version-string)
 
+(declare-function erc-controls-strip "erc-goodies" (str))
+
 ;; tunable connection and authentication parameters
 
 (defcustom erc-server nil
@@ -1188,7 +1191,6 @@ erc-mode-map
     (define-key map [home] #'erc-bol)
     (define-key map "\C-c\C-a" #'erc-bol)
     (define-key map "\C-c\C-b" #'erc-switch-to-buffer)
-    (define-key map "\C-c\C-c" #'erc-toggle-interpret-controls)
     (define-key map "\C-c\C-d" #'erc-input-action)
     (define-key map "\C-c\C-e" #'erc-toggle-ctcp-autoresponse)
     (define-key map "\C-c\C-f" #'erc-toggle-flood-control)
@@ -6847,7 +6849,9 @@ erc-update-mode-line-buffer
                   (?m . ,(erc-format-channel-modes))
                   (?n . ,(or (erc-current-nick) ""))
                   (?N . ,(erc-format-network))
-                  (?o . ,(or (erc-controls-strip erc-channel-topic) ""))
+                  (?o . ,(or (and erc-irccontrols-mode
+                                  (erc-controls-strip erc-channel-topic))
+                             ""))
                   (?p . ,(erc-port-to-string erc-session-port))
                   (?s . ,(erc-format-target-and/or-server))
                   (?S . ,(erc-format-target-and/or-network))
@@ -7385,6 +7389,4 @@ erc-handle-irc-url
 
 (provide 'erc)
 
-;; FIXME this is a temporary stopgap for Emacs 29.
-(require 'erc-goodies)
 ;;; erc.el ends here
-- 
2.38.1


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #6: 0004-5.6-Convert-ERC-s-Imenu-integration-into-proper-modu.patch --]
[-- Type: text/x-patch, Size: 4344 bytes --]

From a8bd3a2964babe131cb6c04dd14d7b537e1a90b2 Mon Sep 17 00:00:00 2001
From: "F. Jason Park" <jp@neverwas.me>
Date: Thu, 19 Jan 2023 21:07:27 -0800
Subject: [PATCH 4/4] [5.6] Convert ERC's Imenu integration into proper module

TODO: add news item once a section for 5.6 has been added.

* lisp/erc/erc-goodies.el: Don't add Imenu hooks to `erc-mode-hook' at
top level. Remove autoload for `erc-create-imenu-index' because it
already exists in the `erc-imenu' library.
(erc-imenu-setup) Move to erc-imenu.
* lisp/erc/erc-imenu.el (erc-imenu-setup): Move here from goodies.
(erc-imenu-mode, erc-imenu-enable, erc-imenu-disable): Create new
ERC module for Imenu.
* lisp/erc/erc.el (erc-modules): Add `imenu' to default value and
create menu item.  Update package-version.
---
 lisp/erc/erc-goodies.el |  8 --------
 lisp/erc/erc-imenu.el   | 19 +++++++++++++++++++
 lisp/erc/erc.el         |  4 +++-
 3 files changed, 22 insertions(+), 9 deletions(-)

diff --git a/lisp/erc/erc-goodies.el b/lisp/erc/erc-goodies.el
index 801c3276499..01e51df0481 100644
--- a/lisp/erc/erc-goodies.el
+++ b/lisp/erc/erc-goodies.el
@@ -29,8 +29,6 @@
 
 ;;; Code:
 
-;;; Imenu support
-
 (eval-when-compile (require 'cl-lib))
 (require 'erc-common)
 
@@ -48,12 +46,6 @@ erc-server-process
 (declare-function erc-extract-command-from-line "erc" (line))
 (declare-function erc-beg-of-input-line "erc" nil)
 
-(defun erc-imenu-setup ()
-  "Setup Imenu support in an ERC buffer."
-  (setq-local imenu-create-index-function #'erc-create-imenu-index))
-
-(add-hook 'erc-mode-hook #'erc-imenu-setup)
-(autoload 'erc-create-imenu-index "erc-imenu" "Imenu index creation function")
 
 ;;; Automatically scroll to bottom
 (defcustom erc-input-line-position nil
diff --git a/lisp/erc/erc-imenu.el b/lisp/erc/erc-imenu.el
index 6223cd3d06f..2514ffcc4d3 100644
--- a/lisp/erc/erc-imenu.el
+++ b/lisp/erc/erc-imenu.el
@@ -124,6 +124,25 @@ erc-create-imenu-index
 				  index-alist))
     index-alist))
 
+(defvar-local erc-imenu--create-index-function nil
+  "Previous local value of `imenu-create-index-function', if any.")
+
+(defun erc-imenu-setup ()
+  "Wire up support for Imenu in an ERC buffer."
+  (when (and (local-variable-p 'imenu-create-index-function)
+             imenu-create-index-function)
+    (setq erc-imenu--create-index-function imenu-create-index-function))
+  (setq-local imenu-create-index-function #'erc-create-imenu-index))
+
+(define-erc-module imenu nil
+  "Simple Imenu integration for ERC."
+  ((add-hook 'erc-mode-hook #'erc-imenu-setup))
+  ((remove-hook 'erc-mode-hook #'erc-imenu-setup)
+   (erc-with-all-buffers-of-server erc-server-process nil
+     (when erc-imenu--create-index-function
+       (setq imenu-create-index-function erc-imenu--create-index-function)
+       (kill-local-variable 'erc-imenu--create-index-function)))))
+
 (provide 'erc-imenu)
 
 ;;; erc-imenu.el ends here
diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el
index 007f70b8671..0d6634d38a9 100644
--- a/lisp/erc/erc.el
+++ b/lisp/erc/erc.el
@@ -1819,7 +1819,7 @@ erc-migrate-modules
 
 (defcustom erc-modules '(netsplit fill button match track completion readonly
                                   networks ring autojoin noncommands irccontrols
-                                  move-to-prompt stamp menu list)
+                                  move-to-prompt stamp menu list imenu)
   "A list of modules which ERC should enable.
 If you set the value of this without using `customize' remember to call
 \(erc-update-modules) after you change it.  When using `customize', modules
@@ -1864,6 +1864,7 @@ erc-modules
     (const :tag "identd: Launch an identd server on port 8113" identd)
     (const :tag "irccontrols: Highlight or remove IRC control characters"
            irccontrols)
+    (const :tag "imenu: A simple Imenu integration" imenu)
     (const :tag "keep-place: Leave point above un-viewed text" keep-place)
     (const :tag "list: List channels in a separate buffer" list)
     (const :tag "log: Save buffers in logs" log)
@@ -1899,6 +1900,7 @@ erc-modules
     (const :tag "unmorse: Translate morse code in messages" unmorse)
     (const :tag "xdcc: Act as an XDCC file-server" xdcc)
     (repeat :tag "Others" :inline t symbol))
+  :package-version '(ERC . "5.5") ; FIXME sync on release
   :group 'erc)
 
 (defun erc-update-modules ()
-- 
2.38.1


  parent reply	other threads:[~2023-01-21 15:03 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <87pmb9wyz6.fsf@neverwas.me>
2023-01-20  7:16 ` bug#60954: 29.0.60; ERC 5.4.1: loading ERC clobbers customizations to erc-mode-hook Eli Zaretskii
     [not found] ` <83cz79oeu7.fsf@gnu.org>
2023-01-20 14:14   ` J.P.
2023-01-20 14:15 ` J.P.
2023-01-21 15:03 ` J.P. [this message]
2023-01-31 15:27 ` bug#60954: 30.0.50; ERC >5.5: Stop requiring erc-goodies in erc.el J.P.
2023-02-07 15:22 ` J.P.
2023-02-19 15:07 ` J.P.
2023-03-09 14:43 ` J.P.
2023-03-14 13:32 ` J.P.
2023-03-15 14:04 ` J.P.

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='87edroj5g0.fsf__31448.491841887$1674313463$gmane$org@neverwas.me' \
    --to=jp@neverwas.me \
    --cc=60954@debbugs.gnu.org \
    --cc=emacs-erc@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).