monnier pushed a commit to branch externals/auctex
in repository elpa.
commit e250b18259678309572a0be38b4c0479f5579ad9
Author: Tassilo Horn <[email protected]>
Date: Fri Nov 8 10:27:34 2013 +0100
Revert "Distinguish common and advanced macros/envs."
This reverts commit f8a3a8bdd4aae28d302b5c04fa602584a7406f4c.
---
ChangeLog | 10 ------
doc/auctex.texi | 81 +-----------------------------------------------------
doc/changes.texi | 11 -------
latex.el | 5 ---
tex.el | 40 --------------------------
5 files changed, 1 insertions(+), 146 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 5b2dedf..945802c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,13 +1,3 @@
-2013-11-07 Tassilo Horn <[email protected]>
-
- * tex.el (TeX-add-advanced-macros/envs): New defcustom.
- (TeX-add-advanced-macros/envs-p): New function.
-
- * doc/auctex.texi: Document addition of common vs. advanced macros
- and environments both for users and style file authors.
-
- * doc/changes.texi: Give a hint to the above.
-
2013-11-05 Mos� Giordano <[email protected]>
* doc/auctex.texi (Folding): Document `TeX-fold-auto' and
diff --git a/doc/auctex.texi b/doc/auctex.texi
index e6deb84..3cf7dcb 100644
--- a/doc/auctex.texi
+++ b/doc/auctex.texi
@@ -1230,22 +1230,7 @@ use its value to decided what to do, whatever the value
of the variable
Completions work because @AUCTeX{} can analyze @TeX{} files, and store
symbols in Emacs Lisp files for later retrieval. @xref{Automatic}, for
-more information. Additionally, @AUCTeX{} comes with a library of
-handwritten style files for various popular @LaTeX{} packages that add
-macros and environments for completion, @xref{Style Files}. Many
-packages provide a small set of macros/environments that are likely to
-be used by most users. But often they also provide more advanced macros
-that allow expert users to twiddle and fine-tune the behaviour of a
-package. The following user option determines if these style files
-should only register the commonly used or also the advanced macros and
-environments.
-
-@defopt TeX-add-advanced-macros/envs
-If nil (the default), only register commonly used macros and
-environments. If t, also register all advanced macros/environments.
-Else, it should be a list of package names from which advanced macros
-and environments should be registered.
-@end defopt
+more information.
@cindex \cite, completion of
@cindex Bib@TeX{}, completion
@@ -1265,7 +1250,6 @@ the Bib@TeX{} files have been saved at least once after
you enabled
automatic parsing on save, and that the basename of the Bib@TeX{} file
does not conflict with the basename of one of @TeX{} files.
-
@node Marking
@section Marking Environments, Sections, or Texinfo Nodes
@@ -4068,7 +4052,6 @@ directories instead of @file{auto} directories.
* Simple Style:: A Simple Style File
* Adding Macros:: Adding Support for Macros
* Adding Environments:: Adding Support for Environments
-* Common vs. advanced:: Common versus Advanced Macros and Environments
* Adding Other:: Adding Other Information
* Hacking the Parser:: Automatic Extraction of New Things
@end menu
@@ -4524,68 +4507,6 @@ an optional argument of the @samp{lstlisting}
environment:
@end lisp
@end ftable
-@node Common vs. advanced
-@subsection Adding Common versus Advanced Macros and Environments
-@cindex Common vs. advanced macros
-@cindex Common vs. advanced environments
-@cindex Macros, adding
-@cindex Environments, adding
-@cindex Defining macros in style hooks
-@cindex Defining environments in style hooks
-
-Many @LaTeX{} packages define a small set of macros and environments
-that are likely to be used by anyone using that package. But
-oftentimes, they also define many advanced macros or environments that
-allow expert users to twiddle with and fine-tune the package's behavior.
-
-When writing an @AUCTeX{} style file for a package, it makes sense to
-try to distinguish those user-level, common commands from those that are
-not interesting for most users. Then users can configure the following
-option to enable/disable advanced commands, or to enable them only for a
-specific set of packages.
-
-@defopt TeX-add-advanced-macros/envs
-If nil (the default), only add commonly used macros and environments.
-If t, also add all advanced macros/environments of all used packages.
-Else, it should be a list of package names from which advanced macros
-and environments should be registered.
-@end defopt
-
-In order to enable that feature, make your style file add the advanced
-macros and environments only if the following predicate returns non-nil
-when given the name of your style.
-
-@defun TeX-add-advanced-macros/envs-p @var{style}
-Return non-nil if the advanced macros and environments of @var{style}
-should be added.
-@end defun
-
-For example, assume you write a style file for a hypothetical @LaTeX{}
-package @code{fooquux}. That package provides the commonly used macro
-@code{\foo}, and the environment @code{quux}. Furthermore, it provides
-the @code{\bar} macro and the @code{fubar} environment, however, those
-are only useful if one needs to fiddle with details, and as such are
-rarely used. In that case, your style file should go like this:
-
-@lisp
-(TeX-add-style-hook
- "foobarquux"
- (lambda ()
- ;; Add common macros and environments
- (TeX-add-symbols '("foo" ...))
- (LaTeX-add-environments '("quux" ...))
- ;; Also add the advanced commands if the user wants to
- (when (TeX-add-advanced-macros/envs-p "foobarquux")
- (TeX-add-symbols '("bar" ...))
- (LaTeX-add-environments '("fubar" ...)))))
-@end lisp
-
-The distinction of what macro or environment is common and what is
-advanced is a pretty subjective issue, of course. As a general rule of
-thumb, if the package's documentation has a usage, tutorial, or overview
-section, then the macros and environments discussed in there are
-probably the commonly used ones, the rest being advanced.
-
@node Adding Other
@subsection Adding Other Information
@cindex Adding bibliographies
diff --git a/doc/changes.texi b/doc/changes.texi
index 4127384..949b2e9 100644
--- a/doc/changes.texi
+++ b/doc/changes.texi
@@ -10,17 +10,6 @@
@heading News in 11.88
@itemize @bullet
-
-@item
-Users can now define if style files should add only commonly used macros
-and environments to @AUCTeX{}'s completion machinery, or if advanced,
-rarely used commands are added, too. This can be configured using the
-new configure option @code{TeX-add-advanced-macros/envs}.
-
-Style file authors are encouraged to distinguish common from advanced
-macros/environments, and add the latter only if the new predicate
-@code{TeX-add-advanced-macros/envs-p} returns non-nil.
-
@item
Management of @LaTeX{} package options in the parser was improved. You
might need to reparse your documents, especially if you loaded the
diff --git a/latex.el b/latex.el
index 5505fe8..095a83c 100644
--- a/latex.el
+++ b/latex.el
@@ -6124,9 +6124,4 @@ i.e. you do _not_ have to cater for this yourself by
adding \\\\' or $."
(provide 'latex)
-
-;; Local Variables:
-;; outline-regexp: "\\(;;\\)\\(;+\\)"
-;; End:
-
;;; latex.el ends here
diff --git a/tex.el b/tex.el
index a3c35d8..17c8a4f 100644
--- a/tex.el
+++ b/tex.el
@@ -2586,45 +2586,6 @@ Or alternatively:
(make-variable-buffer-local 'TeX-default-macro)
-(defcustom TeX-add-advanced-macros/envs nil
- "Determines if advanced macros/environments should be added.
-
-When you use some LaTeX package or input some TeX file, AUCTeX
-runs the style file of that package. AUCTeX comes with a library
-of style files for popular packages like graphicx, href, or
-beamer. These style files make AUCTeX aware of the macros and
-environments that are provided by a package. This information is
-used by AUCTeX's syntax highlighting and macro/environment
-completion.
-
-Many packages provide a small set of macros/environments that are
-likely to be used by most users. But often they also provide
-more advanced macros that allow expert users to twiddle and
-fine-tune the behaviour of a package.
-
-By default, AUCTeX's style files do not add those advanced
-commands in order to keep the macro and environment completion
-slim and discoverable. Using this variable, it is possible also
-add advanced commands, either of all used packages or of only
-some used packages.
-
- - nil Do not add advanced commands (default)
- - (\"href\" \"graphicx\") Register only the advanced commands
- of the href and graphicx packages.
- - t Register"
- :group 'TeX-macro
- :type '(choice (const :tag "Of all used packages" t)
- (repeat :tag "Only of some packages" string)))
-
-(defun TeX-add-advanced-macros/envs-p (style)
- "Return non-nil if advanced macro/envs of STYLE should be added."
- (cond
- ((eq t TeX-add-advanced-macros/envs) t)
- ((listp TeX-add-advanced-macros/envs)
- (member style TeX-add-advanced-macros/envs))
- (t (error "TeX-add-advanced-macros/envs must be nil/t/list of strings but
was %s"
- TeX-add-advanced-macros/envs))))
-
(defcustom TeX-insert-braces t
"*If non-nil, append a empty pair of braces after inserting a macro.
@@ -5848,7 +5809,6 @@ Supports restriction to a region where the XEmacs version
doesn't."
;; Local Variables:
;; coding: iso-8859-1
-;; outline-regexp: "\\(;;\\)\\(;+\\)"
;; End:
;;; tex.el ends here