aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorF. Jason Park2023-10-03 00:00:19 -0700
committerF. Jason Park2023-10-13 07:47:01 -0700
commitf97fdf5e50ebf1aab236b4b8bbd09c203a56aac5 (patch)
tree37dafd46d13cece978d625677287f5f017c71ab0
parent9c2f99b7d7325149c6926fa7ccc4e84fa7a695f6 (diff)
downloademacs-f97fdf5e50ebf1aab236b4b8bbd09c203a56aac5.tar.gz
emacs-f97fdf5e50ebf1aab236b4b8bbd09c203a56aac5.zip
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.
-rw-r--r--etc/ERC-NEWS8
-rw-r--r--lisp/erc/erc.el13
2 files changed, 19 insertions, 2 deletions
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'
220determines the default timezone when not specified with a prefix 220determines the default timezone when not specified with a prefix
221argument. 221argument.
222 222
223** Option 'erc-remove-parsed-property' deprecated.
224This option's nil behavior serves no practical purpose yet has the
225potential to degrade the user experience by competing for space with
226forthcoming features powered by next generation extensions. Anyone
227with a legitimate use for this option likely also possesses the
228knowledge to rig up a suitable analog with minimal effort. That said,
229the road to removal is long.
230
223** Option 'erc-warn-about-blank-lines' is more informative. 231** Option 'erc-warn-about-blank-lines' is more informative.
224Enabled by default, this option now produces more useful feedback 232Enabled by default, this option now produces more useful feedback
225whenever ERC rejects prompt input containing whitespace-only lines. 233whenever 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."
2893 2893
2894The default is to remove it, since it causes ERC to take up extra 2894The default is to remove it, since it causes ERC to take up extra
2895memory. If you have code that relies on this property, then set 2895memory. If you have code that relies on this property, then set
2896this option to nil." 2896this option to nil.
2897
2898Note that this option is deprecated because a value of nil is
2899impractical in prolonged sessions with more than a few channels.
2900Use `erc-insert-post-hook' or similar and the helper function
2901`erc-find-parsed-property' and friends to stash the current
2902`erc-response' object as needed. And instead of using this for
2903debugging purposes, try `erc-debug-irc-protocol'."
2897 :type 'boolean 2904 :type 'boolean
2898 :group 'erc) 2905 :group 'erc)
2906(make-obsolete-variable 'erc-remove-parsed-property
2907 "impractical when non-nil" "30.1")
2899 2908
2900(define-inline erc--assert-input-bounds () 2909(define-inline erc--assert-input-bounds ()
2901 (inline-quote 2910 (inline-quote
@@ -2972,7 +2981,7 @@ If STRING is nil, the function does nothing."
2972 (run-hooks 'erc-insert-post-hook) 2981 (run-hooks 'erc-insert-post-hook)
2973 (when erc-remove-parsed-property 2982 (when erc-remove-parsed-property
2974 (remove-text-properties (point-min) (point-max) 2983 (remove-text-properties (point-min) (point-max)
2975 '(erc-parsed nil)))) 2984 '(erc-parsed nil tags nil))))
2976 (erc--refresh-prompt))))) 2985 (erc--refresh-prompt)))))
2977 (run-hooks 'erc-insert-done-hook) 2986 (run-hooks 'erc-insert-done-hook)
2978 (erc-update-undo-list (- (or (marker-position (or erc--insert-marker 2987 (erc-update-undo-list (- (or (marker-position (or erc--insert-marker