emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/xah-fly-keys c0e4534acf: xah-run-current-file, minor fix o


From: ELPA Syncer
Subject: [nongnu] elpa/xah-fly-keys c0e4534acf: xah-run-current-file, minor fix on previous commit.
Date: Sat, 21 Dec 2024 01:00:56 -0500 (EST)

branch: elpa/xah-fly-keys
commit c0e4534acf973ecf709b3a24ae0c4ad84dbd44f6
Author: Xah Lee <xah@xahlee.org>
Commit: Xah Lee <xah@xahlee.org>

    xah-run-current-file, minor fix on previous commit.
---
 xah-fly-keys.el | 80 +++++++++++++++++++++++++++------------------------------
 1 file changed, 38 insertions(+), 42 deletions(-)

diff --git a/xah-fly-keys.el b/xah-fly-keys.el
index 2628a7c4f6..6a51867aa3 100644
--- a/xah-fly-keys.el
+++ b/xah-fly-keys.el
@@ -4,7 +4,7 @@
 
 ;; Author: Xah Lee ( http://xahlee.info/ )
 ;; Maintainer: Xah Lee <xah@xahlee.org>
-;; Version: 26.9.20241220151740
+;; Version: 26.9.20241220195053
 ;; Created: 2013-09-10
 ;; Package-Requires: ((emacs "27"))
 ;; Keywords: convenience, vi, vim, ergoemacs, keybinding
@@ -2473,62 +2473,58 @@ Version: 2024-09-25"
 ;; HHHH---------------------------------------------------
 
 (defvar xah-run-current-file-dispatch nil
-"A dispatch table used by `xah-run-current-file' to call a dedicated function 
to do the job, if any.
+"A dispatch table used by `xah-run-current-file' to call dedicated function to 
run code.
 Value is a association list.
 Each item is (EXT . FUNCTION).
 EXT is filename extension (sans the dot), type string.
 FUNCTION is a elisp function name to call, type symbol.
-If file extension match, call the associated function, pass current buffer's 
filepath as arg. Else `xah-run-current-file' continues." )
+If file extension match, and FUNCTION is defined, call it, pass current 
buffer's filepath as arg.
+Else, `xah-run-current-file-map' is looked up." )
 
 (setq xah-run-current-file-dispatch
       '(("el" . load)
         ("elc" . load)
-        ("go" . xah-go-run-current-file)
-        ("java" . xah-java-compile-and-run)
-        ("m" . xah-wolfram-run-script)
-        ("wl" . xah-wolfram-run-script)
-        ("wls" . xah-wolfram-run-script)))
+        ("java" . xah-java-compile-and-run)))
 
 (defvar xah-run-current-file-map
   "A association list that maps file extension to a command for running the 
file, used by `xah-run-current-file'.
 Each item is (EXT . PROGRAM).
 EXT is filename extension (sans the dot), type string.
 PROGRAM is program name or path, with command options to run a file, type 
string.
-A filename is appended after the PROGRAM string.")
+A filename is appended after the PROGRAM string as external command to call.")
 
 (setq xah-run-current-file-map
- '(
-   ;; following are tested as of 2024-12-20
-
-   ("fs" . "dotnet fsi")
-   ("fsx" . "dotnet fsi")
-   ("go" . "go run")
-   ("js" . "deno run")
-   ("php" . "php")
-   ("pl" . "perl")
-   ("ps1" . "pwsh")
-   ("py" . "python")
-   ("py2" . "python2")
-   ("py3" . "python3")
-   ("rb" . "ruby")
-   ("ts" . "deno run")
-   ("wl" . "wolframscript -file")
-   ("wls" . "wolframscript -file")
-
-   ;; following may be outdated
-
-   ("clj" . "clj")
-   ("hs" . "runhaskell")
-   ("latex" . "pdflatex")
-   ("m" . "wolframscript -file")
-   ("mjs" . "node --experimental-modules ")
-   ("ml" . "ocaml")
-   ("rkt" . "racket")
-   ("sh" . "bash")
-   ("tex" . "pdflatex")
-   ("tsx" . "tsc")
-   ("vbs" . "cscript")
-   ("pov" . "povray +R2 +A0.1 +J1.2 +Am2 +Q9 +H480 +W640")))
+      '(
+        ;; following are tested as of 2024-12-20
+
+        ("fs" . "dotnet fsi")
+        ("fsx" . "dotnet fsi")
+        ("go" . "go run")
+        ("js" . "deno run")
+        ("php" . "php")
+        ("pl" . "perl")
+        ("ps1" . "pwsh")
+        ("py" . "python")
+        ("py2" . "python2")
+        ("py3" . "python3")
+        ("rb" . "ruby")
+        ("ts" . "deno run")
+        ("m" . "wolframscript -print all -file")
+        ("wl" . "wolframscript -print all -file")
+        ("wls" . "wolframscript -print all -file")
+
+        ;; following may be outdated
+
+        ("clj" . "clj")
+        ("hs" . "runhaskell")
+        ("latex" . "pdflatex")
+        ("ml" . "ocaml")
+        ("rkt" . "racket")
+        ("sh" . "bash")
+        ("tex" . "pdflatex")
+        ("tsx" . "tsc")
+        ("vbs" . "cscript")
+        ("pov" . "povray +R2 +A0.1 +J1.2 +Am2 +Q9 +H480 +W640")))
 
 (defun xah-java-compile-and-run (Filename)
   "Compile and run java of current buffer.
@@ -2565,7 +2561,7 @@ The variable `xah-run-current-file-dispatch' allows you 
to customize this comman
 
 URL `http://xahlee.info/emacs/emacs/elisp_run_current_file.html'
 Created: 2020-09-24
-Version: 2024-03-22"
+Version: 2024-12-20"
   (interactive (if buffer-file-name (progn (when (buffer-modified-p) 
(save-buffer)) (list buffer-file-name)) (user-error "Buffer is not file. Save 
it first.")))
   (let ((xoutbuf (get-buffer-create "*xah-run output*" t))
         (xext (file-name-extension Filename))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]