|
|
|
|
@ -754,13 +754,25 @@ |
|
|
|
|
(if arg (TeX-insert-braces (- 0 arg)) |
|
|
|
|
(insert TeX-grcl))) |
|
|
|
|
#+END_SRC |
|
|
|
|
*** TODO Leftovers |
|
|
|
|
This is a helper for [[https://www.gnu.org/software/emacs/manual/html_node/emacs/Dynamic-Abbrevs.html][Dynamic abbrev expansion]] |
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
(setq TeX-fold-ellipsis " …") |
|
|
|
|
|
|
|
|
|
(defun dabbrev-expand-helper () |
|
|
|
|
(interactive) |
|
|
|
|
(call-interactively 'dabbrev-expand)) |
|
|
|
|
(call-interactively 'dabbrev-expand)) |
|
|
|
|
#+END_SRC |
|
|
|
|
This inserts a char adding some whitespace padding whenever necessary |
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
(defun insert-char-with-padding (arg) |
|
|
|
|
(interactive "*P") |
|
|
|
|
(if (string= (string (preceding-char)) " ") () |
|
|
|
|
(if (string= (string (preceding-char)) "\&") () (insert " "))) |
|
|
|
|
(self-insert-command (prefix-numeric-value arg)) |
|
|
|
|
(if (string= (string (following-char)) " ") () (insert " ")) ;; decide what to do with the point |
|
|
|
|
) |
|
|
|
|
#+END_SRC |
|
|
|
|
*** TODO Leftovers |
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
(setq TeX-fold-ellipsis " …") |
|
|
|
|
|
|
|
|
|
(add-hook 'LaTeX-mode-hook |
|
|
|
|
(lambda () |
|
|
|
|
@ -861,15 +873,6 @@ |
|
|
|
|
(define-key LaTeX-mode-map (kbd "<prior>") (lambda() (interactive) (message "Command disabled"))) |
|
|
|
|
)) |
|
|
|
|
|
|
|
|
|
(defun insert-char-with-padding (arg) |
|
|
|
|
(interactive "*P") |
|
|
|
|
(if (string= (string (preceding-char)) " ") () |
|
|
|
|
(if (string= (string (preceding-char)) "\&") () (insert " "))) |
|
|
|
|
(self-insert-command (prefix-numeric-value arg)) |
|
|
|
|
(if (string= (string (following-char)) " ") () (insert " ")) ;; decide what to do with the point |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
;; this reimplements LaTeX-insert-environment to my taste |
|
|
|
|
;; |
|
|
|
|
(defun LaTeX-insert-environment (environment &optional extra) |
|
|
|
|
|