From fbb30a5e798590461853a6d4b6abf5abbcd121a1 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 20 Mar 2013 16:57:56 +0100 Subject: [PATCH] ox: Move a function in the file * lisp/ox.el (org-export--copy-to-kill-ring-p): Move function elsewhere in the file. --- lisp/ox.el | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/lisp/ox.el b/lisp/ox.el index 5a3d890f0..a545bb921 100644 --- a/lisp/ox.el +++ b/lisp/ox.el @@ -2701,7 +2701,8 @@ Return the updated communication channel." ;; its derivatives, `org-export-to-buffer', `org-export-to-file' and ;; `org-export-string-as'. They differ either by the way they output ;; the resulting code (for the first two) or by the input type (for -;; the latter). +;; the latter). `org-export--copy-to-kill-ring-p' determines if +;; output of these function should be added to kill ring. ;; ;; `org-export-output-file-name' is an auxiliary function meant to be ;; used with `org-export-to-file'. With a given extension, it tries @@ -3226,6 +3227,13 @@ file should have." (org-babel-exp-process-buffer)) (kill-buffer reference)))) +(defun org-export--copy-to-kill-ring-p () + "Return a non-nil value when output should be added to the kill ring. +See also `org-export-copy-to-kill-ring'." + (if (eq org-export-copy-to-kill-ring 'if-interactive) + (not (or executing-kbd-macro noninteractive)) + (eq org-export-copy-to-kill-ring t))) + ;;; Tools For Back-Ends @@ -5701,14 +5709,7 @@ options as CDR." ;; Otherwise, enter sub-menu. (t (org-export--dispatch-ui options key expertp))))) -;;; Miscellaneous -(defun org-export--copy-to-kill-ring-p () - "Should we copy the export buffer to the kill ring? -See also `org-export-copy-to-kill-ring'." - (if (eq org-export-copy-to-kill-ring 'if-interactive) - (not (or executing-kbd-macro noninteractive)) - (eq org-export-copy-to-kill-ring t))) (provide 'ox)