branch: externals/auctex commit 63e48dda9605111eea1d9be18c4eb6258f04572c Author: Tassilo Horn <t...@gnu.org> Commit: Tassilo Horn <t...@gnu.org>
Document lexical-binding changes in context.el. * doc/changes.texi: Document lexical-binding changes in context.el. * context.el: Don't reference non-existing ConTeXt-section-hook but ConTeXt-numbered-section-hook. --- context.el | 16 +++++++++------- doc/changes.texi | 8 ++++++++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/context.el b/context.el index bde604f..42406bb 100644 --- a/context.el +++ b/context.el @@ -285,7 +285,7 @@ Or: The following variables can be set to customize: -`ConTeXt-section-hook' Hooks to run when inserting a section. +`ConTeXt-numbered-section-hook' Hooks to run when inserting a section. `ConTeXt-section-ref' Prefix to all section references." (interactive "*P") @@ -532,7 +532,7 @@ the title of the section inserted with `\\[ConTeXt-section]." (defun ConTeXt-section-section () "Hook to insert ConTeXt section command into the file. -Insert this hook into `ConTeXt-section-hook' after those hooks +Insert this hook into `ConTeXt-numbered-section-hook' after those hooks which sets the `ConTeXt-name', `ConTeXt-title', and `ConTeXt-reference' variables, but before those hooks which assumes the section already is inserted." @@ -555,7 +555,7 @@ assumes the section already is inserted." (defun ConTeXt-section-ref () "Hook to insert a reference after the sectioning command. -Insert this hook into `ConTeXt-section-hook' to prompt for a label to be +Insert this hook into `ConTeXt-numbered-section-hook' to prompt for a label to be inserted after the sectioning command." (setq ConTeXt-reference (completing-read @@ -1433,14 +1433,16 @@ else. There might be text before point." (defun ConTeXt-numbered-section-menu (level) "Insert numbered section from menu." - (let ((ConTeXt-numbered-section-hook (delq 'ConTeXt-numbered-section-heading - (copy-sequence ConTeXt-numbered-section-hook)))) + (let ((ConTeXt-numbered-section-hook + (delq 'ConTeXt-numbered-section-heading + (copy-sequence ConTeXt-numbered-section-hook)))) (ConTeXt-section level))) (defun ConTeXt-unnumbered-section-menu (level) "Insert unnumbered section from menu." - (let ((ConTeXt-unnumbered-section-hook (delq 'ConTeXt-unnumbered-section-heading - (copy-sequence ConTeXt-unnumbered-section-hook)))) + (let ((ConTeXt-unnumbered-section-hook + (delq 'ConTeXt-unnumbered-section-heading + (copy-sequence ConTeXt-unnumbered-section-hook)))) (ConTeXt-section level))) (defun ConTeXt-numbered-section-menu-entry (entry) diff --git a/doc/changes.texi b/doc/changes.texi index be0d1cd..63cfe45 100644 --- a/doc/changes.texi +++ b/doc/changes.texi @@ -47,6 +47,14 @@ previously undeclared variables @code{title}, @code{name}, @code{level}, @code{done-mark}, and @code{toc}. These variables are now properly declared and have the @code{LaTeX-} prefix, e.g., @code{LaTeX-done-mark}. + +@item +The functions in @code{ConTeXt-numbered-section-hook} and +@code{ConTeXt-unnumbered-section-hook} had access or modified the +previously undeclared variables @code{title}, @code{name}, @code{level}, +@code{done-mark}, and @code{reference}. These variables are now +properly declared and have the @code{ConTeXt-} prefix, e.g., +@code{ConTeXt-title}. @end itemize @item