diff --git a/.emacs.d/mode-latex.el b/.emacs.d/mode-latex.el index 41d8dd27..f0e7c466 100644 --- a/.emacs.d/mode-latex.el +++ b/.emacs.d/mode-latex.el @@ -40,7 +40,12 @@ ;; LaTeX setup (setq latex-block-default "itemize") -(setq latex-block-names '("description" "listing" "quote" "verbatim")) +(setq latex-block-names '("listing")) + +(mapcar + (lambda (latex-block) + (add-to-list 'latex-block-body-alist `(,latex-block nil '(delete-horizontal-space t) _))) + '("listing" "verbatim" "verbatim*")) (add-hook-and-eval 'latex-mode-hook @@ -81,16 +86,6 @@ (define-skeleton latex-subsection "Insert section command." nil "\\subsection{" @ _ "}" \n) (define-skeleton latex-subsubsection "Insert section command." nil "\\subsubsection{" @ _ "}" \n) -;; TODO: use block option to tell `latex-insert-block not to indent. -(define-skeleton latex-listing - "Insert listing. -This skel is different from `latex-insert-block' in the way that - the content is not indented." - nil - "\\begin{lstlisting}\n" - @ _ \n - "\\end{lstlisting}" > \n @) - ;; TODO: If tabular, center. ;; TODO: complete with '(tabular, align, "pmatrix" "bmatrix" "Bmatrix" "vmatrix" "Vmatrix" "smallmatrix"))}} (define-skeleton latex-matrix