Skip to main content
deleted 12 characters in body
Source Link
Dan
  • 33.7k
  • 8
  • 108
  • 175

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'"r") .... 

Thanks

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') .... 

Thanks

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") .... 
added 30 characters in body
Source Link
djangoliv
  • 3.3k
  • 18
  • 32

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))) ... 
(defun function-style (style) (interactive (list (completing-read "Style: " styles-list))) ... 

And

(defun function-style (beg end) (interactive 'r') .... 
(defun function-style (beg end) (interactive 'r') .... 

Thanks

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') .... 

Thanks

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') .... 

Thanks

Source Link
djangoliv
  • 3.3k
  • 18
  • 32

defun completion and region

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') .... 

Thanks