Skip to content

Commit 22f15fe

Browse files
author
Detlef Groth
committed
updating md-help info
1 parent c1cd382 commit 22f15fe

File tree

5 files changed

+85
-69
lines changed

5 files changed

+85
-69
lines changed

doc/me.smd

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1069,7 +1069,7 @@
10691069
[info-on(3)](info-on(3)) Display Info on a given topic
10701070
[list-buffers(2)](list-buffers(2)) (C-x C-b) List all buffers and show their status
10711071
[osd-help(3)](osd-help(3)) GUI based on-line help
1072-
[rdoc(3)](rdoc(3)) Display R function and package manual pages
1072+
[r-doc(3)](r-doc(3)) Display R function and package manual pages
10731073

10741074
!! me-id: amicr021
10751075
! Operating Modes
@@ -2093,7 +2093,7 @@
20932093
[quote-char(2)](quote-char(2)) (C-q) Insert literal character
20942094
[rcs-file(2)](rcs-file(2)) (C-x C-q) Handle Revision Control System (RCS) files
20952095
[rdiff(3)](rdiff(3)) Recursively compare files or directories
2096-
[rdoc(3)](rdoc(3)) Display R function and package manual pages
2096+
[r-doc(3)](r-doc(3)) Display R function and package manual pages
20972097
[read-file(2)](read-file(2)) (C-x C-r) Find and load file replacing current buffer
20982098
[read-registry(2)](read-registry(2)) Read in a registry definition file
20992099
[read-session(3)](read-session(3)) Read in session information
@@ -2616,7 +2616,7 @@
26162616
[query-replace-all-string(3)](query-replace-all-string(3)) Query replace string in a list of files
26172617
[query-replace-string-in-files(3)](query-replace-string-in-files(3)) Conditionally search and replace strings across files
26182618
[rdiff(3)](rdiff(3)) Recursively compare files or directories
2619-
[rdoc(3)](rdoc(3)) Display R function and package manual pages
2619+
[r-doc(3)](r-doc(3)) Display R function and package manual pages
26202620
[read-session(3)](read-session(3)) Read in session information
26212621
[replace-all-pairs(3)](replace-all-pairs(3)) Replace string pairs in a list of files
26222622
[replace-all-string(3)](replace-all-string(3)) Replace string with new string in a list of files
@@ -3766,7 +3766,7 @@
37663766
[rc(9)](rc(9)) Microsoft Developer resource file
37673767
[rcs-file(2)](rcs-file(2)) (C-x C-q) Handle Revision Control System (RCS) files
37683768
[rdiff(3)](rdiff(3)) Recursively compare files or directories
3769-
[rdoc(3)](rdoc(3)) Display R function and package manual pages
3769+
[r-doc(3)](r-doc(3)) Display R function and package manual pages
37703770
[read-file(2)](read-file(2)) (C-x C-r) Find and load file replacing current buffer
37713771
[read-registry(2)](read-registry(2)) Read in a registry definition file
37723772
[read-session(3)](read-session(3)) Read in session information
@@ -20253,11 +20253,19 @@ $a
2025320253
!ehelp
2025420254

2025520255
Please note that the header characters `##` must be at the beginning of the
20256-
line.
20256+
line. For code blocks you just indent everything with at least 8 spaces at the
20257+
beginning of the line. If you would like to show short fragments of MicroEmacs
20258+
macro code you should place this code in fenced code blocks like this:
20259+
20260+
```emf
20261+
macro code
20262+
```
2025720263

20264+
The backtick code fences must as well like the headers begin at the first character
20265+
on the documentation line.
20266+
2025820267
## SEE ALSO
2025920268

20260-
2026120269
[ehf(8)](ehf(8)), [help-item(2)](help-item(2)), [define-macro(2)](define-macro(2)), [help-command(2)](help-command(2)), [help-variable(2)](help-variable(2)).
2026220270
!! me-id: m2cmd094
2026320271
! 2 forward-paragraph
@@ -26272,8 +26280,8 @@ $a
2627226280
a start-up hook command. File names and extensions are bound to a set
2627326281
of macro hooks in a space separated list e.g.
2627426282

26275-
[add-file-hook](add-file-hook(2)) "c cpp" "fhook-cmode"
26276-
[add-file-hook](add-file-hook(2)) "doc txt README" "fhook-doc"
26283+
> [add-file-hook](add-file-hook(2)) "c cpp" "fhook-cmode"
26284+
[add-file-hook](add-file-hook(2)) "doc txt README" "fhook-doc"
2627726285

2627826286
> The space separated list of names are interpreted as either file
2627926287
extensions or filenames. In this case any file with the extension __.c__,
@@ -26298,8 +26306,8 @@ $a
2629826306
hooks, except instead of defining a file extension the location and
2629926307
text content of the identifier is defined:
2630026308

26301-
1 [add-file-hook](add-file-hook(2)) "#!/bin/sh" "fhook-shell"
26302-
1 [add-file-hook](add-file-hook(2)) "#!/usr/local/bin/wish" "fhook-tcl"
26309+
> 1 [add-file-hook](add-file-hook(2)) "#!/bin/sh" "fhook-shell"
26310+
1 [add-file-hook](add-file-hook(2)) "#!/usr/local/bin/wish" "fhook-tcl"
2630326311

2630426312
> In this case, any file that commences with "__#!/bin/sh__" is interpreted
2630526313
as a shell script and invokes the shell hook __fhook-shell__. Where the
@@ -26308,7 +26316,7 @@ $a
2630826316
magic sting should be search for without [exact(2m)](exact(2m)) mode then the
2630926317
argument should be negated, e.g.
2631026318

26311-
-4 add-file-hook "<html>" "fhook-html"
26319+
-4 add-file-hook "<html>" "fhook-html"
2631226320

2631326321
> invokes __fhook-html__ whenever "`<html>`", "`<HTML>`" etc. is found in the
2631426322
first 4 lines of a file header, e.g.:
@@ -43354,17 +43362,17 @@ $a
4335443362

4335543363
[scheme-editor(3)](scheme-editor(3))
4335643364
!! me-id: m3mac099
43357-
! 3 rdoc
43365+
! 3 r-doc
4335843366
## NAME
4335943367

4336043368

43361-
|rdoc
43362-
rdoc - display documentation for R functions and packages
43369+
|r-doc
43370+
r-doc - display documentation for R functions and packages
4336343371
$a
4336443372

4336543373
## SYNOPSIS
4336643374

43367-
__rdoc__ ["package::function|function"]
43375+
__r-doc__ ["package::function|function"]
4336843376

4336943377
## DESCRIPTION
4337043378

@@ -43374,16 +43382,16 @@ $a
4337443382

4337543383
## EXAMPLE
4337643384

43377-
rdoc "plot"
43378-
rdoc "cluster::pam"
43385+
r-doc "plot"
43386+
r-doc "cluster::pam"
4337943387

4338043388
## NOTES
4338143389

43382-
__rdoc__ macro is defined in file `hkrdoc.emf`.
43390+
__r-doc__ macro is defined in file `hkrdoc.emf`.
4338343391

4338443392
## SEE ALSO
4338543393

43386-
[scheme-editor(3)](scheme-editor(3))
43394+
[r(9)](r(9))
4338743395
!! me-id: m3osd000
4338843396
! 3 user-setup
4338943397
## NAME

jasspa/macros/hkehf.emf

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
;
99
set-char-mask "2" "-$&#!%:@."
1010

11+
1112
define-macro fhook-ehf
1213
set-variable $buffer-mask "luh12"
1314
@# buffer-init "ehf"
@@ -77,21 +78,20 @@ set-variable .fhook-ehf.command-desc "|\HGoto Link|Move to \HPrevious Link|Move
7778
hilight .hilight.ehfL 0x80 "\\}\elm" .hilight.ehf $global-scheme
7879
hilight .hilight.ehfL 0x40 "." "" $global-scheme
7980
; support for Markdown as define-help markup
80-
hilight .hilight.ehf 0xc0 "^## NAME" "NAME" .hilight.ehfM .scheme.header ; Markdown start
81-
0 hilight .hilight.ehfM 2 50 $global-scheme
82-
83-
hilight .hilight.ehfM 0x44 "^## " "" "\n" "" "" .scheme.header
84-
hilight .hilight.ehfM 0x44 "^ " " " "\n" "" "" .scheme.keyword
85-
hilight .hilight.ehfM 0x44 " __" " " "__" "" "" .scheme.bold ; bold
86-
hilight .hilight.ehfM 0x44 " _" " " "_" "" "" .scheme.italic ; italic
87-
hilight .hilight.ehfM 0x44 " `" " " "`" "" "" .scheme.keyword ; code
88-
hilight .hilight.ehfM 0x44 "```emf" "\ecB" "```" "\ecA" "" .scheme.keyword ; code
89-
hilight .hilight.ehfM 4 "\"" "\"" "\\" .scheme.string
90-
;hilight .hilight.ehf 0x44 "`" "" "`" "" "" .scheme.underline ; code
81+
0 hilight .hilight.ehfM 2 50 $global-scheme
82+
hilight .hilight.ehf 0xc0 "^## NAME" "NAME" .hilight.ehfM .scheme.header ; Markdown start
83+
hilight .hilight.ehfM 0x44 "^## " "" "\n" "" "" .scheme.header
84+
hilight .hilight.ehfM 0x44 "^ " " " "\n" "" "" .scheme.keyword
85+
hilight .hilight.ehfM 0x44 " __" " " "__" "" "" .scheme.bold ; bold
86+
hilight .hilight.ehfM 0x44 " _" " " "_" "" "" .scheme.italic ; italic
87+
hilight .hilight.ehfM 0x44 " `" " " "`" "" "" .scheme.keyword ; code
88+
hilight .hilight.ehfM 4 "\"" "\"" "\\" .scheme.string
9189
hilight .hilight.ehfM 0x44 "\\[\\[" "" "\\]\\]" "" "" .scheme.link ; italic
92-
hilight .hilight.ehfM 0xc0 "" "" .hilight.ehf $global-scheme
93-
hilight .hilight.ehfM 0xc0 "```emf" "" .hilight.ehfB $global-scheme
94-
hilight .hilight.ehfB 0xc0 "```" "" .hilight.ehfM $global-scheme
90+
hilight .hilight.ehfM 0xc0 "" "" .hilight.ehf $global-scheme
91+
hilight .hilight.ehfM 0x44 "```emf" "\ecB" "```" "\ecA" "" .scheme.keyword ; code
92+
hilight .hilight.ehfM 0xc0 "```emf" "" .hilight.ehfB .scheme.hidden
93+
hilight .hilight.ehfB 0xc0 "```" "" .hilight.ehfM .scheme.hidden
94+
hilight .hilight.ehfM 2 "```" .scheme.hidden ; seems not to work
9595
!endif
9696

9797
; Advance to the next link in the forward direction

jasspa/macros/hkrdoc.emf

Lines changed: 15 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -22,19 +22,18 @@ set-variable .fhook-rdoc.setup-mask "acfhmw"
2222
!if &and &sin "h" .fhook-rdoc.setup &band .hilight.flags 0x02
2323
!iif &not &exi .hilight.rdoc set-variable .hilight.rdoc &pinc .hilight.next 1
2424
!iif &not &exi .hilight.rdocL set-variable .hilight.rdocL &pinc .hilight.next 1
25-
0 hilight .hilight.rdoc 0 .scheme.text
26-
0 hilight .hilight.rdocL 0 .scheme.text
27-
hilight .hilight.rdoc 2 "^_" .scheme.header
28-
hilight .hilight.rdocL 4 "'" "'" "\\" .scheme.link
29-
hilight .hilight.rdoc 2 "^[A-Z]" .scheme.header
30-
;hilight .hilight.rdoc 2 "^ +[a-z]+:" .scheme.keyword
25+
0 hilight .hilight.rdoc 0 .scheme.text
26+
0 hilight .hilight.rdocL 0 .scheme.text
27+
hilight .hilight.rdoc 2 "^_" .scheme.header
28+
hilight .hilight.rdoc 2 "^[A-Z]" .scheme.header
3129
!iif &not &exi ".hilight.r" !force execute-file "hkr"
32-
hilight .hilight.rdoc 0x80 "^[A-Z].+" .hilight.rdoc .scheme.header
33-
hilight .hilight.rdoc 0x80 "^See Also:" .hilight.rdocL .scheme.header
34-
hilight .hilight.rdoc 0x80 "^Usage:" .hilight.r .scheme.header
35-
hilight .hilight.rdoc 0x80 "^Examples:" .hilight.r .scheme.header
36-
hilight .hilight.r 0x80 "^Arguments:" .hilight.rdoc .scheme.header
37-
hilight .hilight.rdocL 0x80 "^Examples:" .hilight.r .scheme.header
30+
hilight .hilight.rdoc 0x80 "^See Also:" .hilight.rdocL .scheme.header
31+
hilight .hilight.rdoc 0x80 "^Usage:" .hilight.r .scheme.header
32+
hilight .hilight.rdoc 0x80 "^Examples:" .hilight.r .scheme.header
33+
hilight .hilight.r 0x80 "^[A-Z].+" .hilight.rdoc .scheme.header
34+
hilight .hilight.r 0x80 "^Arguments:" .hilight.rdoc .scheme.header
35+
hilight .hilight.rdocL 4 "'" "'" "\\" .scheme.link
36+
hilight .hilight.rdocL 0x80 "^Examples:" .hilight.r .scheme.header
3837
!endif
3938

4039
!if &sin "f" .fhook-rdoc.setup
@@ -44,7 +43,7 @@ set-variable .fhook-rdoc.setup-mask "acfhmw"
4443
set-variable .fhook-rdoc.collapse-mnext "-1"
4544
!endif
4645

47-
define-macro rdoc
46+
define-macro r-doc
4847
!force set-variable #l0 @1
4948
!if &not $status
5049
set-variable #l0 @ml00 "R help on"
@@ -56,7 +55,7 @@ define-macro rdoc
5655
set-variable #l1 &spr "help('%s')" #l1
5756
!endif
5857
0 pipe-shell-command &spr "LANG=en_US Rscript -e \"%s\"" #l1 "*rdoc*"
59-
set-variable :mouse-word-select rdoc-process-link
58+
set-variable :mouse-word-select r-doc-process-link
6059
-1 buffer-mode "view"
6160
beginning-of-buffer
6261
3 kill-line
@@ -69,7 +68,7 @@ define-macro rdoc
6968
!endif
7069
!emacro
7170

72-
0 define-macro rdoc-process-link
71+
0 define-macro r-doc-process-link
7372
;set-variable $debug 3
7473
set-variable #l0 $window-col
7574
set-variable #l1 $window-line
@@ -96,7 +95,7 @@ define-macro rdoc
9695
copy-region
9796
set-variable #l6 @y
9897
-1 yank
99-
rdoc #l6
98+
r-doc #l6
10099
!endif
101100
!endif
102101
!endif

jasspa/macros/me.ehf

Lines changed: 27 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1163,7 +1163,7 @@ Miscellaneous Information
11631163
lsinfo-on(3)lminfo-on(3)le Display Info on a given topic
11641164
lslist-buffers(2)lmlist-buffers(2)le (C-x C-b) List all buffers and show their status
11651165
lsosd-help(3)lmosd-help(3)le GUI based on-line help
1166-
lsrdoc(3)lmrdoc(3)le Display R function and package manual pages
1166+
lsr-doc(3)lmr-doc(3)le Display R function and package manual pages
11671167

11681168
! Operating Modes
11691169
cEcEOPERATING MODES cEcA
@@ -2176,7 +2176,7 @@ Miscellaneous Information
21762176
lsquote-char(2)lmquote-char(2)le (C-q) Insert literal character
21772177
lsrcs-file(2)lmrcs-file(2)le (C-x C-q) Handle Revision Control System (RCS) files
21782178
lsrdiff(3)lmrdiff(3)le Recursively compare files or directories
2179-
lsrdoc(3)lmrdoc(3)le Display R function and package manual pages
2179+
lsr-doc(3)lmr-doc(3)le Display R function and package manual pages
21802180
lsread-file(2)lmread-file(2)le (C-x C-r) Find and load file replacing current buffer
21812181
lsread-registry(2)lmread-registry(2)le Read in a registry definition file
21822182
lsread-session(3)lmread-session(3)le Read in session information
@@ -2698,7 +2698,7 @@ Miscellaneous Information
26982698
lsquery-replace-all-string(3)lmquery-replace-all-string(3)le Query replace string in a list of files
26992699
lsquery-replace-string-in-files(3)lmquery-replace-string-in-files(3)le Conditionally search and replace strings across files
27002700
lsrdiff(3)lmrdiff(3)le Recursively compare files or directories
2701-
lsrdoc(3)lmrdoc(3)le Display R function and package manual pages
2701+
lsr-doc(3)lmr-doc(3)le Display R function and package manual pages
27022702
lsread-session(3)lmread-session(3)le Read in session information
27032703
lsreplace-all-pairs(3)lmreplace-all-pairs(3)le Replace string pairs in a list of files
27042704
lsreplace-all-string(3)lmreplace-all-string(3)le Replace string with new string in a list of files
@@ -3845,7 +3845,7 @@ Miscellaneous Information
38453845
lsrc(9)lmrc(9)le Microsoft Developer resource file
38463846
lsrcs-file(2)lmrcs-file(2)le (C-x C-q) Handle Revision Control System (RCS) files
38473847
lsrdiff(3)lmrdiff(3)le Recursively compare files or directories
3848-
lsrdoc(3)lmrdoc(3)le Display R function and package manual pages
3848+
lsr-doc(3)lmr-doc(3)le Display R function and package manual pages
38493849
lsread-file(2)lmread-file(2)le (C-x C-r) Find and load file replacing current buffer
38503850
lsread-registry(2)lmread-registry(2)le Read in a registry definition file
38513851
lsread-session(3)lmread-session(3)le Read in session information
@@ -20066,11 +20066,19 @@ $a
2006620066
!ehelp
2006720067

2006820068
Please note that the header characters cG##cA must be at the beginning of the
20069-
line.
20069+
line. For code blocks you just indent everything with at least 8 spaces at the
20070+
beginning of the line. If you would like to show short fragments of MicroEmacs
20071+
macro code you should place this code in fenced code blocks like this:
20072+
20073+
```emf
20074+
macro code
20075+
```
2007020076

20077+
The backtick code fences must as well like the headers begin at the first character
20078+
on the documentation line.
20079+
2007120080
cESEE ALSO cA
2007220081

20073-
2007420082
lsehf(8)lmehf(8)le, lshelp-item(2)lmhelp-item(2)le, lsdefine-macro(2)lmdefine-macro(2)le, lshelp-command(2)lmhelp-command(2)le, lshelp-variable(2)lmhelp-variable(2)le.
2007520083
! 2 forward-paragraph
2007620084
! 2 backward-paragraph
@@ -25971,8 +25979,8 @@ $a
2597125979
a start-up hook command. File names and extensions are bound to a set
2597225980
of macro hooks in a space separated list e.g.
2597325981

25974-
[add-file-hook](add-file-hook(2)) "c cpp" "fhook-cmode"
25975-
[add-file-hook](add-file-hook(2)) "doc txt README" "fhook-doc"
25982+
> [add-file-hook](add-file-hook(2)) "c cpp" "fhook-cmode"
25983+
[add-file-hook](add-file-hook(2)) "doc txt README" "fhook-doc"
2597625984

2597725985
The space separated list of names are interpreted as either file
2597825986
extensions or filenames. In this case any file with the extension cD.ccA,
@@ -25997,8 +26005,8 @@ $a
2599726005
hooks, except instead of defining a file extension the location and
2599826006
text content of the identifier is defined:
2599926007

26000-
1 [add-file-hook](add-file-hook(2)) "#!/bin/sh" "fhook-shell"
26001-
1 [add-file-hook](add-file-hook(2)) "#!/usr/local/bin/wish" "fhook-tcl"
26008+
> 1 [add-file-hook](add-file-hook(2)) "#!/bin/sh" "fhook-shell"
26009+
1 [add-file-hook](add-file-hook(2)) "#!/usr/local/bin/wish" "fhook-tcl"
2600226010

2600326011
In this case, any file that commences with "cD#!/bin/shcA" is interpreted
2600426012
as a shell script and invokes the shell hook cDfhook-shellcA. Where the
@@ -26007,7 +26015,7 @@ $a
2600726015
magic sting should be search for without lsexact(2m)lmexact(2m)le mode then the
2600826016
argument should be negated, e.g.
2600926017

26010-
-4 add-file-hook "<html>" "fhook-html"
26018+
-4 add-file-hook "<html>" "fhook-html"
2601126019

2601226020
invokes cDfhook-htmlcA whenever cGcG<html>cAcA, cGcG<HTML>cAcA etc. is found in the
2601326021
first 4 lines of a file header, e.g.:
@@ -42776,17 +42784,17 @@ $a
4277642784
cESEE ALSO cA
4277742785

4277842786
lsscheme-editor(3)lmscheme-editor(3)le
42779-
! 3 rdoc
42787+
! 3 r-doc
4278042788
cEcENAME cEcA
4278142789

4278242790

42783-
|rdoc
42784-
rdoc - display documentation for R functions and packages
42791+
|r-doc
42792+
r-doc - display documentation for R functions and packages
4278542793
$a
4278642794

4278742795
cESYNOPSIS cA
4278842796

42789-
cDrdoccA ["package::function|function"]
42797+
cDr-doccA ["package::function|function"]
4279042798

4279142799
cEDESCRIPTION cA
4279242800

@@ -42796,16 +42804,16 @@ $a
4279642804

4279742805
cEEXAMPLE cA
4279842806

42799-
rdoc "plot"
42800-
rdoc "cluster::pam"
42807+
r-doc "plot"
42808+
r-doc "cluster::pam"
4280142809

4280242810
cENOTES cA
4280342811

42804-
cDrdoccA macro is defined in file cGhkrdoc.emfcA.
42812+
cDr-doccA macro is defined in file cGhkrdoc.emfcA.
4280542813

4280642814
cESEE ALSO cA
4280742815

42808-
lsscheme-editor(3)lmscheme-editor(3)le
42816+
lsr(9)lmr(9)le
4280942817
! 3 user-setup
4281042818
cEcENAME cEcA
4281142819

jasspa/macros/me.emf

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ define-macro-file mail mail mail-check stop-mail-check
7171
define-macro-file fileopen osd-file-open osd-get-file
7272
define-macro-file spellaut auto-spell auto-spell-menu
7373
define-macro-file hkinfo info info-on info-goto-link
74-
define-macro-file hkrdoc rdoc
74+
define-macro-file hkrdoc r-doc
7575
define-macro-file zfile find-zfile zfile-setup
7676
define-macro-file gentags generate-tags-file
7777
define-macro-file dmf display-matching-fence
@@ -311,6 +311,7 @@ add-file-hook ".md .rmd .Rmd .tmd .Tmd" fhook-md
311311
1 add-file-hook "^#![ \t]*/.*\\(wish\\|tclsh\\)" fhook-tcl ; tcl, tk & tix files
312312
1 add-file-hook "^#![ \t]*/.*awk" fhook-awk ; awk scripts
313313
1 add-file-hook "^#![ \t]*/.*python" fhook-python ; Python file
314+
1 add-file-hook "^#![ \t]*/.*Rscript" fhook-r ; Rscript file
314315
1 add-file-hook "^#![ \t]*/.*ruby" fhook-ruby ; Ruby shell script
315316
1 add-file-hook "^#![ \t]*/.*make" fhook-make ; Make script
316317
4 add-file-hook "^[ \t]*exec[ \t]*\\(wish\\|tclsh\\)" fhook-tcl ; TCL shell script

0 commit comments

Comments
 (0)