From ffa4502771ff98765b688a398e5872ddba3ac013 Mon Sep 17 00:00:00 2001 From: Kyle Meyer Date: Wed, 25 Jan 2017 21:34:58 -0500 Subject: [PATCH] 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. --- lisp/ob-core.el | 7 ------- lisp/org-compat.el | 8 ++++++++ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/lisp/ob-core.el b/lisp/ob-core.el index 1ba048ab1..8d0878403 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 70cedbe9a..f4d389e52 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 -- 2.11.4.GIT