master
Jacopo De Simoi 7 years ago
parent f3f30244fb
commit e7e592dad9
  1. 49
      global.org

@ -907,16 +907,16 @@
Do not spell-check inside the following commands. See Do not spell-check inside the following commands. See
[https://tex.stackexchange.com/questions/117204/skip-spelling-in-emacs-for-the-content-of-a-user-macro] [https://tex.stackexchange.com/questions/117204/skip-spelling-in-emacs-for-the-content-of-a-user-macro]
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(setq ispell-tex-skip-alists (setq ispell-tex-skip-alists
(list (list
(append (append
(car ispell-tex-skip-alists) ;tell ispell to ignore content of this: (car ispell-tex-skip-alists) ;tell ispell to ignore content of this:
'(("\\\\eqref" ispell-tex-arg-end) '(("\\\\eqref" ispell-tex-arg-end)
("\\\\cite" ispell-tex-arg-end) ("\\\\cite" ispell-tex-arg-end)
("\\\\author" ispell-tex-arg-end) ("\\\\author" ispell-tex-arg-end)
("\\\\address" ispell-tex-arg-end) ("\\\\address" ispell-tex-arg-end)
)) ))
(cadr ispell-tex-skip-alists))) (cadr ispell-tex-skip-alists)))
#+END_SRC #+END_SRC
*** Specialty functions *** Specialty functions
This function adds a pair of delimiters or surrounds the active region This function adds a pair of delimiters or surrounds the active region
@ -924,20 +924,23 @@
TODO it breaks when there is no mark TODO it breaks when there is no mark
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defun add-delimiter (delim-begin delim-end r-begin r-end) (defun add-delimiter (delim-begin delim-end r-begin r-end)
"Add the pair of delimiters given in delim at the ends of the "Add the pair of delimiters given in delim at the ends of the
region if it is activated" region if it is activated"
(interactive "cBegin delimiter: \ncEnd delimiter: \nr") (interactive "cBegin delimiter: \ncEnd delimiter: \nr")
(if (use-region-p) (if (region-active-p)
(progn (progn
(save-excursion (save-excursion
(goto-char r-end) (insert delim-end) (goto-char r-end)
(goto-char r-begin) (insert delim-begin))) (insert delim-end)
(progn (goto-char r-begin)
(save-excursion (insert delim-begin)))
(insert delim-end)) (progn
(insert delim-begin)))) (save-excursion
(insert delim-end))
(insert delim-begin))))
#+END_SRC #+END_SRC
This reimplements =TeX-insert-braces= to work with negative argument The following re-implements =TeX-insert-braces= to work with
negative argument
#+BEGIN_SRC emacs-lisp #+BEGIN_SRC emacs-lisp
(defun TeX-insert-braces (arg) (defun TeX-insert-braces (arg)
"Make a pair of braces around next ARG sexps and leave point inside. "Make a pair of braces around next ARG sexps and leave point inside.

Loading…
Cancel
Save