forked from mirrors/org-mode
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:
parent
3b1467daa6
commit
3d353b0065
14
lisp/ol.el
14
lisp/ol.el
|
@ -1333,16 +1333,10 @@ PATH is a symbol name, as a string."
|
||||||
"Store \"help\" type link."
|
"Store \"help\" type link."
|
||||||
(when (eq major-mode 'help-mode)
|
(when (eq major-mode 'help-mode)
|
||||||
(let ((symbol
|
(let ((symbol
|
||||||
(replace-regexp-in-string
|
(save-excursion
|
||||||
;; Help mode escapes backquotes and backslashes before
|
(goto-char (point-min))
|
||||||
;; displaying them. E.g., "`" appears as "\'" for
|
(read (current-buffer)))))
|
||||||
;; reasons. Work around this.
|
(org-link-store-props :type "help" :link (format "help:%s" symbol)))))
|
||||||
(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)))))
|
|
||||||
|
|
||||||
(org-link-set-parameters "help"
|
(org-link-set-parameters "help"
|
||||||
:follow #'org-link--open-help
|
:follow #'org-link--open-help
|
||||||
|
|
Loading…
Reference in New Issue