From 4f8c9f5ac58d03b381cbfeb5c6764b4c9e04d412 Mon Sep 17 00:00:00 2001 From: Ihor Radchenko Date: Tue, 17 Oct 2023 14:00:01 +0300 Subject: [PATCH] * lisp/ol-man.el (org-man-export): Document all the function arguments Rename FORMAT to more accurate BACKEND. --- lisp/ol-man.el | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/lisp/ol-man.el b/lisp/ol-man.el index 40fdc8f92..abe79086a 100644 --- a/lisp/ol-man.el +++ b/lisp/ol-man.el @@ -82,16 +82,17 @@ matched strings in man buffer." (match-string 1 (buffer-name)) (error "Cannot create link to this man page"))) -(defun org-man-export (link description format) - "Export a man page link from Org files." +(defun org-man-export (link description backend) + "Export a man page LINK with DESCRIPTION. +BACKEND is the current export backend." (let ((path (format "http://man.he.net/?topic=%s§ion=all" link)) (desc (or description link))) (cond - ((eq format 'html) (format "%s" path desc)) - ((eq format 'latex) (format "\\href{%s}{%s}" path desc)) - ((eq format 'texinfo) (format "@uref{%s,%s}" path desc)) - ((eq format 'ascii) (format "%s (%s)" desc path)) - ((eq format 'md) (format "[%s](%s)" desc path)) + ((eq backend 'html) (format "%s" path desc)) + ((eq backend 'latex) (format "\\href{%s}{%s}" path desc)) + ((eq backend 'texinfo) (format "@uref{%s,%s}" path desc)) + ((eq backend 'ascii) (format "%s (%s)" desc path)) + ((eq backend 'md) (format "[%s](%s)" desc path)) (t path)))) (provide 'ol-man)