From d531d9c5c907bc842dbe1fc83f28cd477786045c Mon Sep 17 00:00:00 2001 From: Marcus Kammer Date: Fri, 6 Jan 2023 12:44:39 +0100 Subject: [PATCH] Comment out shr-insert function --- bundle/bundle--mk.el | 45 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/bundle/bundle--mk.el b/bundle/bundle--mk.el index 4200cb7a..abc2b88f 100644 --- a/bundle/bundle--mk.el +++ b/bundle/bundle--mk.el @@ -110,3 +110,48 @@ (defun mk/delete-files (lst) (dolist (file lst) (delete-file file t))) + + +;; (defun shr-insert (text) +;; (when (and (not (bolp)) +;; (get-text-property (1- (point)) 'image-url)) +;; (insert "\n")) +;; (cond +;; ((eq shr-folding-mode 'none) +;; (let ((start (point))) +;; (insert text) +;; (save-restriction +;; (narrow-to-region start (point)) +;; (shr--translate-insertion-chars) +;; (goto-char (point-max))))) +;; (t +;; (let ((font-start (point))) +;; (when (and (string-match "\\`[ \t\n\r]" text) +;; (not (bolp)) +;; (not (eq (char-after (1- (point))) ? ))) +;; (insert " ")) +;; (let ((start (point)) +;; (bolp (bolp))) +;; (insert text) +;; (save-restriction +;; (narrow-to-region start (point)) +;; (goto-char start) +;; (when (looking-at "[\t\n\r]+") +;; (replace-match "" t t)) +;; (while (re-search-forward "[\t\n\r]+" nil t) +;; (replace-match " " t t)) +;; (goto-char start) +;; (while (re-search-forward " +" nil t) +;; (replace-match " " t t)) +;; (shr--translate-insertion-chars) +;; (goto-char (point-max))) +;; ;; We may have removed everything we inserted if it was just +;; ;; spaces. +;; (unless (= font-start (point)) +;; ;; Mark all lines that should possibly be folded afterwards. +;; (when bolp +;; (shr-mark-fill start)) +;; (when shr-use-fonts +;; (put-text-property font-start (point) +;; 'face +;; (or shr-current-font 'variable-pitch)))))))))