summaryrefslogtreecommitdiff
path: root/lisp/org/ox-man.el
diff options
context:
space:
mode:
Diffstat (limited to 'lisp/org/ox-man.el')
-rw-r--r--lisp/org/ox-man.el22
1 files changed, 10 insertions, 12 deletions
diff --git a/lisp/org/ox-man.el b/lisp/org/ox-man.el
index 36822ff9664..0e487d8966c 100644
--- a/lisp/org/ox-man.el
+++ b/lisp/org/ox-man.el
@@ -40,6 +40,8 @@
(require 'cl-lib)
(require 'ox)
+;;; Function Declarations
+
(defvar org-export-man-default-packages-alist)
(defvar org-export-man-packages-alist)
(defvar orgtbl-exp-regexp)
@@ -599,24 +601,24 @@ CONTENTS is nil. INFO is a plist holding contextual information."
;;; Link
-(defun org-man-link (link desc _info)
+(defun org-man-link (link desc info)
"Transcode a LINK object from Org to Man.
DESC is the description part of the link, or the empty string.
INFO is a plist holding contextual information. See
`org-export-data'."
(let* ((type (org-element-property :type link))
- (raw-path (org-element-property :path link))
+ (raw-path (org-element-property :path link))
;; Ensure DESC really exists, or set it to nil.
(desc (and (not (string= desc "")) desc))
- (path (cond
- ((member type '("http" "https" "ftp" "mailto"))
- (concat type ":" raw-path))
- ((string= type "file") (org-export-file-uri raw-path))
- (t raw-path))))
+ (path (pcase type
+ ((or "http" "https" "ftp" "mailto")
+ (concat type ":" raw-path))
+ ("file" (org-export-file-uri raw-path))
+ (_ raw-path))))
(cond
;; Link type is handled by a special function.
- ((org-export-custom-protocol-maybe link desc 'man))
+ ((org-export-custom-protocol-maybe link desc 'man info))
;; External link with a description part.
((and path desc) (format "%s \\fBat\\fP \\fI%s\\fP" path desc))
;; External link without a description part.
@@ -1136,8 +1138,4 @@ Return PDF file name or an error if it couldn't be produced."
(provide 'ox-man)
-;; Local variables:
-;; generated-autoload-file: "org-loaddefs.el"
-;; End:
-
;;; ox-man.el ends here