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
commit135d54e742c6bde4fea399fe45045059a1bcba5a (patch)
tree6e6251fb879d0a8950b791c7652d2802dddb4208 /elisp/geiser-syntax.el
parent24bbdc339ea32259d6262b16a9b093fcdf19a210 (diff)
downloadgeiser-135d54e742c6bde4fea399fe45045059a1bcba5a.tar.gz
geiser-135d54e742c6bde4fea399fe45045059a1bcba5a.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*"))