From: F. Jason Park Date: Tue, 3 Oct 2023 07:00:19 +0000 (-0700) Subject: Deprecate option erc-remove-parsed-property X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=f97fdf5e50ebf1aab236b4b8bbd09c203a56aac5;p=emacs.git Deprecate option erc-remove-parsed-property * etc/ERC-NEWS: Add entry for `erc-remove-parsed-property'. * lisp/erc/erc.el (erc-remove-parsed-property): Deprecate option because the potential for inadvertent self harm outweighs the potential benefits. Additionally, replicating this functionality via hooks is trivial. (erc-display-line-1): Remove quasi-deprecated `tags' property because the preferred format for `erc-response.tags' has changed, and ERC has never supported IRCv3 tags. --- diff --git a/etc/ERC-NEWS b/etc/ERC-NEWS index dca9fff4e65..7c287b9de23 100644 --- a/etc/ERC-NEWS +++ b/etc/ERC-NEWS @@ -220,6 +220,14 @@ atop any message. The new companion option 'erc-echo-timestamp-zone' determines the default timezone when not specified with a prefix argument. +** Option 'erc-remove-parsed-property' deprecated. +This option's nil behavior serves no practical purpose yet has the +potential to degrade the user experience by competing for space with +forthcoming features powered by next generation extensions. Anyone +with a legitimate use for this option likely also possesses the +knowledge to rig up a suitable analog with minimal effort. That said, +the road to removal is long. + ** Option 'erc-warn-about-blank-lines' is more informative. Enabled by default, this option now produces more useful feedback whenever ERC rejects prompt input containing whitespace-only lines. diff --git a/lisp/erc/erc.el b/lisp/erc/erc.el index 60cce750355..3a0337eae9a 100644 --- a/lisp/erc/erc.el +++ b/lisp/erc/erc.el @@ -2893,9 +2893,18 @@ I.e. any char in it has the `invisible' property set." The default is to remove it, since it causes ERC to take up extra memory. If you have code that relies on this property, then set -this option to nil." +this option to nil. + +Note that this option is deprecated because a value of nil is +impractical in prolonged sessions with more than a few channels. +Use `erc-insert-post-hook' or similar and the helper function +`erc-find-parsed-property' and friends to stash the current +`erc-response' object as needed. And instead of using this for +debugging purposes, try `erc-debug-irc-protocol'." :type 'boolean :group 'erc) +(make-obsolete-variable 'erc-remove-parsed-property + "impractical when non-nil" "30.1") (define-inline erc--assert-input-bounds () (inline-quote @@ -2972,7 +2981,7 @@ If STRING is nil, the function does nothing." (run-hooks 'erc-insert-post-hook) (when erc-remove-parsed-property (remove-text-properties (point-min) (point-max) - '(erc-parsed nil)))) + '(erc-parsed nil tags nil)))) (erc--refresh-prompt))))) (run-hooks 'erc-insert-done-hook) (erc-update-undo-list (- (or (marker-position (or erc--insert-marker