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

[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



reply via email to

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