From c522c90d0aa288a37bbf9718cbebb1e5ff1345af Mon Sep 17 00:00:00 2001 From: Jacopo De Simoi Date: Fri, 6 Jul 2018 00:58:00 +0200 Subject: [PATCH] Remove some stuff from LaTeX leftovers --- bibretrieve | 2 +- global.org | 29 ++++++++++++++++------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/bibretrieve b/bibretrieve index 61e29b8..e8ccdc9 160000 --- a/bibretrieve +++ b/bibretrieve @@ -1 +1 @@ -Subproject commit 61e29b8b3996d566e9c7e6a7ff56a72fc3a8b850 +Subproject commit e8ccdc9b9bfec0c5c658f2e9ac3fb81a137549d7 diff --git a/global.org b/global.org index 97818a1..47bad47 100644 --- a/global.org +++ b/global.org @@ -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 "") (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)