|
|
|
|
@ -907,16 +907,16 @@ |
|
|
|
|
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] |
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
(setq ispell-tex-skip-alists |
|
|
|
|
(list |
|
|
|
|
(append |
|
|
|
|
(car ispell-tex-skip-alists) ;tell ispell to ignore content of this: |
|
|
|
|
'(("\\\\eqref" ispell-tex-arg-end) |
|
|
|
|
("\\\\cite" ispell-tex-arg-end) |
|
|
|
|
("\\\\author" ispell-tex-arg-end) |
|
|
|
|
("\\\\address" ispell-tex-arg-end) |
|
|
|
|
)) |
|
|
|
|
(cadr ispell-tex-skip-alists))) |
|
|
|
|
(setq ispell-tex-skip-alists |
|
|
|
|
(list |
|
|
|
|
(append |
|
|
|
|
(car ispell-tex-skip-alists) ;tell ispell to ignore content of this: |
|
|
|
|
'(("\\\\eqref" ispell-tex-arg-end) |
|
|
|
|
("\\\\cite" ispell-tex-arg-end) |
|
|
|
|
("\\\\author" ispell-tex-arg-end) |
|
|
|
|
("\\\\address" ispell-tex-arg-end) |
|
|
|
|
)) |
|
|
|
|
(cadr ispell-tex-skip-alists))) |
|
|
|
|
#+END_SRC |
|
|
|
|
*** Specialty functions |
|
|
|
|
This function adds a pair of delimiters or surrounds the active region |
|
|
|
|
@ -924,20 +924,23 @@ |
|
|
|
|
TODO it breaks when there is no mark |
|
|
|
|
#+BEGIN_SRC emacs-lisp |
|
|
|
|
(defun add-delimiter (delim-begin delim-end r-begin r-end) |
|
|
|
|
"Add the pair of delimiters given in delim at the ends of the |
|
|
|
|
region if it is activated" |
|
|
|
|
(interactive "cBegin delimiter: \ncEnd delimiter: \nr") |
|
|
|
|
(if (use-region-p) |
|
|
|
|
(progn |
|
|
|
|
(save-excursion |
|
|
|
|
(goto-char r-end) (insert delim-end) |
|
|
|
|
(goto-char r-begin) (insert delim-begin))) |
|
|
|
|
(progn |
|
|
|
|
(save-excursion |
|
|
|
|
(insert delim-end)) |
|
|
|
|
(insert delim-begin)))) |
|
|
|
|
"Add the pair of delimiters given in delim at the ends of the |
|
|
|
|
region if it is activated" |
|
|
|
|
(interactive "cBegin delimiter: \ncEnd delimiter: \nr") |
|
|
|
|
(if (region-active-p) |
|
|
|
|
(progn |
|
|
|
|
(save-excursion |
|
|
|
|
(goto-char r-end) |
|
|
|
|
(insert delim-end) |
|
|
|
|
(goto-char r-begin) |
|
|
|
|
(insert delim-begin))) |
|
|
|
|
(progn |
|
|
|
|
(save-excursion |
|
|
|
|
(insert delim-end)) |
|
|
|
|
(insert delim-begin)))) |
|
|
|
|
#+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 |
|
|
|
|
(defun TeX-insert-braces (arg) |
|
|
|
|
"Make a pair of braces around next ARG sexps and leave point inside. |
|
|
|
|
|