From de6c4f2ba6defa8dca15e13d64c6371f3f23e6af Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Mon, 12 Mar 2018 17:50:08 +0100 Subject: [PATCH 2/2] Hide URL and Info node markup in help buffers * lisp/help-mode.el (help-make-xrefs): Make URL and Info node markup invisible. --- lisp/help-mode.el | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/lisp/help-mode.el b/lisp/help-mode.el index 4fb3fb85c9..f64915e541 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el @@ -470,17 +470,23 @@ help-make-xrefs ;; Info references (save-excursion (while (re-search-forward help-xref-info-regexp nil t) - (let ((data (match-string 2))) + (let ((data (match-string 2)) + (beg (match-beginning 0)) + (end (match-beginning 2))) (save-match-data (unless (string-match "^([^)]+)" data) (setq data (concat "(emacs)" data))) (setq data ;; possible newlines if para filled - (replace-regexp-in-string "[ \t\n]+" " " data t t))) + (replace-regexp-in-string "[ \t\n]+" " " data t t)) + (put-text-property beg end 'invisible t)) (help-xref-button 2 'help-info data)))) ;; URLs (save-excursion (while (re-search-forward help-xref-url-regexp nil t) - (let ((data (match-string 1))) + (let ((data (match-string 1)) + (beg (match-beginning 0)) + (end (match-beginning 1))) + (put-text-property beg end 'invisible t) (help-xref-button 1 'help-url data)))) ;; Mule related keywords. Do this before trying ;; `help-xref-symbol-regexp' because some of Mule -- 2.16.1.72.g5be1f00a9