auctex-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-diffs] GNU AUCTeX branch, master, updated. b7d45e19c69da59026129


From: Ikumi Keita
Subject: [AUCTeX-diffs] GNU AUCTeX branch, master, updated. b7d45e19c69da59026129e38289cd195c736bd46
Date: Mon, 7 Mar 2022 03:22:42 -0500 (EST)

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU AUCTeX".

The branch, master has been updated
       via  b7d45e19c69da59026129e38289cd195c736bd46 (commit)
      from  c050335dd83778a05b9abaff354ad2573b972158 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b7d45e19c69da59026129e38289cd195c736bd46
Author: Ikumi Keita <ikumi@ikumi.que.jp>
Date:   Fri Mar 4 01:19:16 2022 +0900

    Discard obsolete hook
    
    * latex.el (LaTeX-maybe-install-toolbar):
    * plain-tex.el (plain-TeX-maybe-install-toolbar):
    Install only when tool bar is active.
    * latex.el (TeX-latex-mode):
    * plain-tex.el (TeX-plain-tex-mode):
    Use `tool-bar-mode-hook' instead of `tool-bar-mode-on-hook' since the
    latter is backward compatibility only variable, according to a comment
    in `define-minor-mode'.
    Call `LaTeX-maybe-install-toolbar' or
    `plain-TeX-maybe-install-toolbar' unconditionally since mode check is
    done in the respective functions now.

diff --git a/latex.el b/latex.el
index f8dd1551..56a7a300 100644
--- a/latex.el
+++ b/latex.el
@@ -6464,8 +6464,9 @@ If prefix argument FORCE is non-nil, always insert a 
regular hyphen."
 
 (defun LaTeX-maybe-install-toolbar ()
   "Conditionally install tool bar buttons for LaTeX mode.
-Install tool bar if `LaTeX-enable-toolbar' is non-nil."
-  (when LaTeX-enable-toolbar
+Install tool bar if `LaTeX-enable-toolbar' and `tool-bar-mode' is
+non-nil."
+  (when (and LaTeX-enable-toolbar tool-bar-mode)
     ;; Defined in `tex-bar.el':
     (LaTeX-install-toolbar)))
 
@@ -6949,9 +6950,8 @@ of `LaTeX-mode-hook'."
   (setq major-mode 'latex-mode)
   (setq TeX-command-default "LaTeX")
   (setq TeX-sentinel-default-function #'TeX-LaTeX-sentinel)
-  (add-hook 'tool-bar-mode-on-hook #'LaTeX-maybe-install-toolbar nil t)
-  (when (and (boundp 'tool-bar-mode) tool-bar-mode)
-    (LaTeX-maybe-install-toolbar))
+  (add-hook 'tool-bar-mode-hook #'LaTeX-maybe-install-toolbar nil t)
+  (LaTeX-maybe-install-toolbar)
   ;; Set the value of `LaTeX-using-Biber' based on the local value of
   ;; `LaTeX-biblatex-use-Biber'.  This should be run within
   ;; `TeX-update-style-hook' before toolbarx-refresh, otherwise the 
bibliography
diff --git a/plain-tex.el b/plain-tex.el
index 0d43fdba..7feb14d6 100644
--- a/plain-tex.el
+++ b/plain-tex.el
@@ -40,8 +40,9 @@
 
 (defun plain-TeX-maybe-install-toolbar ()
   "Conditionally install tool bar buttons for plain TeX mode.
-Install tool bar if `plain-TeX-enable-toolbar' is non-nil."
-  (when plain-TeX-enable-toolbar
+Install tool bar if `plain-TeX-enable-toolbar' and
+`tool-bar-mode' is non-nil."
+  (when (and plain-TeX-enable-toolbar tool-bar-mode)
     ;; Defined in `tex-bar.el':
     (TeX-install-toolbar)))
 
@@ -133,9 +134,8 @@ of `plain-TeX-mode-hook'."
   (setq TeX-base-mode-name "TeX")
   (setq TeX-command-default "TeX")
   (setq TeX-sentinel-default-function #'TeX-TeX-sentinel)
-  (add-hook 'tool-bar-mode-on-hook #'plain-TeX-maybe-install-toolbar nil t)
-  (when (and (boundp 'tool-bar-mode) tool-bar-mode)
-    (plain-TeX-maybe-install-toolbar))
+  (add-hook 'tool-bar-mode-hook #'plain-TeX-maybe-install-toolbar nil t)
+  (plain-TeX-maybe-install-toolbar)
   (run-mode-hooks 'text-mode-hook 'TeX-mode-hook 'plain-TeX-mode-hook)
   (TeX-set-mode-name))
 

-----------------------------------------------------------------------

Summary of changes:
 latex.el     | 10 +++++-----
 plain-tex.el | 10 +++++-----
 2 files changed, 10 insertions(+), 10 deletions(-)


hooks/post-receive
-- 
GNU AUCTeX



reply via email to

[Prev in Thread] Current Thread [Next in Thread]