summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJonas Bernoulli <jonas@bernoul.li>2020-02-25 14:48:04 +0100
committerJonas Bernoulli <jonas@bernoul.li>2020-03-27 21:38:45 +0100
commita11b96fe58a2579e15bfcb642f01e0059da59a87 (patch)
tree1aa54d25325a9023b1af7cd09d8ed182f1c5b43a /elisp
parent2a7b84b3cd9e58bba064077af78b53abd30766f6 (diff)
downloadgeiser-a11b96fe58a2579e15bfcb642f01e0059da59a87.tar.gz
geiser-a11b96fe58a2579e15bfcb642f01e0059da59a87.tar.bz2
Fix indentation
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-autodoc.el2
-rw-r--r--elisp/geiser-company.el6
-rw-r--r--elisp/geiser-connection.el2
-rw-r--r--elisp/geiser-debug.el2
-rw-r--r--elisp/geiser-doc.el11
-rw-r--r--elisp/geiser-edit.el4
-rw-r--r--elisp/geiser-impl.el2
-rw-r--r--elisp/geiser-log.el6
-rw-r--r--elisp/geiser-menu.el14
-rw-r--r--elisp/geiser-mode.el24
-rw-r--r--elisp/geiser-popup.el44
-rw-r--r--elisp/geiser-repl.el16
-rw-r--r--elisp/geiser-syntax.el52
-rw-r--r--elisp/geiser-xref.el26
-rw-r--r--elisp/geiser.el6
15 files changed, 108 insertions, 109 deletions
diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el
index bd41484..0eea73e 100644
--- a/elisp/geiser-autodoc.el
+++ b/elisp/geiser-autodoc.el
@@ -147,7 +147,7 @@ when `geiser-autodoc-display-module-p' is on."
(args (cdr (assoc "args" signature)))
(module (cdr (assoc "module" signature))))
(if (not args)
- (geiser-autodoc--value-str proc module (cdr (assoc "value" signature)))
+ (geiser-autodoc--value-str proc module (cdr (assoc "value" signature)))
(save-current-buffer
(set-buffer (geiser-syntax--font-lock-buffer))
(erase-buffer)
diff --git a/elisp/geiser-company.el b/elisp/geiser-company.el
index 70bb3b8..814fbbd 100644
--- a/elisp/geiser-company.el
+++ b/elisp/geiser-company.el
@@ -48,7 +48,7 @@
(symbol (make-symbol id))
(ds (geiser-doc--get-docstring symbol module)))
(if (or (not ds) (not (listp ds)))
- (progn
+ (progn
(message "No documentation available for '%s'" symbol)
nil)
(with-current-buffer (get-buffer-create "*company-documentation*")
@@ -131,8 +131,8 @@
('sorted t)))
(defun geiser-company--setup-company (enable)
(when enable
- (set (make-local-variable 'company-backends)
- (add-to-list 'company-backends 'geiser-company-backend)))
+ (set (make-local-variable 'company-backends)
+ (add-to-list 'company-backends 'geiser-company-backend)))
(company-mode (if enable 1 -1)))
(add-hook 'company-completion-finished-hook
'geiser-company--restore-autodoc)
diff --git a/elisp/geiser-connection.el b/elisp/geiser-connection.el
index 4fb7363..4df60d9 100644
--- a/elisp/geiser-connection.el
+++ b/elisp/geiser-connection.el
@@ -72,7 +72,7 @@
(defun geiser-con--tq-create (process)
(let ((tq (tq-create process)))
(set-process-filter process
- `(lambda (p s) (geiser-con--tq-filter ',tq s)))
+ `(lambda (p s) (geiser-con--tq-filter ',tq s)))
tq))
(defun geiser-con--tq-filter (tq in)
diff --git a/elisp/geiser-debug.el b/elisp/geiser-debug.el
index 51fa9e5..9c652fe 100644
--- a/elisp/geiser-debug.el
+++ b/elisp/geiser-debug.el
@@ -107,7 +107,7 @@ See also `geiser-repl-auto-display-images-p'."
(geiser-impl--define-caller geiser-debug--display-error
display-error (module key message)
- "This method takes 3 parameters (a module name, the error key,
+ "This method takes 3 parameters (a module name, the error key,
and the accompanying error message) and should display
(in the current buffer) a formatted version of the error. If the
error was successfully displayed, the call should evaluate to a
diff --git a/elisp/geiser-doc.el b/elisp/geiser-doc.el
index b098225..d7210f6 100644
--- a/elisp/geiser-doc.el
+++ b/elisp/geiser-doc.el
@@ -191,10 +191,10 @@ help (e.g. browse an HTML page) implementing this method.")
(defun geiser-doc--insert-xbutton (&optional manual)
(let ((label (if manual "[manual]" "[source]"))
(help (if manual "Look up in Scheme manual" "Go to definition")))
- (insert-text-button label
- :type 'geiser-doc--xbutton
- 'help-echo help
- 'x-kind (if manual 'manual 'source))))
+ (insert-text-button label
+ :type 'geiser-doc--xbutton
+ 'help-echo help
+ 'x-kind (if manual 'manual 'source))))
(defun geiser-doc--insert-xbuttons (impl)
(when (geiser-impl--method 'external-help impl)
@@ -348,8 +348,7 @@ help (e.g. browse an HTML page) implementing this method.")
impl)
impl))))
-(defun geiser-doc--render-docstring
- (docstring symbol &optional module impl)
+(defun geiser-doc--render-docstring (docstring symbol &optional module impl)
(erase-buffer)
(geiser-doc--insert-title
(geiser-autodoc--str* (cdr (assoc "signature" docstring))))
diff --git a/elisp/geiser-edit.el b/elisp/geiser-edit.el
index 8eef936..e9ca29b 100644
--- a/elisp/geiser-edit.el
+++ b/elisp/geiser-edit.el
@@ -244,8 +244,8 @@ With prefix, asks for the symbol to edit."
(error (condition-case-unless-debug err-of-mod
(geiser-edit-module-at-point)
(error (error "Geiser:cannot edit symbol at point\nSymbol error message:%s\nModule error message:%s"
- (error-message-string err-of-sym)
- (error-message-string err-of-mod))))))))
+ (error-message-string err-of-sym)
+ (error-message-string err-of-mod))))))))
(defun geiser-pop-symbol-stack ()
"Pop back to where \\[geiser-edit-symbol-at-point] was last invoked."
diff --git a/elisp/geiser-impl.el b/elisp/geiser-impl.el
index 5ceee17..55d750e 100644
--- a/elisp/geiser-impl.el
+++ b/elisp/geiser-impl.el
@@ -97,7 +97,7 @@ determine its scheme flavour."
(setq geiser-impl--method-docs
(sort geiser-impl--method-docs
(lambda (a b) (string< (symbol-name (car a))
- (symbol-name (car b))))))
+ (symbol-name (car b))))))
(put method 'function-documentation doc)))
(defun geiser-implementation-help ()
diff --git a/elisp/geiser-log.el b/elisp/geiser-log.el
index a0d7878..e542042 100644
--- a/elisp/geiser-log.el
+++ b/elisp/geiser-log.el
@@ -66,9 +66,9 @@
(add-hook 'after-change-functions
'(lambda (b e len)
(when geiser-log-autoscroll-buffer-p
- (let ((my-window (get-buffer-window (geiser-log--buffer) t)))
- (when (window-live-p my-window)
- (set-window-point my-window (point))))))
+ (let ((my-window (get-buffer-window (geiser-log--buffer) t)))
+ (when (window-live-p my-window)
+ (set-window-point my-window (point))))))
nil t)
(setq buffer-read-only t))
diff --git a/elisp/geiser-menu.el b/elisp/geiser-menu.el
index 11a389c..101c4dd 100644
--- a/elisp/geiser-menu.el
+++ b/elisp/geiser-menu.el
@@ -19,9 +19,9 @@
;;; Customization:
(geiser-custom--defcustom geiser-global-menu-always-on-p nil
- "Whether the Geiser menu is always visible."
- :type 'boolean
- :group 'geiser)
+ "Whether the Geiser menu is always visible."
+ :type 'boolean
+ :group 'geiser)
;;; Top-level menu
@@ -30,7 +30,7 @@
(cond ((or (eq '-- kd) (eq 'line kd)) `(geiser-menu--add-line ,map))
((stringp (car kd)) `(geiser-menu--add-basic-item ,keymap ,map ,kd))
((eq 'menu (car kd)) `(geiser-menu--add-submenu ,(cadr kd)
- ,keymap ,map ,(cddr kd)))
+ ,keymap ,map ,(cddr kd)))
((eq 'custom (car kd)) `(geiser-menu--add-custom ,(nth 1 kd)
,(nth 2 kd)
,keymap
@@ -87,12 +87,12 @@
(defmacro geiser-menu--add-custom (title group keymap map)
`(geiser-menu--add-item ,keymap ,map
- (,title nil (lambda () (interactive) (customize-group ',group)))))
+ (,title nil (lambda () (interactive) (customize-group ',group)))))
(defmacro geiser-menu--mode-toggle (title bindings mode keymap map)
`(geiser-menu--add-item ,keymap ,map
- (,title ,bindings ,mode
- :button (:toggle . (and (boundp ',mode) ,mode)))))
+ (,title ,bindings ,mode
+ :button (:toggle . (and (boundp ',mode) ,mode)))))
(defmacro geiser-menu--defmenu (name keymap &rest keys)
(let ((mmap (make-symbol "mmap")))
diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el
index 7b37169..303489d 100644
--- a/elisp/geiser-mode.el
+++ b/elisp/geiser-mode.el
@@ -163,11 +163,11 @@ With a prefix, revert the effect of `geiser-mode-eval-last-sexp-to-buffer' "
(setq bosexp (point))
(forward-sexp)
(point)))
- (ret-transformer (or geiser-mode-eval-to-buffer-transformer
- (lambda (msg is-error?)
- (format "%s%s%s"
+ (ret-transformer (or geiser-mode-eval-to-buffer-transformer
+ (lambda (msg is-error?)
+ (format "%s%s%s"
geiser-mode-eval-to-buffer-prefix
- (if is-error? "ERROR" "")
+ (if is-error? "ERROR" "")
msg))))
(ret (save-excursion
(geiser-eval-region bosexp ;beginning of sexp
@@ -175,17 +175,17 @@ With a prefix, revert the effect of `geiser-mode-eval-last-sexp-to-buffer' "
nil
t
print-to-buffer-p)))
- (err (geiser-eval--retort-error ret))
- (will-eval-to-buffer (if print-to-buffer-p
- (not geiser-mode-eval-last-sexp-to-buffer)
- geiser-mode-eval-last-sexp-to-buffer))
- (str (geiser-eval--retort-result-str ret
+ (err (geiser-eval--retort-error ret))
+ (will-eval-to-buffer (if print-to-buffer-p
+ (not geiser-mode-eval-last-sexp-to-buffer)
+ geiser-mode-eval-last-sexp-to-buffer))
+ (str (geiser-eval--retort-result-str ret
(when will-eval-to-buffer ""))))
(cond ((not will-eval-to-buffer) str)
- (err (insert (funcall ret-transformer
+ (err (insert (funcall ret-transformer
(geiser-eval--error-str err) t)))
- ((string= "" str))
- (t (push-mark)
+ ((string= "" str))
+ (t (push-mark)
(insert (funcall ret-transformer str nil))))))
(defun geiser-compile-definition (&optional and-go)
diff --git a/elisp/geiser-popup.el b/elisp/geiser-popup.el
index 9db085f..7af5f67 100644
--- a/elisp/geiser-popup.el
+++ b/elisp/geiser-popup.el
@@ -30,9 +30,9 @@
(set (make-local-variable 'minor-mode-overriding-map-alist)
(list (cons 'view-mode geiser-popup--overriding-map)))
(setq view-exit-action
- (lambda (buffer)
- (with-current-buffer buffer
- (bury-buffer)))))
+ (lambda (buffer)
+ (with-current-buffer buffer
+ (bury-buffer)))))
(defmacro geiser-popup--define (base name mode)
(let ((get-buff (intern (format "geiser-%s--buffer" base)))
@@ -40,25 +40,25 @@
(with-macro (intern (format "geiser-%s--with-buffer" base)))
(method (make-symbol "method"))
(buffer (make-symbol "buffer")))
- `(progn
- (add-to-list 'geiser-popup--registry ,name)
- (defun ,get-buff ()
- (or (get-buffer ,name)
- (with-current-buffer (get-buffer-create ,name)
- (funcall ',mode)
- (geiser-popup--setup-view-mode)
- (current-buffer))))
- (defun ,pop-buff (&optional ,method)
- (let ((,buffer (funcall ',get-buff)))
- (unless (eq ,buffer (current-buffer))
- (cond ((eq ,method 'buffer) (view-buffer ,buffer))
- ((eq ,method 'frame) (view-buffer-other-frame ,buffer))
- (t (view-buffer-other-window ,buffer))))))
- (defmacro ,with-macro (&rest body)
- (declare (debug (&rest form)))
- (list 'with-current-buffer (list ',get-buff)
- (cons 'let (cons '((inhibit-read-only t)) body))))
- (put ',with-macro 'lisp-indent-function 'defun))))
+ `(progn
+ (add-to-list 'geiser-popup--registry ,name)
+ (defun ,get-buff ()
+ (or (get-buffer ,name)
+ (with-current-buffer (get-buffer-create ,name)
+ (funcall ',mode)
+ (geiser-popup--setup-view-mode)
+ (current-buffer))))
+ (defun ,pop-buff (&optional ,method)
+ (let ((,buffer (funcall ',get-buff)))
+ (unless (eq ,buffer (current-buffer))
+ (cond ((eq ,method 'buffer) (view-buffer ,buffer))
+ ((eq ,method 'frame) (view-buffer-other-frame ,buffer))
+ (t (view-buffer-other-window ,buffer))))))
+ (defmacro ,with-macro (&rest body)
+ (declare (debug (&rest form)))
+ (list 'with-current-buffer (list ',get-buff)
+ (cons 'let (cons '((inhibit-read-only t)) body))))
+ (put ',with-macro 'lisp-indent-function 'defun))))
(put 'geiser-popup--define 'lisp-indent-function 1)
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index 296b3ca..cfc4123 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -408,9 +408,9 @@ module command as a string")
(add-text-properties
start end
'(font-lock-fontified t
- fontified t
- font-lock-multiline t
- font-lock-face geiser-font-lock-repl-output)))
+ fontified t
+ font-lock-multiline t
+ font-lock-face geiser-font-lock-repl-output)))
(defun geiser-repl--narrow-to-prompt ()
"Narrow to active prompt region and return t, otherwise returns nil."
@@ -572,9 +572,9 @@ module command as a string")
(defun geiser-repl--connection* ()
(let ((buffer (geiser-repl--set-up-repl geiser-impl--implementation)))
- (and (buffer-live-p buffer)
- (get-buffer-process buffer)
- (with-current-buffer buffer geiser-repl--connection))))
+ (and (buffer-live-p buffer)
+ (get-buffer-process buffer)
+ (with-current-buffer buffer geiser-repl--connection))))
(defun geiser-repl--connection ()
(or (geiser-repl--connection*)
@@ -701,7 +701,7 @@ If SAVE-HISTORY is non-nil, save CMD in the REPL history."
(defun geiser-repl--module-function (&optional module)
(if (and module geiser-eval--get-impl-module)
(funcall geiser-eval--get-impl-module module)
- :f))
+ :f))
(defun geiser-repl--doc-module ()
(interactive)
@@ -936,7 +936,7 @@ If no REPL is running, execute `run-geiser' to start a fresh one."
(geiser-connect impl (geiser-repl--host) (geiser-repl--port)))
((geiser-repl--local-p)
(geiser-connect-local impl geiser-repl--address))
- (impl (run-geiser impl))
+ (impl (run-geiser impl))
(t (call-interactively 'run-geiser)))
(geiser-repl--maybe-remember-scm-buffer buffer)))
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el
index 7870d3b..53c2c74 100644
--- a/elisp/geiser-syntax.el
+++ b/elisp/geiser-syntax.el
@@ -219,14 +219,14 @@ implementation-specific entries for font-lock-keywords.")
((equal (symbol-name tok) "f") '(boolean . :f))
(tok (cons 'atom tok))
(t (geiser-syntax--read/next-token)))))))
- (?| (case (geiser-syntax--read/next-char) ;; gambit style block comments
- ('nil '(eob))
- (?# (geiser-syntax--read/skip-comment))
- (t (let ((tok (geiser-syntax--read/symbol)))
- (cond ((equal (symbol-name tok) "t") '(boolean . :t))
- ((equal (symbol-name tok) "f") '(boolean . :f))
- (tok (cons 'atom tok))
- (t (geiser-syntax--read/next-token)))))))
+ (?| (case (geiser-syntax--read/next-char) ;; gambit style block comments
+ ('nil '(eob))
+ (?# (geiser-syntax--read/skip-comment))
+ (t (let ((tok (geiser-syntax--read/symbol)))
+ (cond ((equal (symbol-name tok) "t") '(boolean . :t))
+ ((equal (symbol-name tok) "f") '(boolean . :f))
+ (tok (cons 'atom tok))
+ (t (geiser-syntax--read/next-token)))))))
(?\' (geiser-syntax--read/token '(quote . quote)))
(?\` (geiser-syntax--read/token
`(backquote . ,backquote-backquote-symbol)))
@@ -399,28 +399,28 @@ implementation-specific entries for font-lock-keywords.")
(defun geiser-syntax--linearize (form)
(cond ((not (listp form)) (list form))
- ((null form) nil)
- (t (cons (car form) (geiser-syntax--linearize (cdr form))))))
+ ((null form) nil)
+ (t (cons (car form) (geiser-syntax--linearize (cdr form))))))
(defun geiser-syntax--scan-locals (bfs sbfs form nesting locals)
(if (or (null form) (not (listp form)))
(geiser-syntax--normalize locals)
(if (not (geiser-syntax--binding-form-p bfs sbfs (car form)))
- (geiser-syntax--scan-locals bfs sbfs
- (car (last form))
+ (geiser-syntax--scan-locals bfs sbfs
+ (car (last form))
(1- nesting) locals)
(let* ((head (car form))
- (name (geiser-syntax--if-symbol (cadr form)))
- (names (if name (geiser-syntax--if-list (caddr form))
- (geiser-syntax--if-list (cadr form))))
+ (name (geiser-syntax--if-symbol (cadr form)))
+ (names (if name (geiser-syntax--if-list (caddr form))
+ (geiser-syntax--if-list (cadr form))))
(bns (and name
(geiser-syntax--binding-form-p bfs sbfs (car names))))
- (rest (if (and name (not bns)) (cdddr form) (cddr form)))
- (use-names (and (or rest
+ (rest (if (and name (not bns)) (cdddr form) (cddr form)))
+ (use-names (and (or rest
(< nesting 1)
(geiser-syntax--binding-form*-p sbfs head))
(not bns))))
- (when name (push name locals))
+ (when name (push name locals))
(when (geiser-syntax--symbol-eq head 'case-lambda)
(dolist (n (and (> nesting 0) (caar (last form))))
(when n (push n locals)))
@@ -430,19 +430,19 @@ implementation-specific entries for font-lock-keywords.")
(dolist (n (and (> nesting 0) (cdaar (last form))))
(when n (push n locals)))
(setq rest (and (> nesting 0) (cdr form))))
- (when use-names
- (dolist (n (geiser-syntax--linearize names))
+ (when use-names
+ (dolist (n (geiser-syntax--linearize names))
(let ((xs (if (and (listp n) (listp (car n))) (car n) (list n))))
(dolist (x xs) (when x (push x locals))))))
- (dolist (f (butlast rest))
- (when (and (listp f)
+ (dolist (f (butlast rest))
+ (when (and (listp f)
(geiser-syntax--symbol-eq (car f) 'define)
(cadr f))
- (push (cadr f) locals)))
- (geiser-syntax--scan-locals bfs sbfs
- (car (last (or rest names)))
+ (push (cadr f) locals)))
+ (geiser-syntax--scan-locals bfs sbfs
+ (car (last (or rest names)))
(1- nesting)
- locals)))))
+ locals)))))
(defun geiser-syntax--locals-around-point (bfs sbfs)
(when (eq major-mode 'scheme-mode)
diff --git a/elisp/geiser-xref.el b/elisp/geiser-xref.el
index 432aa4a..65a57b3 100644
--- a/elisp/geiser-xref.el
+++ b/elisp/geiser-xref.el
@@ -107,19 +107,19 @@
(defun geiser-xref--display-xrefs (header xrefs)
(geiser-xref--with-buffer
- (erase-buffer)
- (geiser--insert-with-face header 'geiser-font-lock-xref-header)
- (newline)
- (let ((last-module))
- (dolist (xref (sort xrefs 'geiser-xref--module<))
- (let ((module (format "%s" (cdr (assoc "module" xref)))))
- (when (not (equal module last-module))
- (insert "\n In module ")
- (geiser--insert-with-face (format "%s" module)
- 'geiser-font-lock-xref-header)
- (newline 2)
- (setq last-module module))
- (geiser-xref--insert-button xref)))))
+ (erase-buffer)
+ (geiser--insert-with-face header 'geiser-font-lock-xref-header)
+ (newline)
+ (let ((last-module))
+ (dolist (xref (sort xrefs 'geiser-xref--module<))
+ (let ((module (format "%s" (cdr (assoc "module" xref)))))
+ (when (not (equal module last-module))
+ (insert "\n In module ")
+ (geiser--insert-with-face (format "%s" module)
+ 'geiser-font-lock-xref-header)
+ (newline 2)
+ (setq last-module module))
+ (geiser-xref--insert-button xref)))))
(geiser-xref--pop-to-buffer)
(goto-char (point-min)))
diff --git a/elisp/geiser.el b/elisp/geiser.el
index 478b10c..837fb24 100644
--- a/elisp/geiser.el
+++ b/elisp/geiser.el
@@ -162,9 +162,9 @@
geiser-image
geiser-racket
geiser-chicken
- geiser-chez
- geiser-chibi
- geiser-mit
+ geiser-chez
+ geiser-chibi
+ geiser-mit
geiser-implementation
geiser-xref))