AUCTeX Sync -- Build fixes.
authorSteve Youngs <steve@sxemacs.org>
Sun, 5 Apr 2020 10:47:47 +0000 (20:47 +1000)
committerSteve Youngs <steve@sxemacs.org>
Sun, 5 Apr 2020 10:47:47 +0000 (20:47 +1000)
This set of changes gives us a clean AUCTeX v11.92 build.

* xemacs-packages/auctex/sxepkg.el: Add a stack more warning
suppression crud.  Man, I hate this file.

* xemacs-packages/auctex/tex.el (TeX--prettify-symbols-compose-p):
Wrap the wrap in #'eval-when to feed the byte-compiler warnings
monster.
(file): #'defvar at toplevel for ugly AF warn suppression.
(TeX-read-string): The "XEmacs" version... Don't bother trying to
see if it can take 5 args because nowhere in AUCTeX does it use
more than 2.
(TeX-how-many): Conditionalise on 'emacs' feature because
'emacs-major-version' is >= for SXEmacs too. And wrap in a
snuggly, warm #'eval-when-compile.

* xemacs-packages/auctex/latex.el (LaTeX-env-args): Use
#'if-boundp for warning suppression.

* xemacs-packages/auctex/bib-cite.el (bib-cite--fontify-help): Use
#'if-fboundp to avoid warnings.
(bib-cite-fontify-help-xemacs): Wrap in #'eval-when to avoid
warnings.

* xemacs-packages/auctex/package-info.in (provides): Add
tex-ispell, tex-wizard.

* xemacs-packages/auctex/Makefile (ELCS): Add tex-ispell.elc,
tex-wizard.elc

Signed-off-by: Steve Youngs <steve@sxemacs.org>
xemacs-packages/auctex/Makefile
xemacs-packages/auctex/bib-cite.el
xemacs-packages/auctex/latex.el
xemacs-packages/auctex/package-info.in
xemacs-packages/auctex/sxepkg.el
xemacs-packages/auctex/tex.el

index 9d42d75..c4bc16a 100644 (file)
@@ -39,9 +39,9 @@ PDFLATEX = pdflatex
 ELCS = bib-cite.elc context-en.elc context-nl.elc context.elc   \
        font-latex.elc latex.elc multi-prompt.elc plain-tex.elc \
        preview.elc prv-xemacs.elc tex-bar.elc tex-buf.elc      \
-       tex-fold.elc tex-font.elc tex-info.elc tex-mik.elc      \
-       tex-site.elc tex-style.elc tex.elc texmathp.elc         \
-       toolbar-x.elc
+       tex-fold.elc tex-font.elc tex-info.elc tex-ispell.elc   \
+       tex-mik.elc tex-site.elc tex-style.elc tex-wizard.elc   \
+       tex.elc texmathp.elc toolbar-x.elc
 
 ifeq ($(BUILD_WITHOUT_MULE),)
 ELCS += tex-jp.elc
index 1207bd6..56f07dc 100644 (file)
@@ -1228,6 +1228,7 @@ to create a bibtex file containing only the references used in the document."
       (put-text-property (point-min)(or limit (point-max))
                         'face 'red-bold))))
 
+(eval-when (compile load eval)
 (when (featurep 'xemacs)
   (defun bib-cite-fontify-help-xemacs (defaults)
     (if (fboundp 'font-lock-set-defaults-1) ; >= XEmacs 19.14
@@ -1240,14 +1241,15 @@ to create a bibtex file containing only the references used in the document."
           (setq font-lock-defaults-computed nil
                 font-lock-keywords nil)
           (font-lock-set-defaults-1)))))
+)
 
 (defun bib-cite--fontify-help ()
   ;; FIXME: This looks ugly and incorrect.
   (if font-lock-mode
       (font-lock-mode -1)
-    (if (fboundp 'font-lock-unset-defaults) (font-lock-unset-defaults))
+    (if-fboundp 'font-lock-unset-defaults (font-lock-unset-defaults))
     (font-lock-unfontify-buffer))
-  (if (fboundp 'font-lock-ensure)
+  (if-fboundp 'font-lock-ensure
       (font-lock-ensure)
     (with-no-warnings (font-lock-fontify-buffer))))
 
index b6f6b51..88318fa 100644 (file)
@@ -1243,7 +1243,7 @@ Just like array and tabular."
   (save-excursion
     (LaTeX-find-matching-begin)
     (end-of-line)
-    (let ((exit-mark (if (boundp 'exit-mark)
+    (let ((exit-mark (if-boundp 'exit-mark
                         exit-mark
                       (make-marker))))
       (TeX-parse-arguments args))))
index a9afbc5..fff78b7 100644 (file)
@@ -15,8 +15,8 @@
    size SIZE
    provides (bib-cite context-en context-nl context font-latex latex
         multi-prompt plain-tex preview prv-xemacs tex-bar tex-buf tex-fold
-        tex-font tex-info tex-jp tex-mik tex-site tex-style tex texmathp
-        toolbar-x)
+        tex-font tex-info tex-ispell tex-jp tex-mik tex-site tex-style
+        tex-wizard tex texmathp toolbar-x)
    requires (REQUIRES)
    type regular
 ))
index b02ba54..b3b45e3 100644 (file)
 (defun maybe-bind (args)
   (mapcar (lambda (var) (unless (boundp var) (set var nil))) args))
 
+;; From GNU Emacs' byte-run.el
+(unless (fboundp 'with-no-warnings)
+  (defun with-no-warnings (&rest body)
+    (car (last body))))
+
 ;;; AUCTeX lisp
 (when (equal "bib-cite.el" current-file)
   (maybe-fbind
-   '(dired-split find-tag-noselect font-lock-unset-defaults
-     dired-replace-in-string))
+   '(dired-split find-tag-noselect dired-replace-in-string))
   (autoload 'LaTeX-bibitem-list "latex")
   (autoload 'LaTeX-bibliography-list "latex")
   (autoload 'TeX-auto-write "tex")
      TeX-auto-save TeX-auto-update TeX-auto-regexp-list)))
 
 (when (equal "context.el" current-file)
+  (autoload 'TeX-read-string "tex")
+  (autoload 'TeX-active-mark "tex")
+  (autoload 'TeX-activate-region "tex")
   (maybe-fbind
-   '(abbrev-table-put easy-menu-return-item metapost-mode)))
+   '(abbrev-table-put easy-menu-return-item metapost-mode))
+  (maybe-bind '(ConTeXt-extra-paragraph-commands)))
 
 (when (equal "font-latex.el" current-file)
   (maybe-fbind '(string-make-multibyte set-face-attribute))
   (maybe-bind
    '(font-latex-fontify-sectioning font-lock-set-defaults
      inhibit-point-motion-hooks inhibit-modification-hooks
-     deactivate-mark)))
+     deactivate-mark prettify-symbols-mode prettify-symbols--keywords
+     file-local-variables-alist LaTeX-verbatim-environments-local
+     LaTeX-verbatim-macros-with-braces-local
+     LaTeX-verbatim-macros-with-delims-local)))
 
 (when (equal "latex.el" current-file)
   (autoload 'LaTeX-install-toolbar "tex-bar" nil t)
@@ -57,7 +68,7 @@
   (maybe-fbind
    '(abbrev-table-put char-category-set fill-delete-newlines
      fill-delete-prefix fill-find-break-point fill-indent-to-left-margin
-     fill-move-to-break-point))
+     fill-move-to-break-point format-message))
   (maybe-bind
    '(BibTeX-auto-regexp-list LaTeX-header-end LaTeX-indent-environment-list
      LaTeX-math-abbrev-prefix LaTeX-math-default LaTeX-math-list
@@ -83,6 +94,7 @@
   (autoload 'TeX-install-toolbar "tex-bar" nil t))
 
 (when (equal "preview.el" current-file)
+  (maybe-fbind '(byte-to-string))
   (maybe-bind
    '(TeX-japanese-process-output-coding-system
      TeX-japanese-process-output-coding-system context
   (maybe-fbind
    '(event-start posn-point posn-window select-frame-set-input-focus
      tabulated-list-get-id tabulated-list-init-header tabulated-list-mode
-     tabulated-list-print window-splittable-p))
+     tabulated-list-print window-splittable-p add-file-local-variable
+     japanese-TeX-set-process-coding-system TeX-special-mode))
   (maybe-bind
    '(LaTeX-using-Biber TeX-command-buffer TeX-command-pos
      TeX-command-text TeX-current-page TeX-current-process-region-p
      compilation-in-progress dos-machine-type file font-lock-defaults-alist
      inhibit-field-text-motion inhibit-point-motion-hooks menu-map
      orig-buffer shell-command-option tabulated-list-entries
-     tabulated-list-format tabulated-list-padding)))
+     tabulated-list-format tabulated-list-padding japanese-TeX-mode
+     ConTeXt-Mark-version magic-mode-alist find-file-hook)))
 
 (when (equal "tex-fold.el" current-file)
   (require 'overlay)
      is-beg-section reftex-label-alist-builtin
      reftex-label-alist-builtin reftex-mode)))
 
+(when (equal "tex-jp.el" current-file)
+  (autoload 'font-latex-add-keywords "font-latex")
+  (maybe-fbind '(get-coding-system-from-locale current-locale))
+  (maybe-bind
+   '(TeX-command-buffer japanese-TeX-mode
+     TeX-japanese-process-output-coding-system
+     TeX-japanese-process-input-coding-system TeX-error-description-list
+     locale-coding-system)))
+
 (when (equal "tex-mik.el" current-file)
   (maybe-bind
    '(TeX-kpathsea-path-delimiter TeX-output-view-style TeX-print-command
 (defun line-number-at-pos (&optional pos)
   (line-number pos t))
 
+(when (equal "tex-wizard.el" current-file)
+  (maybe-fbind '(info-other-window))
+  (maybe-bind '(LaTeX-mode-hook latex-mode-hook reftex-plug-into-AUCTeX)))
+
 (when (equal "tex.el" current-file)
   (autoload 'font-latex-faces-present-p "font-latex")
   (autoload 'ispell "ispell" nil t)
   (autoload 'url-hexify-string "url-util")
   (autoload 'url-unhex-string "url-util")
   (autoload 'LaTeX-environment-list "latex")
+  (autoload 'LaTeX-verbatim-macros-with-delims "latex")
+  (autoload 'TeX-command-expand "tex-buf")
+  (autoload 'TeX-pop-to-buffer "tex-buf")
+  (defalias 'x-focus-frame 'focus-frame)
   (mapfam :result-type 'void
          #'(lambda (fn)
              (autoload fn "overlay"))
    '(comment-forward comment-normalize-vars activate-mark deactivate-mark
      dbus-call-method dbus-get-unique-name dbus-ignore-errors
      dbus-introspect-get-method dbus-ping dbus-register-signal 
-     TeX-active-master TeX-output-extension))
+     TeX-active-master TeX-output-extension deactivate-input-method
+     pdf-sync-forward-search quit-window select-frame-set-input-focus
+     url-encode-url tex--prettify-symbols-compose-p))
   (maybe-bind
    '(BibLaTeX-global-style-files BibTeX-file-extensions BibTeX-global-files
      BibTeX-global-style-files LaTeX-global-class-files LaTeX-math-mode
      hilit-patterns-alist ispell-enable-tex-parser ispell-tex-p japanese-TeX-mode
      last-optional-rejected mark-active name reporter-prompt-for-summary-p
      server-process texmathp-why transient-mark-mode upcase url-unreserved-chars
-     user-emacs-directory)))
-
+     user-emacs-directory LaTeX-default-verb-delimiter
+     LaTeX-verbatim-environments-local LaTeX-verbatim-macros-with-braces-local
+     LaTeX-verbatim-macros-with-delims-local TeX-current-process-region-p
+     TeX-ispell-verb-delimiters TeX-region TeX-region-orig-buffer
+     crm-completion-table crm-local-completion-map crm-local-must-match-map
+     dbus-debug doc file tex--prettify-symbols-alist)))
 
 (when (equal "toolbar-x.el" current-file)
-  (maybe-fbind '(define-key-after create-image find-image)))
-
-(when (equal "tex-jp.el" current-file)
-  (maybe-bind
-   '(TeX-command-buffer japanese-TeX-mode
-     TeX-japanese-process-output-coding-system
-     TeX-japanese-process-input-coding-system TeX-error-description-list)))
+  (maybe-fbind
+   '(define-key-after create-image find-image
+     toolbarx-emacs-mount-popup-menu toolbarx-emacs-refresh)))
 
 ;; custom-defines loooooves to spit tonnes of warnings
 (when (equal "custom-defines.el" current-file)
    '(font-latex-sectioning-max font-latex-built-in-keyword-classes
      LaTeX-paragraph-commands-regexp LaTeX-math-default
      shell-command-option TeX-mode-alist TeX-data-directory
+     TeX-clean-default-intermediate-suffixes
      user-emacs-directory)))
 
 ;;; Style Files
   (autoload 'font-latex-add-keywords "font-latex")
   (autoload 'font-latex-add-quotes "font-latex")
   (autoload 'font-latex-set-syntactic-keywords "font-latex")
+  (autoload 'font-latex-update-font-lock "font-latex")
+  (autoload 'TeX-check-engine-add-engines "tex-buf")
+  (autoload 'TeX-read-string "tex")
   (maybe-fbind
    '(coding-system-equal insert-pair latexenc-coding-system-to-inputenc
      latexenc-inputenc-to-coding-system reftex-add-to-label-alist
      reftex-ref-style-activate))
-  (maybe-bind '(font-lock-set-defaults)))
+  (maybe-bind
+   '(font-lock-set-defaults LaTeX-caption-key-val-options
+     LaTeX-caption-key-val-options-local LaTeX-fancyvrb-key-val-options-local
+     LaTeX-graphicx-package-options LaTeX-tcolorbox-keyval-options-full
+     LaTeX-article-class-options LaTeX-bicaption-key-val-options
+     LaTeX-caption-supported-float-types LaTeX-italian-close-quote
+     LaTeX-italian-open-quote LaTeX-mathtools-package-options
+     LaTeX-subcaption-key-val-options LaTeX-tcolorbox-keyval-options-local
+     TeX-TikZ-point-function-map TeX-check-engine-list environment exit-mark
+     reftex-label-regexps)))
+
+(when (equal "style/empheq.el" current-file)
+  (load-file "style/amsmath.el"))
+
+(when (equal "style/gloss-italian.el" current-file)
+  (load-file "style/polyglossia.el"))
+
+(when (equal "style/graphics.el" current-file)
+  (maybe-bind '(LaTeX-graphics-package-options)))
+
+(when (equal "style/minted.el" current-file)
+  (maybe-fbind '(LaTeX-add-newfloat-DeclareFloatingEnvironments)))
 
 (when (equal "style/pstricks.el" current-file)
   (autoload 'multi-prompt-key-value "multi-prompt")
   (maybe-bind '(LaTeX-emp-fig-name LaTeX-emp-file-name
                mpost-emp-file-name)))
 
-(when (equal "style/biblatex.el" current-file)
-  (autoload 'TeX-read-string "tex"))
-
 (when (equal "style/dinbrief.el" current-file)
   (autoload 'TeX-mark-active "tex"))
 
 (when (equal "style/doc.el" current-file)
   (autoload 'TeX-active-mark "tex"))
+
+(when (equal "style/tcolorbox.el" current-file)
+  (maybe-fbind '(LaTeX-xcolor-definecolor-list)))
+
+(when (string-match #r"style/\(bi\)?caption\.el" current-file)
+  (load-file "style/babel.el")
+  (load-file "style/polyglossia.el")
+  (maybe-fbind '(LaTeX-newfloat-DeclareFloatingEnvironment-list)))
index cee3565..5948223 100644 (file)
@@ -701,15 +701,11 @@ overlays between two existing ones.")
 
 
 ;;; Special support for XEmacs
-(eval-when-compile
+(eval-when (compile load eval)
 (when (featurep 'xemacs)
 
-  (defun TeX-read-string
-      (prompt &optional initial-input history default-value)
-    (condition-case nil
-       (read-string prompt initial-input history default-value t)
-      (wrong-number-of-arguments
-       (read-string prompt initial-input history default-value))))
+  (defun TeX-read-string (prompt &optional initial-input history default-value)
+    (read-string prompt initial-input history default-value))
 
   (defun TeX-mark-active ()
     ;; In Lucid (mark) returns nil when not active.
@@ -1283,6 +1279,7 @@ DE is the name of the desktop environment, APP is the name of viewer."
                                                 (cdr (caar (cdr elem)))))
                                             spec)))))))))
 
+(defvar file)
 (defun TeX-pdf-tools-sync-view ()
   "Focus the focused page/paragraph in `pdf-view-mode'.
 If `TeX-source-correlate-mode' is disabled, only find and pop to
@@ -3782,6 +3779,7 @@ The algorithm is as follows:
                     answer
                   TeX-default-mode))))))
 
+(eval-when (compile load eval)
 (when (and (boundp 'tex--prettify-symbols-alist)
           (boundp 'prettify-symbols-compose-predicate))
   (defun TeX--prettify-symbols-compose-p (start end match)
@@ -3790,6 +3788,7 @@ The algorithm is as follows:
                (if (consp face)
                    (memq 'font-latex-verbatim-face face)
                  (eq face 'font-latex-verbatim-face)))))))
+)
 
 (defun VirTeX-common-initialization ()
   "Perform basic initialization."
@@ -6790,7 +6789,8 @@ Supports restriction to a region where the XEmacs version doesn't
 and always returns the number of matches, also in XEmacs and GNU
 Emacs 21."
   ;; Emacs >= 22 does what we want.
-  (if (>= emacs-major-version 22)
+  (if (and (>= emacs-major-version 22)
+          (featurep 'emacs))
       (how-many regexp rstart rend)
     ;; XEmacs and GNU Emacs 21 don't return the number of matches but only print
     ;; it.