[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/geiser-gauche 74ae3f8 095/119: Add (back) page breaks
From: |
Philip Kaludercic |
Subject: |
[nongnu] elpa/geiser-gauche 74ae3f8 095/119: Add (back) page breaks |
Date: |
Sun, 1 Aug 2021 18:28:04 -0400 (EDT) |
branch: elpa/geiser-gauche
commit 74ae3f8c90e92b404f42e521449c1ee5b049a4e9
Author: András Simonyi <andras.simonyi@gmail.com>
Commit: András Simonyi <andras.simonyi@gmail.com>
Add (back) page breaks
---
geiser-gauche.el | 186 +++++++++++++++++++++++++++++--------------------------
1 file changed, 99 insertions(+), 87 deletions(-)
diff --git a/geiser-gauche.el b/geiser-gauche.el
index 0524bbe..14229ce 100644
--- a/geiser-gauche.el
+++ b/geiser-gauche.el
@@ -29,6 +29,7 @@
(require 'geiser-impl)
(require 'geiser)
+
;;; Customization
(defgroup geiser-gauche nil
@@ -66,6 +67,7 @@
:type 'boolean
:group 'geiser-gauche)
+
;;; Utils
(defconst geiser-gauche--load-dir (f-dirname load-file-name)
@@ -76,6 +78,95 @@
(max (save-excursion (beginning-of-line) (point))
(save-excursion (skip-syntax-backward "^(>") (1- (point)))))
+
+;;; Guess whether buffer is Gauche
+
+(defconst geiser-gauche--guess-re
+ (regexp-opt '("gauche" "gosh")))
+
+(defun geiser-gauche--guess ()
+ "Guess whether the current buffer edits Gauche code or REPL."
+ (save-excursion
+ (goto-char (point-min))
+ (re-search-forward geiser-gauche--guess-re nil t)))
+
+
+;;; Keywords and syntax
+
+(defconst geiser-gauche--binding-forms
+ '("and-let" "and-let1" "let1" "if-let1" "rlet1" "receive" "fluid-let"
"let-values"
+ "^" "^a" "^b" "^c" "^d" "^e" "^f" "^g" "^h" "^i" "^j" "^k" "^l" "^m" "^n"
"^o" "^p" "^q"
+ "^r" "^s" "^t" "^v" "^x" "^y" "^z" "^w" "^_" "rec"))
+
+(defconst geiser-gauche--binding-forms*
+ '("and-let*" "let*-values" ))
+
+(defconst geiser-gauche--builtin-keywords
+ '("and-let"
+ "and-let1"
+ "assume"
+ "cut"
+ "cute"
+ "define-constant"
+ "define-enum"
+ "define-in-module"
+ "define-inline"
+ "define-type"
+ "dotimes"
+ "dolist"
+ "ecase"
+ "fluid-let"
+ "if-let1"
+ "let1"
+ "let-keywords"
+ "let-optionals"
+ "let-optionals*"
+ "let-values"
+ "receive"
+ "rec"
+ "rlet1"
+ "select-module"
+ "use"
+ "with-input-from-pipe"
+ "^" "^a" "^b" "^c" "^d" "^e" "^f" "^g" "^h" "^i" "^j" "^k" "^l" "^m" "^n"
"^o" "^p" "^q"
+ "^r" "^s" "^t" "^v" "^x" "^y" "^z" "^w" "^_"
+ "with-error-handler"
+ "with-error-to-port"
+ "with-exception-handler"
+ "with-exception-handler"
+ "with-input-conversion"
+ "with-input-from-file"
+ "with-input-from-port"
+ "with-input-from-process"
+ "with-input-from-string"
+ "with-iterator"
+ "with-lock-file"
+ "with-locking-mutex"
+ "with-module"
+ "with-output-conversion"
+ "with-output-to-file"
+ "with-output-to-port"
+ "with-output-to-process"
+ "with-output-to-string"
+ "with-port-locking"
+ "with-ports"
+ "with-profiler"
+ "with-random-data-seed"
+ "with-signal-handlers"
+ "with-string-io"
+ "with-time-counter"))
+
+(defun geiser-gauche--keywords ()
+ "Add geiser-specific keywords to the default ones."
+ (append
+ (geiser-syntax--simple-keywords geiser-gauche-extra-keywords)
+ (geiser-syntax--simple-keywords geiser-gauche--builtin-keywords)))
+
+(geiser-syntax--scheme-indent
+ (case-lambda: 0)
+ (let1 1))
+
+
;;; REPL
(defconst geiser-gauche--prompt-regexp "gosh\\(\\[[^(]+\\]\\)?> ")
@@ -107,17 +198,7 @@
(compilation-setup t)
(geiser-eval--send/wait "(newline)")))
-;;; Guess whether buffer is Gauche
-
-(defconst geiser-gauche--guess-re
- (regexp-opt '("gauche" "gosh")))
-
-(defun geiser-gauche--guess ()
- "Guess whether the current buffer edits Gauche code or REPL."
- (save-excursion
- (goto-char (point-min))
- (re-search-forward geiser-gauche--guess-re nil t)))
-
+
;;; Evaluation
(defun geiser-gauche--geiser-procedure (proc &rest args)
@@ -150,6 +231,7 @@
(let ((form (mapconcat 'identity args " ")))
(format "(eval '(geiser:%s %s) (find-module 'geiser))" proc form)))))
+
;;; Module handling
(defconst geiser-gauche--module-re
@@ -193,81 +275,7 @@ form."
"Return a scheme expression string to import MODULE."
(format "(import %s)" module))
-;;; Keywords and syntax
-
-(defconst geiser-gauche--binding-forms
- '("and-let" "and-let1" "let1" "if-let1" "rlet1" "receive" "fluid-let"
"let-values"
- "^" "^a" "^b" "^c" "^d" "^e" "^f" "^g" "^h" "^i" "^j" "^k" "^l" "^m" "^n"
"^o" "^p" "^q"
- "^r" "^s" "^t" "^v" "^x" "^y" "^z" "^w" "^_" "rec"))
-
-(defconst geiser-gauche--binding-forms*
- '("and-let*" "let*-values" ))
-
-(defconst geiser-gauche--builtin-keywords
- '("and-let"
- "and-let1"
- "assume"
- "cut"
- "cute"
- "define-constant"
- "define-enum"
- "define-in-module"
- "define-inline"
- "define-type"
- "dotimes"
- "dolist"
- "ecase"
- "fluid-let"
- "if-let1"
- "let1"
- "let-keywords"
- "let-optionals"
- "let-optionals*"
- "let-values"
- "receive"
- "rec"
- "rlet1"
- "select-module"
- "use"
- "with-input-from-pipe"
- "^" "^a" "^b" "^c" "^d" "^e" "^f" "^g" "^h" "^i" "^j" "^k" "^l" "^m" "^n"
"^o" "^p" "^q"
- "^r" "^s" "^t" "^v" "^x" "^y" "^z" "^w" "^_"
- "with-error-handler"
- "with-error-to-port"
- "with-exception-handler"
- "with-exception-handler"
- "with-input-conversion"
- "with-input-from-file"
- "with-input-from-port"
- "with-input-from-process"
- "with-input-from-string"
- "with-iterator"
- "with-lock-file"
- "with-locking-mutex"
- "with-module"
- "with-output-conversion"
- "with-output-to-file"
- "with-output-to-port"
- "with-output-to-process"
- "with-output-to-string"
- "with-port-locking"
- "with-ports"
- "with-profiler"
- "with-random-data-seed"
- "with-signal-handlers"
- "with-string-io"
- "with-time-counter"))
-
-(defun geiser-gauche--keywords ()
- "Add geiser-specific keywords to the default ones."
- (append
- (geiser-syntax--simple-keywords geiser-gauche-extra-keywords)
- (geiser-syntax--simple-keywords geiser-gauche--builtin-keywords)))
-
-(geiser-syntax--scheme-indent
- (case-lambda: 0)
- (let1 1))
-
+
;;; Error display
(defun geiser-gauche--display-error (_module key msg)
@@ -282,7 +290,9 @@ form."
(insert msg))
(if (and msg (string-match "\\(.+\\)$" msg)) (match-string 1 msg) key))
-;;; Manual lookup -- code adapted from the Guile implementation
+
+;;; Manual lookup
+;; code adapted from the Guile implementation
(defun geiser-gauche--info-spec (&optional nodes)
"Return an info docspec list for NODES."
@@ -311,6 +321,7 @@ form."
(switch-to-buffer-other-window "*info*"))
(search-forward (format "%s" id) nil t))
+
;;; Implementation definition
(define-geiser-implementation gauche
@@ -338,6 +349,7 @@ form."
(geiser-impl--add-to-alist 'regexp "\\.scm$" 'gauche t)
+
;;; Autoloads
;;;###autoload
- [nongnu] elpa/geiser-gauche 1e09ad7 092/119: Finish elisp stylistic improvements, (continued)
- [nongnu] elpa/geiser-gauche 1e09ad7 092/119: Finish elisp stylistic improvements, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 9e7ed54 103/119: Bump version, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche ea011ac 111/119: Remove trailing whitespaces, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 19d6d41 112/119: Comment update, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 66e5143 119/119: Correct a comment typo., Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 0e415bf 114/119: Sharp-quote identity function references everywhere, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 2217232 116/119: Update README, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 9623869 083/119: WIP README update, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 33e3242 089/119: Add Gauche sentence to credits, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 56fcf56 094/119: Reorder the Scheme functions, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 74ae3f8 095/119: Add (back) page breaks,
Philip Kaludercic <=
- [nongnu] elpa/geiser-gauche 3b5e7f1 098/119: Add a sentence on setting the Gauche binary path, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 83dc5ef 099/119: Minor README improvement, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche d9e2836 115/119: Update README to reflect the package's addition to MELPA, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 606b184 102/119: Minor README update, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 5e7239e 107/119: Small simplification, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche e0a9a9f 109/119: Update README, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche ff2aafa 113/119: Minor comment and naming improvement, Philip Kaludercic, 2021/08/01
- [nongnu] elpa/geiser-gauche 9f3531a 088/119: Simplify autoloads, Philip Kaludercic, 2021/08/01