Skip to content

Commit

Permalink
Merge changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bjasspa committed Dec 4, 2024
2 parents 1c09fba + f227837 commit f5ac9dc
Show file tree
Hide file tree
Showing 5 changed files with 178 additions and 15 deletions.
2 changes: 1 addition & 1 deletion microemacs/doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ TYP9_030= $(DOCDIR)m9typ030.9 $(DOCDIR)m9typ031.9 $(DOCDIR)m9typ032.9\
$(DOCDIR)m9typ039.9
TYP9_040= $(DOCDIR)m9typ040.9 $(DOCDIR)m9typ041.9 $(DOCDIR)m9typ042.9\
$(DOCDIR)m9typ043.9 $(DOCDIR)m9typ044.9 $(DOCDIR)m9typ045.9\
$(DOCDIR)m9typ046.9 $(DOCDIR)m9typ047.9
$(DOCDIR)m9typ046.9 $(DOCDIR)m9typ047.9 $(DOCDIR)m9typ048.9
#
TNIS = me.tni

Expand Down
30 changes: 18 additions & 12 deletions microemacs/doc/m9typ017.9
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
.\" Created By : Jon Green
.\" Created : Sat Feb 6 14:22:09 1999
.\"
.Id $Id: m9typ017.9,v 2.6 2024/12/03 21:11:23 jon Exp $
.Id $Id: m9typ017.9,v 2.6 2024/12/04 09:58:40 jon Exp $
.Im MicroEmacs filetype
.so me.tni
.TH sh 9
Expand Down Expand Up @@ -56,26 +56,31 @@ recognized. Note that this is the typical method of identifying shell files
and will recognize other files not mentioned above i.e. \fBbash\fR shells.
.SH DESCRIPTION
The \fBshell\fR file type template provides simple hilighting of the shell
files. It offers as well folding and support for displaying and outline of the
files. It offers as well folding and support for displaying an outline of the
functions of the shell script for easy navigation using the
.Ht item-list 3
command and expanding abbreviations either via short strings using the
command. Further is is possible to expand abbreviations either via short
strings using the
.Ht expand-abbrev-handle 3
command and visual inserting abbreviations using the
command and visual inserting abbreviations using the mouse by the
.Ht abbrev-list 3
macro.
.IP "\fBFolding and Information Hiding\fR"
Generic folding is enabled within the Shell files. The folds occur about
the function keyword and closing braces \fBfunction...{\fR...\fB}\fR located
on the left-hand margin. The following command are supported to show and hide
the function bodies.
the function keyword and the closing braces \fBfunction...{\fR...\fB}\fR located
on the left-hand margin at the beginning of the line.
The following commands are supported to show and hide the function bodies.
.Ht collapse-all 3
(un)folds all regions in the file,
.Ht collapse-current 3
(un)folds the current region.
.IP "\fBList Items\fR"
Item listing is available and the key constructs of the file may be listed in
the \fIitem-list\fR.
.IP "\fBAbbreviations\fR"
The installation comes with a default abbreviation file for shell editing
which can be used by writing short abbreviations like "\fBfor\fR" and the
which can be used by writing short abbreviations like "\fBfor\fR",
"\fBif\fR" or "\fBfun\fR" - for a Bourne shell or Z-shell function - and then
pressing the key-binding for the
.Ht expand-abbrev-handle 3
command. The list of abbreviations can be used interactively in the GUI
Expand All @@ -99,7 +104,7 @@ The short cut keys used within the buffer are:-
.br
\fBf6\fR \- list items
.br
\fB\*eS f6\fR \- close list items
\fB\*e f6\fR \- close list items
.SH NOTES
.PP
The file hook is implemented in the \fChkshell.emf\fR file, the
Expand All @@ -108,10 +113,11 @@ initialization of the new file is defined in the \fCshell.etf\fR file. To
add your own abbreviations or your own template copy the files to your config
folder and edit them within this folder.
.SH BUGS
None reported.
Functions defined without using the function keyword can't currenly folded
and as well do not appear in the item-list outline.
.PP
There is a heavy bias towards Bourne, Korn and Zsh shells. The author is not a
csh shell user so has probably missed a lot of csh features.
There is a heavy bias towards Bourne, Korn and Zsh shells. The authors are not
csh shell users so have probably missed a lot of csh features.
.SH "SEE ALSO"
.na
.Ht fvwm 9 .
Expand Down
56 changes: 55 additions & 1 deletion microemacs/doc/m9typ033.9
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
.\" Created By : Jon Green
.\" Created : Thu Jun 24 22:02:47 1999
.\"
.Id $Id: m9typ033.9,v 2.6 2022/06/12 17:14:33 jon Exp $
.Id $Id: m9typ033.9,v 2.6 2024/12/04 08:27:19 jon Exp $
.Im MicroEmacs filetype
.so me.tni
.TH python 9
Expand All @@ -18,6 +18,9 @@ python \- Python Language File.
.na
.B hkpython.emf
\- Python Language file hook definition
.br
.B python.eaf
\- Python abbreviation file
.ad
.SH EXTENSIONS
.na
Expand All @@ -36,6 +39,57 @@ files, the template provides minimal hilighting.
.PP
File recognition is performed using the standard file extension \fB.py\fR, or
by the magic string.
.PP
It offers as well folding and support for displaying an outline of the
functions of the Python script for easy navigation using the
.Ht item-list 3
command. Further is is possible to expand abbreviations either via short
strings using the
.Ht expand-abbrev-handle 3
command and visual inserting abbreviations using the mouse by the
.Ht abbrev-list 3
macro.
.IP "\fBFolding and Information Hiding\fR"
Generic folding is enabled within the Python files. The folds occur about
the \fBdef\fR or \fBclass\fR keywords located
on the left-hand margin at the beginning of the line.
The following commands are supported to show and hide the function bodies.
.Ht collapse-all 3
(un)folds all regions in the file,
.Ht collapse-current 3
(un)folds the current region.
.IP "\fBList Items\fR"
Item listing is available and the key constructs of the file may be listed in
the \fIitem-list\fR.
.IP "\fBAbbreviations\fR"
The installation comes with a default abbreviation file for Python code editing
which can be used by writing short abbreviations like "\fBmain\fR"
for a default Python application outline,"\fBfor\fR",
"\fBif\fR" or "\fBdef\fR" - for a Python function, "\fBclass\fR" for a Python
class - and then pressing the key-binding for the
.Ht expand-abbrev-handle 3
command. The list of abbreviations can be used interactively in the GUI
version of \*(mE using the
.Ht abbrev-list 3
command.
.IP "\fBShort Cuts\fR"
The short cut keys used within the buffer are:-
.IP
\fB\*cc \*cc\fR \- Comment out the current line.
.br
\fB\*cc \*cd\fR \- Uncomment the current line.
.br
\fB\*cc \*ce\fR \- Comment to the end of the line with stars (*).
.br
\fB\*a\*ci\fR \- Restyle the current region.
.br
\fBf2\fR \- (un)fold the current region
.br
\fBf3\fR \- (un)fold all regions
.br
\fBf6\fR \- list items
.br
\fB\*e f6\fR \- close list items
.SH BUGS
There would appear to be too much applied hilighting in this file, it could
probably do with rationalizing.
Expand Down
103 changes: 103 additions & 0 deletions microemacs/doc/m9typ048.9
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
.\" -*- nroff -*-
.\" This is part of the JASSPA MicroEmacs documentation files.
.\" Copyright (c) 1999-2009 JASSPA (www.jasspa.com)
.\" See the file "me.nrs" for copying and conditions.
.\"
.\" Created By : Jon Green
.\" Created : Thu Jun 24 22:02:47 1999
.\"
.Id $Id: m9typ033.9,v 2.6 2024/12/04 09:59:20 jon Exp $
.Im MicroEmacs filetype
.so me.tni
.TH r 9
.XI r - "R Language File"
.SH SYNOPSIS
r \- R Language File.
.SH FILES
.na
.B hkr.emf
\- R Language file hook definition
.br
.B r.eaf
\- R language abbreviation file
.ad
.SH EXTENSIONS
.na
\fB.r\fR \- R file
.ad
.SH "MAGIC STRINGS"
.TP
\fB^#![ \\t]*/.*env[ \\t]+Rscript\fR
.\"
\*(mE recognizes the magic string on the first line of the file used to locate
the executable. The Rscript files may be extension-less and are still
recognized.
.SH DESCRIPTION
The \fBR\fR file type template provides simple hilighting of Python
files, the template provides minimal hilighting.
.PP
File recognition is performed using the standard file extension \fB.r\fR,
\fB.R\fR or by the magic string.
.PP
It offers as well folding and support for displaying an outline of the
functions of the R script for easy navigation using the
.Ht item-list 3
command. Further is is possible to expand abbreviations either via short
strings using the
.Ht expand-abbrev-handle 3
command and visual inserting abbreviations using the mouse by the
.Ht abbrev-list 3
macro.
.IP "\fBFolding and Information Hiding\fR"
Generic folding is enabled within the R files. The folds occur about
the \fBfunction\fR keywords located on the left-hand margin at the beginning
of the line if the smaller-minus assignment operator is used.
The following commands are supported to show and hide the function bodies.
.Ht collapse-all 3
(un)folds all regions in the file,
.Ht collapse-current 3
(un)folds the current region.
.IP "\fBList Items\fR"
Item listing is available and the key constructs of the file may be listed in
the \fIitem-list\fR.
.IP "\fBAbbreviations\fR"
The installation comes with a default abbreviation file for R code editing
which can be used by writing short abbreviations like "\fBmain\fR"
for a default Rscript application outline,"\fBfor\fR",
"\fBif\fR" or "\fBfun\fR" - for a R function - and then pressing the
key-binding for the
.Ht expand-abbrev-handle 3
command. The list of abbreviations can be used interactively in the GUI
version of \*(mE using the
.Ht abbrev-list 3
command.
.IP "\fBShort Cuts\fR"
The short cut keys used within the buffer are:-
.IP
\fB\*cc \*cc\fR \- Comment out the current line.
.br
\fB\*cc \*cd\fR \- Uncomment the current line.
.br
\fB\*cc \*ce\fR \- Comment to the end of the line with stars (*).
.br
\fB\*a\*ci\fR \- Restyle the current region.
.br
\fBf2\fR \- (un)fold the current region
.br
\fBf3\fR \- (un)fold all regions
.br
\fBf6\fR \- list items
.br
\fB\*e f6\fR \- close list items
.SH BUGS
Functions with using the equal operator for assignments are not shown in the
function outline, this should be seen as a feature which allow you to write
hidden internal functions within other functions.
.SH "SEE ALSO"
.na
.Ht py 9 .
.Ht sh 9 .
.Hl "Supported File Types" FileTypes -
.ad
.FH

2 changes: 1 addition & 1 deletion microemacs/macros/r.eaf
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ if "if (\p) {\r\r}\P" " if"
elif "elseif (\p) {\r\r}\P" " elif"
else "else {\r\p}\r\P" " else"
while "while (\p) {\r\r}\P" " while"
func "\p <- function (...) {\r\r}\P" " func"
fun "\p <- function (...) {\r\r}\P" " fun"
main "main <- function (argv) {\r\r}\rif (sys.nframe() == 0L && !interactive()) {\r main(commandArgs(trailingOnly=TRUE))\r}" " main"
openw "fout = file(\"\pfilename\",'w')\rcat(\"hello line\\n\",file=fout)\rclose(fout)\r\P" " openw"
openr "fin = file(\"\pfilename\", \"r\")\rwhile(length((line = readLines(fin,n=1)))>0) {\r print(line)\r}\rclose(fin)" " openr"
Expand Down

0 comments on commit f5ac9dc

Please sign in to comment.