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

@ -927,17 +927,20 @@
"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)
(goto-char r-begin)
(insert delim-begin)))
(progn (progn
(save-excursion (save-excursion
(insert delim-end)) (insert delim-end))
(insert delim-begin)))) (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