Skip to content

Commit

Permalink
Correctly alight R help index pages
Browse files Browse the repository at this point in the history
  • Loading branch information
vspinu committed Oct 8, 2019
1 parent dc4f0af commit 389d926
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lisp/ess-help.el
Original file line number Diff line number Diff line change
Expand Up @@ -314,10 +314,12 @@ REG-START gives the start location from where to search linkifying, and HELP-OBJ
'help-object (buffer-substring-no-properties (match-beginning 1) (match-end 1))
'follow-link t
'help-echo (or help-echo "help on object")))))
;; (save-excursion ;; why R places all these spaces?
;; (goto-char (point-min))
;; (while (re-search-forward " \\{10,\\} *" nil t)
;; (replace-match "\t\t\t")))
(save-excursion ;; why R help adds all these spaces?
(goto-char (point-min))
(when (re-search-forward "Index:\n\n" nil t)
(let ((beg (point)))
(forward-paragraph 1)
(align-regexp beg (point) "\\(\\s-+\\)"))))
(setq buffer-read-only t)
(setq ess-help-type help-type)
(setq truncate-lines nil))
Expand Down

0 comments on commit 389d926

Please sign in to comment.