Function: mantemp-make-mantemps-region
mantemp-make-mantemps-region is an interactive and byte-compiled
function defined in mantemp.el.gz.
Signature
(mantemp-make-mantemps-region)
Documentation
Make manual template instantiations from g++ error messages in the region.
This function does the same thing as mantemp-make-mantemps-buffer,
but operates on the region.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/obsolete/mantemp.el.gz
(defun mantemp-make-mantemps-region ()
"Make manual template instantiations from g++ error messages in the region.
This function does the same thing as `mantemp-make-mantemps-buffer',
but operates on the region."
(interactive)
(let ((cur-buf (current-buffer))
(mantemp-buffer (generate-new-buffer "*mantemp*"))
(str (buffer-substring (mark) (point))))
;; Copy the region to a temporary buffer, make the C++ code there
;; and copy the result back to the current buffer.
(set-buffer mantemp-buffer)
(insert str)
(mantemp-make-mantemps)
(setq str (buffer-string))
(set-buffer cur-buf)
(insert str)
(kill-buffer mantemp-buffer))
(message "Done"))