Browse Source

org.el: Avoid dlink identifiers in `org-open-file'

* lisp/org.el (org--file-apps-entry-locator-p): Rename from
`org--file-apps-entry-dlink-p'.
(org-open-file): Avoid confusing "dlink" part of some identifiers.
Earlier `dlink' local variable was removed to prevent an issue with
distorted case of link components.
Max Nikulin 2 years ago
parent
commit
f25b308af6
1 changed files with 7 additions and 7 deletions
  1. 7 7
      lisp/org.el

+ 7 - 7
lisp/org.el

@@ -7988,7 +7988,7 @@ This is saved in case the need arises to restore it.")
     (`windows-nt org-file-apps-windowsnt)
     (`windows-nt org-file-apps-windowsnt)
     (_ org-file-apps-gnu)))
     (_ org-file-apps-gnu)))
 
 
-(defun org--file-apps-entry-dlink-p (entry)
+(defun org--file-apps-entry-locator-p (entry)
   "Non-nil if ENTRY should be matched against the link by `org-open-file'.
   "Non-nil if ENTRY should be matched against the link by `org-open-file'.
 
 
 It assumes that is the case when the entry uses a regular
 It assumes that is the case when the entry uses a regular
@@ -8119,9 +8119,9 @@ If the file does not exist, throw an error."
   (let* ((file (if (equal path "") buffer-file-name
   (let* ((file (if (equal path "") buffer-file-name
 		 (substitute-in-file-name (expand-file-name path))))
 		 (substitute-in-file-name (expand-file-name path))))
 	 (file-apps (append org-file-apps (org--file-default-apps)))
 	 (file-apps (append org-file-apps (org--file-default-apps)))
-	 (apps (cl-remove-if #'org--file-apps-entry-dlink-p file-apps))
-	 (apps-dlink (cl-remove-if-not #'org--file-apps-entry-dlink-p
-				       file-apps))
+	 (apps (cl-remove-if #'org--file-apps-entry-locator-p file-apps))
+	 (apps-locator (cl-remove-if-not #'org--file-apps-entry-locator-p
+                                         file-apps))
 	 (remp (and (assq 'remote apps) (file-remote-p file)))
 	 (remp (and (assq 'remote apps) (file-remote-p file)))
 	 (dirp (unless remp (file-directory-p file)))
 	 (dirp (unless remp (file-directory-p file)))
 	 (file (if (and dirp org-open-directory-means-index-dot-org)
 	 (file (if (and dirp org-open-directory-means-index-dot-org)
@@ -8155,17 +8155,17 @@ If the file does not exist, throw an error."
      (t
      (t
       (setq cmd (or (and remp (cdr (assq 'remote apps)))
       (setq cmd (or (and remp (cdr (assq 'remote apps)))
 		    (and dirp (cdr (assq 'directory apps)))
 		    (and dirp (cdr (assq 'directory apps)))
-		    ;; First, try matching against apps-dlink if we
+		    ;; First, try matching against apps-locator if we
 		    ;; get a match here, store the match data for
 		    ;; get a match here, store the match data for
 		    ;; later.
 		    ;; later.
 		    (let* ((case-fold-search t)
 		    (let* ((case-fold-search t)
-                           (match (assoc-default link apps-dlink
+                           (match (assoc-default link apps-locator
                                                  'string-match)))
                                                  'string-match)))
 		      (if match
 		      (if match
 			  (progn (setq link-match-data (match-data))
 			  (progn (setq link-match-data (match-data))
 				 match)
 				 match)
 			(progn (setq in-emacs (or in-emacs line search))
 			(progn (setq in-emacs (or in-emacs line search))
-			       nil))) ; if we have no match in apps-dlink,
+			       nil))) ; if we have no match in apps-locator,
 					; always open the file in emacs if line or search
 					; always open the file in emacs if line or search
 					; is given (for backwards compatibility)
 					; is given (for backwards compatibility)
 		    (assoc-default dfile
 		    (assoc-default dfile