[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Passing arguments to Elisp function
From: |
jai-bholeki |
Subject: |
Re: Passing arguments to Elisp function |
Date: |
Sun, 01 Nov 2020 21:03:38 +0000 |
Correct. Got it
Cheers.
‐‐‐‐‐‐‐ Original Message ‐‐‐‐‐‐‐
On Sunday, 1 November 2020 21:59, <tomas@tuxteam.de> wrote:
> 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