Is it possible to write a function with completion that act on region?
A mix of:
(defun function-style (style) (interactive (list (completing-read "Style: " styles-list))) ... And
(defun function-style (beg end) (interactive "r") .... You can use any elisp functions to generate the arguments for an interactive call. The code you use should return a list that matches the function arguments:
(defun my-function (beg end style) (interactive (let ((string (completing-read "Style: " styles-list))) (list (region-beginning) (region-end) string))) <function body> ) See the the manual node (elisp) Using Interactive for details.
completion-at-point-functions.