1
0
mirror of https://git.savannah.gnu.org/git/emacs/org-mode.git synced 2024-11-29 07:58:21 +00:00

ol: Fix org-link--store-help

* lisp/ol.el (org-link--store-help): Read symbol without relying on
a hack.
This commit is contained in:
Nicolas Goaziou 2021-04-27 17:47:34 +02:00
parent 3b1467daa6
commit 3d353b0065

View File

@ -1333,16 +1333,10 @@ PATH is a symbol name, as a string."
"Store \"help\" type link."
(when (eq major-mode 'help-mode)
(let ((symbol
(replace-regexp-in-string
;; Help mode escapes backquotes and backslashes before
;; displaying them. E.g., "`" appears as "\'" for
;; reasons. Work around this.
(rx "\\" (group (or "`" "\\"))) "\\1"
(save-excursion
(goto-char (point-min))
(re-search-forward "\\S_" (line-end-position) t)
(buffer-substring (point-min) (point))))))
(org-link-store-props :type "help" :link (concat "help:" symbol)))))
(save-excursion
(goto-char (point-min))
(read (current-buffer)))))
(org-link-store-props :type "help" :link (format "help:%s" symbol)))))
(org-link-set-parameters "help"
:follow #'org-link--open-help