(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)
(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
(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)))