;; Author: Steve Youngs <steve@sxemacs.org>
;; Maintainer: Steve Youngs <steve@sxemacs.org>
;; Created: <2007-12-02>
-;; Time-stamp: <Wednesday Feb 12, 2020 16:45:05 steve>
+;; Time-stamp: <Monday Mar 16, 2020 12:51:47 steve>
;; Download: <http://bastard.steveyoungs.com/~steve/SXEmacs/inits/>
;; HTMLised: <http://bastard.steveyoungs.com/~steve/SXEmacs/htmlinits/05-latex-sy.html>
-;; Git Repo: git clone http://git.sxemacs.org/syinit
+;; Git Repo: git clone https://git.sxemacs.org/syinit
;; Keywords: init, compile
;; This file is part of SYinit
;; incompatible GNUisms of some kind. Explicitly loading the .el gets
;; around it.
(require 'font-latex "font-latex.el")
+(require 'latex-toolbar)
;:*=======================
;:* Shutup the byte-compiler
" "
(substring time -4) " ")))
-;:*=======================
-;:* outl-mouse-minor-mode for all LaTeX files
-(defun turn-on-outl-mouse-minor-mode ()
- (outl-mouse-minor-mode 1))
-
;:*=======================
;* Hooks.
+(defun sy-LaTeX-toolbar ()
+ (interactive)
+ (set-specifier left-toolbar-width (cons (current-buffer) 32))
+ (latex-toolbar-install))
+
(defun sy-LaTeX-mode-hook ()
(turn-on-auto-fill)
(setq TeX-shell "/bin/zsh")
'("gv" "gv %s.ps" TeX-run-silent t nil))
(add-to-list 'TeX-command-list
'("pdflatex" "pdflatex -interaction=nonstopmode %t"
- TeX-run-command nil t)))
-
-(add-hook 'LaTeX-mode-hook #'sy-LaTeX-mode-hook)
-
+ TeX-run-command nil t))
+ (when (device-on-window-system-p)
+ (outl-mouse-minor-mode 1)
+ (local-set-key [(super hyper t)] #'sy-LaTeX-toolbar)))
-;; Add a couple more things if we're in X
-;;(when (and (device-on-window-system-p)
-;; (featurep 'latex-toolbar)
-;; (featurep 'outl-mouse))
-;; (add-hook 'LaTeX-mode-hook
-;; #'(lambda ()
-;; (turn-on-outl-mouse-minor-mode)
-;; (latex-toolbar-install))))
+(add-hook 'LaTeX-mode-hook #'sy-LaTeX-mode-hook 'append)
(setq LaTeX-section-hook
'(LaTeX-section-heading
;:*=======================
;:* Texinfo
-;; This is _NOT_ the texinfo-mode that comes with AucTeX, because that
-;; sucks. AucTeX actually loads `texinfo.el' and then overwrites
-;; everything with the DAK-inspired crap! So I explicitly load it
-;; here to reinstate the better `texinfo-mode'.
-(require 'texinfo)
+;; Jumping through hoops to ensure that we DO NOT get the AUCTeX
+;; tex-info. The texinfo.el from the "texinfo" (S)XEmacs package is
+;; older, but far, far, superior. Honestly, the AUCTeX / GNU people
+;; have no idea what they're missing.
+(eval-after-load 'tex-info
+ (progn
+ (delq 'texinfo-mode TeX-modes)
+ (defalias 'texinfo-mode #'ignore)
+ (require 'texinfo)))
-;; `texinfo.el' uses the GNU `:inherit' property which (S)XEmacs
-;; doesn't have... a quick `set-face-parent' fixes that.
-;; Update: SXEmacs does have `:inherit' now, at least, I'm pretty sure
-;; it does
(set-face-parent 'texinfo-heading-face 'font-lock-function-name-face)
;; Perdy colours!