org-insert-link: Correct changes from a08dd527d

* lisp/org.el (org-insert-link): Fix regexp and undefined variable.
This commit is contained in:
Kyle Meyer 2017-04-09 20:44:10 -04:00
parent dd40193bfa
commit 10301ab1ff
1 changed files with 4 additions and 4 deletions

View File

@ -10560,10 +10560,10 @@ Use TAB to complete link prefixes, then RET for type-specific completion support
;; Check if we can/should use a relative path. If yes, simplify the link
(let ((case-fold-search nil))
(when (string-match "\\`\\(file:\\|docview\\):" link)
(let ((type (match-string-no-properties 0 link))
(path (substring-no-properties link (match-end 0)))
(origpath path))
(when (string-match "\\`\\(file\\|docview\\):" link)
(let* ((type (match-string-no-properties 0 link))
(path (substring-no-properties link (match-end 0)))
(origpath path))
(cond
((or (eq org-link-file-path-type 'absolute)
(equal complete-file '(16)))