Procházet zdrojové kódy

org-insert-link: Correct changes from a08dd527d

* lisp/org.el (org-insert-link): Fix regexp and undefined variable.
Kyle Meyer před 8 roky
rodič
revize
10301ab1ff
1 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 4 4
      lisp/org.el

+ 4 - 4
lisp/org.el

@@ -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)))