Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 334904 Details for
Bug 451032
Example files for Emacs test plans
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Example file for app-emacs/mmm-mode
mmm-example.sh (text/plain), 1.22 KB, created by
Ulrich Müller
on 2013-01-09 12:05:57 UTC
(
hide
)
Description:
Example file for app-emacs/mmm-mode
Filename:
MIME Type:
Creator:
Ulrich Müller
Created:
2013-01-09 12:05:57 UTC
Size:
1.22 KB
patch
obsolete
>#! /bin/sh ># One of the long-time standard syntaxes for outputting large amounts >#of code (or text, or HTML, or whatever) from a script (notably shell >#scripts and Perl scripts) is the here-document syntax: > >cat <<END_HTML; ><html> > <head> > <title>Test Page</title> > </head> > <body> > A test. > </body> ></html> >END_HTML > ># The 'here-doc' submode class recognizes this syntax, and can even >#guess the correct submode to use in many cases. For instance, it would >#put the above example in `html-mode', noticing the string `HTML' in the >#name of the here-document. If you use less than evocative >#here-document names, or if the submode is recognized incorrectly for >#any other reason, you can tell it explicitly what submode to use. > >cat <<END_LISP >;; String to integer conversion for arbitrary base. >(defun string-to-base-int (s base) > "Convert S to an integer by parsing it as base BASE number." > (let ((n 0)) > (while (not (string-equal s "")) > (let ((c (downcase (aref s 0)))) > (setq n (+ (* n base) > (cond ((and (>= c ?0) (<= c ?9)) > (- c ?0)) > ((and (>= c ?a) (<= c ?z)) > (- c (- ?a 10))))))) > (setq s (substring s 1))) > n)) >END_LISP > ># Local Variables: ># eval: (mmm-ify-by-class 'here-doc) ># End:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 451032
:
334872
|
334874
|
334876
|
334878
|
334880
|
334882
|
334884
|
334886
|
334888
|
334890
|
334892
|
334894
|
334896
|
334898
|
334900
|
334902
| 334904 |
334906
|
334908
|
334910
|
334912
|
334914
|
334916
|
334918
|
334920
|
334922
|
334924
|
334926
|
334928
|
334930
|
334932
|
334934
|
334936
|
334938
|
353472
|
353474
|
353476
|
360484
|
370044