Vincent Belaïche <[email protected]> writes: Hi Vincent,
> Please ignore the previous patch attachment: I had not made all the > corresponding updates in the ChangeLog. Ok. Some last nitpicks below. > diff --git a/tex.el b/tex.el > index f3316d5..9bbcb29 100644 > --- a/tex.el > +++ b/tex.el > @@ -2376,15 +2376,54 @@ Used when checking if any files have changed." > (defvar TeX-style-hook-list nil > "List of TeX style hooks currently loaded. > > -Each entry is a list where the first element is the name of the style, > -and the remaining elements are hooks to be run when that style is > -active.") > +Each entry is a list: > + > + (STYLE HOOK1 HOOK2 ...) > + > +where the first element STYLE is the name of the style, and the > +remaining elements HOOKN, if any, are hooks to be run when that > +style is active. > + > +A hook HOOKN may be a hook function HOOK-FUN to be run in > +all TeX dialects (LaTeX, Texinfo, etc.), or a vector like: > + > + [TeX-style-hook HOOK-FUN SORTED-DIALECT-LIST] > + > +where HOOK-FUN is the hook function to be run, and > +SORTED-DIALECT-LIST is a list containing all dialects in which > +the hook function may be run. This list is sorted with function > +`string<' and it must contain at least one dialect. > + > +For supported dialects, see variables `TeX-style-hook-dialect'.") Could you please add a comment here that you don't manipulate that variable directly but only via `TeX-add-style-hook' and friends which will take care of the correct sorting? > +(defun TeX-shdex-nor (&rest args) > + "NOR operator for style hook dialect expressions. The returned > +value is a list of dialects that are in > +`TeX-style-hook-dialect-list' but not in ARGS." > + (setq args (apply 'TeX-shdex-or args)) Shouldn't that apply `TeX-shdex-eval' on the args? > +(defun TeX-shdex-eval (&rest args) > + "Evaluate a style hook dialect expression ARGS." > + (sort (apply 'append (mapcar > + (lambda (dialect-expr) > + (cond > + ((symbolp dialect-expr) > + (list dialect-expr)) > + ((and (consp dialect-expr) > + (memq (car dialect-expr) '(or and nor))) > + (apply (intern > + (concat "TeX-shdex-" (symbol-name (car > dialect-expr)))) > + (cdr dialect-expr))) > + (t > + (error "Invalid dialect expression : %S." > dialect-expr)))) > + args)) > + 'string<)) Please move that before the operator functions because they call it to remove some undefined function warnings. Bye, Tassilo _______________________________________________ auctex mailing list [email protected] https://lists.gnu.org/mailman/listinfo/auctex
