[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/org fe90cab956 3/3: lisp/ox.el: Rename abnormal hook na
From: |
ELPA Syncer |
Subject: |
[elpa] externals/org fe90cab956 3/3: lisp/ox.el: Rename abnormal hook names to end with "-functions" |
Date: |
Tue, 6 Sep 2022 09:58:00 -0400 (EDT) |
branch: externals/org
commit fe90cab9564bd6fa08c9abe0882e0e06cc5626f9
Author: Ihor Radchenko <yantar92@gmail.com>
Commit: Ihor Radchenko <yantar92@gmail.com>
lisp/ox.el: Rename abnormal hook names to end with "-functions"
* lisp/ox.el (org-export-before-processing-functions):
(org-export-before-parsing-functions): Rename
`org-export-before-processing-hook' and
`org-export-before-parsing-hook' to use "-functions" suffix as these
hooks are abnormal hooks and we need not to use "-hook" suffix in
abnormal hooks.
* lisp/org-compat.el (org-export-before-processing-hook):
(org-export-before-parsing-hook): Declare obsolete.
* lisp/org-attach.el (org-export-before-parsing-functions): Use the
new hook name.
---
lisp/org-attach.el | 2 +-
lisp/org-compat.el | 4 ++++
lisp/ox.el | 8 ++++----
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/lisp/org-attach.el b/lisp/org-attach.el
index a7b02fd42e..8509a65649 100644
--- a/lisp/org-attach.el
+++ b/lisp/org-attach.el
@@ -792,7 +792,7 @@ Idea taken from `gnus-dired-attach'."
(add-hook 'org-archive-hook 'org-attach-archive-delete-maybe)
-(add-hook 'org-export-before-parsing-hook 'org-attach-expand-links)
+(add-hook 'org-export-before-parsing-functions 'org-attach-expand-links)
(provide 'org-attach)
diff --git a/lisp/org-compat.el b/lisp/org-compat.el
index b3b50d9aea..60a66f24a6 100644
--- a/lisp/org-compat.el
+++ b/lisp/org-compat.el
@@ -331,6 +331,10 @@ Counting starts at 1."
(define-obsolete-function-alias 'org-string-match-p 'string-match-p "9.0")
;;;; Functions and variables from previous releases now obsolete.
+(define-obsolete-variable-alias 'org-export-before-processing-hook
+ 'org-export-before-processing-functions "Org 9.6")
+(define-obsolete-variable-alias 'org-export-before-parsing-hook
+ 'org-export-before-parsing-functions "Org 9.6")
(define-obsolete-function-alias 'org-element-remove-indentation
'org-remove-indentation "9.0")
(define-obsolete-variable-alias 'org-latex-create-formula-image-program
diff --git a/lisp/ox.el b/lisp/ox.el
index 97365aff72..3ef65cde8c 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -2088,8 +2088,8 @@ keywords before output."
;;;; Hooks
-(defvar org-export-before-processing-hook nil
- "Hook run at the beginning of the export process.
+(defvar org-export-before-processing-functions nil
+ "Abnormal hook run at the beginning of the export process.
This is run before include keywords and macros are expanded and
Babel code blocks executed, on a copy of the original buffer
@@ -2099,8 +2099,8 @@ is at the beginning of the buffer.
Every function in this hook will be called with one argument: the
back-end currently used, as a symbol.")
-(defvar org-export-before-parsing-hook nil
- "Hook run before parsing an export buffer.
+(defvar org-export-before-parsing-functions nil
+ "Abnormal hook run before parsing an export buffer.
This is run after include keywords and macros have been expanded
and Babel code blocks executed, on a copy of the original buffer