diff options
author | Michael Albinus <michael.albinus@gmx.de> | 2016-11-20 16:29:47 +0100 |
---|---|---|
committer | Kyle Meyer <kyle@kyleam.com> | 2017-01-25 22:00:48 -0500 |
commit | e97f04de8eb410c188686c33a0b03d96d936de78 (patch) | |
tree | 51b7c0216eef1de4106fd4b7fd84c31ed725df28 | |
parent | ec834812f7db80fed63ee3d7393ac31a29eb01cf (diff) | |
download | org-mode-e97f04de8eb410c188686c33a0b03d96d936de78.tar.gz |
Backport commit 22946702b from Emacs
* lisp/ob-core.el (org-babel-local-file-name): Use `file-local-name'
when available.
22946702b4296c0e42e4baf6221e205b52d05cbf
Michael Albinus
Sun Nov 20 16:29:47 2016 +0100
-rw-r--r-- | lisp/ob-core.el | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 663fe18..1ba048a 100644 --- a/lisp/ob-core.el +++ b/lisp/ob-core.el @@ -2905,9 +2905,12 @@ can be specified as the REGEXP argument." (setq string (substring string 0 -1))) string)) -(defun org-babel-local-file-name (file) - "Return the local name component of FILE." - (or (file-remote-p file 'localname) file)) +(defalias 'org-babel-local-file-name + (if (fboundp 'file-local-name) + 'file-local-name + (lambda (file) + "Return the local name component of FILE." + (or (file-remote-p file 'localname) file)))) (defun org-babel-process-file-name (name &optional no-quote-p) "Prepare NAME to be used in an external process. |