diff options
| author | F. Jason Park | 2023-10-03 00:00:19 -0700 |
|---|---|---|
| committer | F. Jason Park | 2023-10-13 07:47:01 -0700 |
| commit | f97fdf5e50ebf1aab236b4b8bbd09c203a56aac5 (patch) | |
| tree | 37dafd46d13cece978d625677287f5f017c71ab0 | |
| parent | 9c2f99b7d7325149c6926fa7ccc4e84fa7a695f6 (diff) | |
| download | emacs-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-NEWS | 8 | ||||
| -rw-r--r-- | lisp/erc/erc.el | 13 |
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' | |||
| 220 | determines the default timezone when not specified with a prefix | 220 | determines the default timezone when not specified with a prefix |
| 221 | argument. | 221 | argument. |
| 222 | 222 | ||
| 223 | ** Option 'erc-remove-parsed-property' deprecated. | ||
| 224 | This option's nil behavior serves no practical purpose yet has the | ||
| 225 | potential to degrade the user experience by competing for space with | ||
| 226 | forthcoming features powered by next generation extensions. Anyone | ||
| 227 | with a legitimate use for this option likely also possesses the | ||
| 228 | knowledge to rig up a suitable analog with minimal effort. That said, | ||
| 229 | the 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. |
| 224 | Enabled by default, this option now produces more useful feedback | 232 | Enabled by default, this option now produces more useful feedback |
| 225 | whenever ERC rejects prompt input containing whitespace-only lines. | 233 | 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." | |||
| 2893 | 2893 | ||
| 2894 | The default is to remove it, since it causes ERC to take up extra | 2894 | The default is to remove it, since it causes ERC to take up extra |
| 2895 | memory. If you have code that relies on this property, then set | 2895 | memory. If you have code that relies on this property, then set |
| 2896 | this option to nil." | 2896 | this option to nil. |
| 2897 | |||
| 2898 | Note that this option is deprecated because a value of nil is | ||
| 2899 | impractical in prolonged sessions with more than a few channels. | ||
| 2900 | Use `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 | ||
| 2903 | debugging 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 |