Function: TeX-pin-region
TeX-pin-region is an interactive and byte-compiled function defined in
tex.el.
Signature
(TeX-pin-region BEGIN END)
Documentation
Pin the TeX region specified by BEGIN and END.
If BEGIN is nil, the region is unpinned.
In interactive use, a positive prefix arg will pin the region, a non-positive one will unpin it. Without a prefix arg, if a region is actively marked, it will get pinned. If not, a pinned region will get unpinned and vice versa.
Key Bindings
Source Code
;; Defined in ~/.emacs.d/elpa/auctex-14.1.2/tex.el
(defun TeX-pin-region (begin end)
"Pin the TeX region specified by BEGIN and END.
If BEGIN is nil, the region is unpinned.
In interactive use, a positive prefix arg will pin the region,
a non-positive one will unpin it. Without a prefix arg, if
a region is actively marked, it will get pinned. If not, a
pinned region will get unpinned and vice versa."
(interactive
(if
(if current-prefix-arg
(> (prefix-numeric-value current-prefix-arg) 0)
(or (TeX-active-mark)
(null TeX-command-region-begin)))
(list (region-beginning) (region-end))
'(nil nil)))
(if begin
(progn
(unless (markerp TeX-command-region-begin)
(setq TeX-command-region-begin (make-marker))
(setq TeX-command-region-end (make-marker)))
(set-marker TeX-command-region-begin begin)
(set-marker TeX-command-region-end end)
(message "TeX region pinned."))
(when (markerp TeX-command-region-begin)
(set-marker TeX-command-region-begin nil)
(set-marker TeX-command-region-end nil))
(setq TeX-command-region-begin nil)
(setq TeX-command-region-end nil)
(message "TeX region unpinned.")))