[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#20780: 25.0.50; explain where to find skeletons in autotype info man
From: |
Nicolas Richard |
Subject: |
bug#20780: 25.0.50; explain where to find skeletons in autotype info manual |
Date: |
Thu, 10 Oct 2019 00:07:10 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Icedove/52.9.1 |
On 09/10/19 20:08, Lars Ingebrigtsen wrote:
> Eli Zaretskii <eliz@gnu.org> writes:
>
>> Fine with me, thanks.
>
> OK; done, and I'm closing this bug report.
Thanks for taking care of this bug report.
FWIW I had not looked any further into skeletons since I wrote the bug
report, and I still have no clue on how to use them. I thought I'd give
it another try just now:
at (info "(autotype) Skeletons as Abbrevs") I found:
> Say you want ???ifst??? to be an abbreviation for the C language if
> statement. You will tell Emacs that ???ifst??? expands to the empty string
> and then calls the skeleton command. In Emacs Lisp you can say
> something like ???(define-abbrev c-mode-abbrev-table "ifst" "" 'c-if)???.
I tried to run that piece of lisp, then typed ifst in a test.c file, and
all I got was an error (void-function c-if)
I do understand that c-if is not defined as a function, but is it
expected that *I* write it ? I was hoping it would just work out of the box.
I still think we should mention some workings examples in the manual,
near the beginning of it.
Now I'm grepping for '(define-skeleton' in the git repo.
It returns results in sh-script.el, modula2.el, python.el and a few
others. Could any of those be mentionned in section 1 ? e.g. in
shell-script-mode, C-c C-c runs sh-case, which is a skeleton. I think
it's a great example of all the things mentionned in section 1.
thanks,
--
Nicolas.