소스 검색

Update info link definition

* lisp/org-info.el ("info"):
Update link definition with org-link-set-parameters and change a doc string to
point to org-link-parameters.
John Kitchin 8 년 전
부모
커밋
692f874a12
1개의 변경된 파일5개의 추가작업 그리고 3개의 파일을 삭제
  1. 5 3
      lisp/org-info.el

+ 5 - 3
lisp/org-info.el

@@ -40,8 +40,10 @@
 (defvar Info-current-node)
 
 ;; Install the link type
-(org-add-link-type "info" 'org-info-open 'org-info-export)
-(add-hook 'org-store-link-functions 'org-info-store-link)
+(org-link-set-parameters "info"
+			 :follow #'org-info-open
+			 :export #'org-info-export
+			 :store #'org-info-store-link)
 
 ;; Implementation
 (defun org-info-store-link ()
@@ -113,7 +115,7 @@ emacs related documents. See `org-info-official-gnu-document' and
 
 (defun org-info-export (path desc format)
   "Export an info link.
-See `org-add-link-type' for details about PATH, DESC and FORMAT."
+See `org-link-parameters' for details about PATH, DESC and FORMAT."
   (when (eq format 'html)
     (or (string-match "\\(.*\\)[#:]:?\\(.*\\)" path)
 	(string-match "\\(.*\\)" path))