summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKyle Meyer <kyle@kyleam.com>2017-01-25 21:34:58 -0500
committerKyle Meyer <kyle@kyleam.com>2017-01-25 22:00:48 -0500
commitffa4502771ff98765b688a398e5872ddba3ac013 (patch)
tree9d325db30925d01e3d9449fc067d53f8b8ffd5be
parente97f04de8eb410c188686c33a0b03d96d936de78 (diff)
downloadorg-mode-ffa4502771ff98765b688a398e5872ddba3ac013.tar.gz
ob-core: Move org-babel-local-file-name to org-compat.el
* lisp/ob-core.el (org-babel-process-file-name): Move to org-compat.el. * lisp/org-compat.el (org-babel-local-file-name): Add compatibility alias.
-rw-r--r--lisp/ob-core.el7
-rw-r--r--lisp/org-compat.el8
2 files changed, 8 insertions, 7 deletions
diff --git a/lisp/ob-core.el b/lisp/ob-core.el
index 1ba048a..8d08784 100644
--- a/lisp/ob-core.el
+++ b/lisp/ob-core.el
@@ -2905,13 +2905,6 @@ can be specified as the REGEXP argument."
(setq string (substring string 0 -1)))
string))
-(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.
If NAME specifies a remote location, the remote portion of the
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index 70cedbe..f4d389e 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -430,6 +430,14 @@ Pass COLUMN and FORCE to `move-to-column'."
(lambda (&optional _beg _end)
(with-no-warnings (font-lock-fontify-buffer)))))
+;; `file-local-name' was added in Emacs 26.1.
+(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))))
+
(defmacro org-no-popups (&rest body)
"Suppress popup windows.
Let-bind some variables to nil around BODY to achieve the desired