Skip to content

Commit

Permalink
adding filehook checks for r-xyz and py-xyz functions
Browse files Browse the repository at this point in the history
  • Loading branch information
Detlef Groth committed Dec 25, 2024
1 parent ddad8fc commit 3c14363
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions jasspa/macros/pytools.emf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
; Created By : Detlef Groth, University of Potsdam
; Author : Detlef Groth, University of Potsdam
; Created : Wed Sep 25 15:42:35 2024
; Last Modified : <241225.1019>
; Last Modified : <241225.1026>
;
; Description : Documentation viewer within MicroEmacs for
; Python
Expand Down Expand Up @@ -80,7 +80,7 @@ define-macro py-format
!endif
!if &not &seq $buffer-fhook "fhook-python"
ml-write &spr "Error: '%s' is not a Python file!" $buffer-bname
!return
!abort
!endif
!force set-variable #l1 .format
!if &seq #l1 "ERROR"
Expand Down Expand Up @@ -116,7 +116,7 @@ define-macro py-lint
!endif
!if &not &seq $buffer-fhook "fhook-python"
ml-write &spr "Error: '%s' is not a Python file!" $buffer-bname
!return
!abort
!endif
!force set-variable #l0 .lint
!if &seq #l0 "ERROR"
Expand Down Expand Up @@ -173,7 +173,7 @@ define-macro py-exec
!endif
!if &not &seq $buffer-fhook "fhook-python"
ml-write &spr "Error: '%s' is not a Python file!" $buffer-bname
!return
!abort
!endif
; command line arguments
set-variable #l1 ""
Expand Down
8 changes: 4 additions & 4 deletions jasspa/macros/rtools.emf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
; Author : Detlef Groth, University of Potsdam, Germany
; Created By : Detlef Groth
; Created : Wed Dec 4 17:39:58 2024
; Last Modified : <241225.1017>
; Last Modified : <241225.1039>
;
; Description : functions useful to be used for R development
;
Expand All @@ -25,7 +25,7 @@ define-macro r-format
!endif
!if &not &seq $buffer-fhook "fhook-r"
ml-write &spr "Error: '%s' is not an R file!" $buffer-bname
!return
!abort
!endif
!if &seq %rscript-com "ERROR"
r-rscript
Expand All @@ -48,7 +48,7 @@ define-macro r-lint
!endif
!if &not &seq $buffer-fhook "fhook-r"
ml-write &spr "Error: '%s' is not an R file!" $buffer-bname
!return
!abort
!endif
set-variable #l0 &reg &spr "/history/%s/char-set" %platform ""
set-variable #l0 &xre #l0 "iso" "ISO-" #l0
Expand Down Expand Up @@ -143,7 +143,7 @@ define-macro r-exec
!endif
!if &not &seq $buffer-fhook "fhook-r"
ml-write &spr "Error: '%s' is not an R file!" $buffer-bname
!return
!abort
!endif
!if &seq %rscript-com "ERROR"
r-rscript
Expand Down

0 comments on commit 3c14363

Please sign in to comment.