Introduce `tempo' subsections and reduce line count in source blocks
This commit is contained in:
parent
d5a67d01bb
commit
825b7e21c4
21
README.org
21
README.org
@ -5746,13 +5746,17 @@ Allows `tempo' expansion by typing <SPC> after a complete `tempo' tag."
|
||||
(car tag) 1 'abbrev-tempo-expand-if-complete)))))
|
||||
#+end_src
|
||||
|
||||
*** Tempo for =AUCTeX='s =LaTeX-mode=
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: sec:tempo-latex
|
||||
:END:
|
||||
|
||||
#+caption[Configure =tempo= for =latex= with =completing-read=]:
|
||||
#+caption: Configure =tempo= for =latex= with =completing-read=.
|
||||
#+name: lst:configure-tempo-latex-completing-read
|
||||
#+begin_src emacs-lisp -n :results silent
|
||||
(with-eval-after-load 'latex
|
||||
(unless (featurep 'tempo)
|
||||
(require 'tempo))
|
||||
(require 'tempo nil 'noerror)
|
||||
|
||||
(defun tempo-latex-environment-handler (element)
|
||||
(when (eq element 'latex-environment)
|
||||
@ -5764,7 +5768,6 @@ Allows `tempo' expansion by typing <SPC> after a complete `tempo' tag."
|
||||
(cl-pushnew 'tempo-latex-environment-handler tempo-user-elements)
|
||||
|
||||
(defun setup-tempo-latex ()
|
||||
(setup-local-tempo-key-bindings)
|
||||
(defvar latex-tempo-tags nil)
|
||||
|
||||
(tempo-define-template
|
||||
@ -5775,18 +5778,24 @@ Allows `tempo' expansion by typing <SPC> after a complete `tempo' tag."
|
||||
'latex-tempo-tags)
|
||||
|
||||
(tempo-use-tag-list 'latex-tempo-tags)
|
||||
(add-tempo-tags-to-abbrev-table latex-tempo-tags latex-mode-abbrev-table))
|
||||
(add-tempo-tags-to-abbrev-table latex-tempo-tags latex-mode-abbrev-table)
|
||||
(setup-local-tempo-key-bindings))
|
||||
|
||||
(add-hook 'LaTeX-mode-hook 'setup-tempo-latex))
|
||||
#+end_src
|
||||
|
||||
|
||||
*** Tempo for =python-mode=
|
||||
:PROPERTIES:
|
||||
:CUSTOM_ID: sec:tempo-python
|
||||
:END:
|
||||
|
||||
#+caption[Configure =tempo= for =python-mode=]:
|
||||
#+caption: Configure =tempo= for =python-mode=.
|
||||
#+name: lst:setup-python-tempo
|
||||
#+begin_src emacs-lisp -n :results silent
|
||||
(with-eval-after-load 'python
|
||||
(unless (featurep 'tempo)
|
||||
(require 'tempo))
|
||||
(require 'tempo nil 'noerror)
|
||||
|
||||
(defun setup-tempo-python ()
|
||||
(defvar python-tempo-tags nil)
|
||||
|
Loading…
Reference in New Issue
Block a user