[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Passing arguments to Elisp function
From: |
tomas |
Subject: |
Re: Passing arguments to Elisp function |
Date: |
Sun, 1 Nov 2020 21:59:51 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Sun, Nov 01, 2020 at 04:54:55PM +0000, jai-bholeki via Users list for the
GNU Emacs text editor wrote:
> I have a function gets the beginning and end of a region.
>
> Is is possible to pass another argument to the function that is a character
> 'ch'?
>
> (defun pengo (beg end)
> (interactive "r") ; Specifies Mark and Point, smallest first
> (goto-char beg)
> )
You mean something like this?
(defun foo (beg end ch)
(interactive "rRegion:\ncChar:")
(message "Region: (%d, %d) Char: %c" beg end ch))
(i.e. separate consecutive args in the interactive specification with
a new line, `\n').
Cheers
- t
signature.asc
Description: Digital signature