emacs-detubifier

Replace enshittified URLs like https://youtube.com/ and https://reddit.com/ with nonenshittified front ends.
git clone https://kaka.farm/~git/emacs-detubifier/ or https://codeberg.org/kakafarm/emacs-detubifier/
Log | Files | Refs | LICENSE

commit 190532379a945980f45cd566f308dac890b5c498
parent 7733e39deaed7cebcaa37de76ac6f8273773a758
Author: Yuval Langer <yuval.langer@gmail.com>
Date:   Sat, 28 Sep 2024 14:44:26 +0300

Use fewer functions to achieve similar functionality.

Diffstat:
Mdetubifier.el | 14++++++--------
1 file changed, 6 insertions(+), 8 deletions(-)

diff --git a/detubifier.el b/detubifier.el @@ -117,14 +117,12 @@ Use custom variable `detubifier-regexp-replacement-pairs' to do so." (region-end))) (save-excursion - (save-restriction ;; Save narrowing setting and revert to it when finishing. - (narrow-to-region beg end) - (goto-char (point-min)) - (pcase-dolist (`(,current-regexp . ,current-replacement) - detubifier-regexp-replacement-pairs) - (goto-char (point-min)) - (while (re-search-forward current-regexp nil t) - (replace-match current-replacement nil nil)))))) + (pcase-dolist (`(,current-regexp . ,current-replacement) + detubifier-regexp-replacement-pairs) + (replace-regexp-in-region current-regexp + current-replacement + beg + end)))) ;;;###autoload (defun detubifier-custom-detubify-string (str)