all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Lars Ingebrigtsen <larsi@gnus.org>
To: Nicolas Richard <theonewiththeevillook@yahoo.fr>
Cc: 20780@debbugs.gnu.org, youngfrog@members.fsf.org
Subject: bug#20780: 25.0.50; explain where to find skeletons in autotype info manual
Date: Fri, 11 Oct 2019 09:44:03 +0200	[thread overview]
Message-ID: <874l0fohfg.fsf@gnus.org> (raw)
In-Reply-To: <97726d28-3219-2598-c5a1-6c70bfdd974e@yahoo.fr> (Nicolas Richard's message of "Thu, 10 Oct 2019 00:07:10 +0200")

Nicolas Richard <theonewiththeevillook@yahoo.fr> writes:

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

I think adding an example to the manual would be great, but I'm not sure
which.  The one you mention seems a bit excessive for the manual...

(define-skeleton sh-case
  "Insert a case/switch statement.  See `sh-feature'."
  (csh "expression: "
       "switch( " str " )" \n
       > "case " (read-string "pattern: ") ?: \n
       > _ \n
       "breaksw" \n
       ( "other pattern, %s: "
	 < "case " str ?: \n
	 > _ \n
	 "breaksw" \n)
       < "default:" \n
       > _ \n
       resume:
       < < "endsw" \n)
  (es)
  (rc "expression: "
      > "switch( " str " ) {" \n
      > "case " (read-string "pattern: ") \n
      > _ \n
      ( "other pattern, %s: "
	"case " str > \n
	> _ \n)
      "case *" > \n
      > _ \n
      resume:
      ?\} > \n)
  (sh "expression: "
      > "case " str " in" \n
      ( "pattern, %s: "
	> str sh-non-closing-paren \n
	> _ \n
	";;" \n)
      > "*" sh-non-closing-paren \n
      > _ \n
      resume:
      "esac" > \n))

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





      reply	other threads:[~2019-10-11  7:44 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-06-09 17:32 bug#20780: 25.0.50; explain where to find skeletons in autotype info manual Nicolas Richard
2019-10-09  3:46 ` Lars Ingebrigtsen
2019-10-09 17:11   ` Eli Zaretskii
2019-10-09 17:44     ` Lars Ingebrigtsen
2019-10-09 18:05       ` Eli Zaretskii
2019-10-09 18:08         ` Lars Ingebrigtsen
2019-10-09 22:07           ` Nicolas Richard via Bug reports for GNU Emacs, the Swiss army knife of text editors
2019-10-11  7:44             ` Lars Ingebrigtsen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=874l0fohfg.fsf@gnus.org \
    --to=larsi@gnus.org \
    --cc=20780@debbugs.gnu.org \
    --cc=theonewiththeevillook@yahoo.fr \
    --cc=youngfrog@members.fsf.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.