summaryrefslogtreecommitdiff
path: root/elisp/geiser-syntax.el
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2015-10-12 12:02:18 +0200
committerJose Antonio Ortega Ruiz <jao@gnu.org>2015-10-12 12:02:18 +0200
commit48ba8943e8ad63f778cf89b6e7dc41313127fffb (patch)
treec0bc04dd5586ca90758ca7190565443d3e88d1b7 /elisp/geiser-syntax.el
parent697d0ac94d2d63bf755931122beafcbe1304b321 (diff)
downloadgeiser-guile-48ba8943e8ad63f778cf89b6e7dc41313127fffb.tar.gz
geiser-guile-48ba8943e8ad63f778cf89b6e7dc41313127fffb.tar.bz2
Keeping the elisp compiler happy
Mainly by reordering definitions so that functions are not used before defined. There are a couple of places where the compiler and I disagree (it complains withing eval-after-load), and a valid complain about functions defined via geiser-popup--define that should be addressed).
Diffstat (limited to 'elisp/geiser-syntax.el')
-rw-r--r--elisp/geiser-syntax.el36
1 files changed, 18 insertions, 18 deletions
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el
index 81ba8c6..42af4dd 100644
--- a/elisp/geiser-syntax.el
+++ b/elisp/geiser-syntax.el
@@ -1,6 +1,6 @@
;;; geiser-syntax.el -- utilities for parsing scheme syntax
-;; Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014 Jose Antonio Ortega Ruiz
+;; Copyright (C) 2009, 2010, 2011, 2012, 2013, 2014, 2015 Jose Antonio Ortega Ruiz
;; This program is free software; you can redistribute it and/or
;; modify it under the terms of the Modified BSD License. You should
@@ -289,22 +289,6 @@ implementation-specific entries for font-lock-keywords.")
sep
(geiser-syntax--mapconcat fun (cdr lst) sep)))))
-(defun geiser-syntax--display (a)
- (cond ((null a) "()")
- ((eq a :t) "#t")
- ((eq a :f) "#f")
- ((geiser-syntax--keywordp a) (format "#%s" a))
- ((symbolp a) (format "%s" a))
- ((equal a "...") "...")
- ((stringp a) (format "%S" a))
- ((and (listp a) (symbolp (car a))
- (equal (symbol-name (car a)) "quote"))
- (format "'%s" (geiser-syntax--display (cadr a))))
- ((listp a)
- (format "(%s)"
- (geiser-syntax--mapconcat 'geiser-syntax--display a " ")))
- (t (format "%s" a))))
-
;;; Code parsing:
@@ -463,7 +447,23 @@ implementation-specific entries for font-lock-keywords.")
'()))))))))
-;;; Fontify strings as Scheme code:
+;;; Display and fontify strings as Scheme code:
+
+(defun geiser-syntax--display (a)
+ (cond ((null a) "()")
+ ((eq a :t) "#t")
+ ((eq a :f) "#f")
+ ((geiser-syntax--keywordp a) (format "#%s" a))
+ ((symbolp a) (format "%s" a))
+ ((equal a "...") "...")
+ ((stringp a) (format "%S" a))
+ ((and (listp a) (symbolp (car a))
+ (equal (symbol-name (car a)) "quote"))
+ (format "'%s" (geiser-syntax--display (cadr a))))
+ ((listp a)
+ (format "(%s)"
+ (geiser-syntax--mapconcat 'geiser-syntax--display a " ")))
+ (t (format "%s" a))))
(defun geiser-syntax--font-lock-buffer ()
(let ((name " *geiser font lock*"))