Variable: LaTeX-symbols-toolbar-visible-flag

LaTeX-symbols-toolbar-visible-flag is a variable defined in tex-bar.el.

Value

nil

Documentation

Non-nil means that the LaTeX symbols on toolbar are visible.

Internal variable.

Source Code

;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex-bar.el
(let* ((menu-strings-buttons-alist
        ;; make a alist os strings with the symbol classes and store it in
        ;; `menu-strings-alist'
        (let* ((menu-strings-alist-temp))
          (dolist (item-external (cdr LaTeX-math-menu)
                                 (nreverse menu-strings-alist-temp))
            (when (listp item-external)
              ;; if first element is vector, I am supposing that all are
              ;; vectors as well
              (if (vectorp (cadr item-external))
                  (let* ((menu-str (car item-external))
                         (menu-buttons))
                    (dolist (button (cdr item-external))
                      (setq menu-buttons
                            (cons (list (intern (TeX-bar-img-filename
                                                 (aref button 0)))
                                        :image
                                        (concat "symb-pics/"
                                                (TeX-bar-img-filename
                                                 (aref button 0)))
                                        :help (aref button 0)
                                        :command (aref button 1))
                                  menu-buttons)))
                    (setq menu-buttons (nreverse menu-buttons))
                    (setq menu-strings-alist-temp
                          (cons (cons menu-str (list menu-buttons))
                                menu-strings-alist-temp)))
                ;; if another list (therefore, up to second level menu)
                (let ((parent-str (concat (car item-external) " ")))
                  (dolist (item-internal (cdr item-external))
                    (unless (equal (car item-internal) "Special")
                      (let* ((menu-str (concat parent-str
                                               (car item-internal)))
                             (menu-buttons))
                        (dolist (button (cdr item-internal))
                          (setq menu-buttons
                                (cons (list (intern (aref button 0))
                                            :image
                                            (concat "symb-pics/"
                                                    (TeX-bar-img-filename
                                                     (aref button 0)))
                                            :help (aref button 0)
                                            :command (aref button 1))
                                      menu-buttons)))
                        (setq menu-buttons (nreverse menu-buttons))
                        (setq menu-strings-alist-temp
                              (cons (cons menu-str (list menu-buttons))
                                    menu-strings-alist-temp)))))))))))
       (list-strings (let* ((list-str-temp))
                       (dolist (i menu-strings-buttons-alist)
                         (setq list-str-temp (cons (car i)
                                                   list-str-temp)))
                       (nreverse list-str-temp))))
  ;; Will be defined by running LaTeX-install-toolbar.
  (defvar LaTeX-symbols-active-menuitem)
  (defvar LaTeX-symbols-toolbar-visible-flag nil
    "Non-nil means that the LaTeX symbols on toolbar are visible.
Internal variable.")
  (defconst LaTeX-symbols-toolbar-switch-contents
    `(;; the on-off switch button
      (latex-symbols-switch
       :image ,(lambda ()
                 (if LaTeX-symbols-toolbar-visible-flag
                     "ltx-symb-turn-off"
                   "ltx-symb-turn-on"))
       :command (progn
                  (setq LaTeX-symbols-toolbar-visible-flag
                        (not LaTeX-symbols-toolbar-visible-flag))
                  (toolbarx-refresh))
       ;; help message depends on if symb-toolbar is on or off, and in
       ;; the name of the current class of symbols
       :help ,(lambda (&rest _ignore)
                (concat "Turn "
                        (if LaTeX-symbols-toolbar-visible-flag "off " "on ")
                        "the toolbar of LaTeX symbols (current class: "
                        (nth (1- LaTeX-symbols-active-menuitem)
                             list-strings)
                        ")")))
      ;; the dropdown button, that also switch on the symbols
      ,(append '(:dropdown-group)
               list-strings
               '(:variable
                 LaTeX-symbols-active-menuitem
                 :save offer
                 :dropdown-prepend-command
                 (setq LaTeX-symbols-toolbar-visible-flag t)
                 :dropdown-help "Select a class of symbols to be displayed"))))
  (defconst LaTeX-symbols-toolbar-contents
    (let* ((ltx-symb)
           (count 0))
      (dolist (i menu-strings-buttons-alist
                 (append (nreverse ltx-symb)
                         '(:insert
                           LaTeX-symbols-toolbar-visible-flag
                           :toolbar (bottom . top))))
        (setq count (1+ count))
        (setq ltx-symb
              (cons (append (cdr i)
                            `(:insert (eq LaTeX-symbols-active-menuitem
                                          ,count)))
                    ltx-symb))))))