Browse Source

Don't use default-description if link description function is defined

* org.el (org-insert-link): Don't use default-description if a
`org-make-link-description-function' is defined.
David Maus 6 years ago
parent
commit
a9559dc08a
1 changed files with 2 additions and 2 deletions
  1. 2 2
      lisp/org.el

+ 2 - 2
lisp/org.el

@@ -9170,9 +9170,9 @@ Use TAB to complete link prefixes, then RET for type-specific completion support
 	    (setq desc path))))
 
     (if org-make-link-description-function
-	(setq desc (funcall org-make-link-description-function link desc)))
+	(setq desc (funcall org-make-link-description-function link desc))
+      (if default-description (setq desc default-description)))
 
-    (if default-description (setq desc default-description))
     (setq desc (read-string "Description: " desc))
     (unless (string-match "\\S-" desc) (setq desc nil))
     (if remove (apply 'delete-region remove))