summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-14 22:15:09 +0100
committerJose Antonio Ortega Ruiz <jao@gnu.org>2009-02-14 22:15:09 +0100
commit740a937e41497baeb57d73a89db113bcdd7644ca (patch)
tree46d5dde00143ad37668d68aab582cd5066f760a1 /elisp
parent11a64e7405ade65d48c28c578dfb18d15f9499d1 (diff)
downloadgeiser-740a937e41497baeb57d73a89db113bcdd7644ca.tar.gz
geiser-740a937e41497baeb57d73a89db113bcdd7644ca.tar.bz2
Autodoc: try symbol at point first. Some cleanups.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/geiser-autodoc.el9
-rw-r--r--elisp/geiser-base.el7
-rw-r--r--elisp/geiser-custom.el57
-rw-r--r--elisp/geiser-edit.el3
-rw-r--r--elisp/geiser-mode.el1
-rw-r--r--elisp/geiser-repl.el13
-rw-r--r--elisp/geiser-syntax.el8
7 files changed, 75 insertions, 23 deletions
diff --git a/elisp/geiser-autodoc.el b/elisp/geiser-autodoc.el
index f8e682b..d7d6a08 100644
--- a/elisp/geiser-autodoc.el
+++ b/elisp/geiser-autodoc.el
@@ -27,6 +27,7 @@
(require 'geiser-eval)
(require 'geiser-syntax)
+(require 'geiser-custom)
(require 'geiser-base)
(require 'eldoc)
@@ -38,12 +39,8 @@
"Options for displaying autodoc strings in the echo area."
:group 'geiser)
-(defface geiser-font-lock-autodoc-current-arg
- '((t (:background unspecified :foreground "red" :bold t)))
- "Face for highlighting current argument in autodoc messages."
- :group 'faces
- :group 'geiser-faces
- :group 'geiser-autodoc)
+(geiser-custom--defface fuel-font-lock-markup-title
+ 'bold geiser-autodoc "highlighting current argument in autodoc messages")
(defcustom geiser-autodoc-delay 0.2
"Delay before autodoc messages are fetched and displayed, in seconds."
diff --git a/elisp/geiser-base.el b/elisp/geiser-base.el
index 439a047..e20afd4 100644
--- a/elisp/geiser-base.el
+++ b/elisp/geiser-base.el
@@ -43,13 +43,6 @@
(message "Geiser %s" (geiser-version-string)))
-;;; Customization group:
-
-(defgroup geiser nil
- "Geiser framework for Guile-Emacs interaction."
- :group 'languages)
-
-
;;; Emacs compatibility:
(eval-after-load "ring"
diff --git a/elisp/geiser-custom.el b/elisp/geiser-custom.el
new file mode 100644
index 0000000..591d11a
--- /dev/null
+++ b/elisp/geiser-custom.el
@@ -0,0 +1,57 @@
+;; geiser-custom.el -- customization
+
+;; Copyright (C) 2009 Jose Antonio Ortega Ruiz
+
+;; Author: Jose Antonio Ortega Ruiz <jao@gnu.org>
+;; Start date: Sat Feb 14, 2009 21:49
+
+;; This file is free software; you can redistribute it and/or modify
+;; it under the terms of the GNU General Public License as published by
+;; the Free Software Foundation; either version 3 of the License, or
+;; (at your option) any later version.
+
+;; This file is distributed in the hope that it will be useful,
+;; but WITHOUT ANY WARRANTY; without even the implied warranty of
+;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+;; GNU General Public License for more details.
+
+;; You should have received a copy of the GNU General Public License
+;; along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+;;; Comentary:
+
+;; Utilities for handling custom variables and faces.
+
+;;; Code:
+
+(require 'font-lock)
+(require 'geiser-base)
+
+
+;;; Customization group:
+
+(defgroup geiser nil
+ "Geiser framework for Scheme-Emacs interaction."
+ :group 'languages)
+
+
+;;; Faces:
+
+(defgroup geiser-faces nil
+ "Faces used by GEISER."
+ :group 'geiser
+ :group 'faces)
+
+(defmacro geiser-custom--defface (face def group doc)
+ `(defface ,face (face-default-spec ,def)
+ ,(format "Face for %s." doc)
+ :group ',group
+ :group 'geiser-faces
+ :group 'faces))
+
+(put 'geiser-custom--defface 'lisp-indent-function 1)
+
+
+
+(provide 'geiser-custom)
+;;; geiser-custom.el ends here
diff --git a/elisp/geiser-edit.el b/elisp/geiser-edit.el
index f34c800..fc28d09 100644
--- a/elisp/geiser-edit.el
+++ b/elisp/geiser-edit.el
@@ -26,6 +26,7 @@
(require 'geiser-completion)
(require 'geiser-eval)
+(require 'geiser-custom)
(require 'geiser-base)
(require 'etags)
@@ -42,7 +43,7 @@
(const :tag "Current window" nil))))
(geiser-edit--define-custom-visit
- geiser-edit-symbol-method geiser
+ geiser-edit-symbol-method geiser-mode
"How the new buffer is opened when invoking \\[geiser-edit-symbol-at-point]")
diff --git a/elisp/geiser-mode.el b/elisp/geiser-mode.el
index 812810a..d58de1e 100644
--- a/elisp/geiser-mode.el
+++ b/elisp/geiser-mode.el
@@ -32,6 +32,7 @@
(require 'geiser-autodoc)
(require 'geiser-eval)
(require 'geiser-popup)
+(require 'geiser-custom)
(require 'geiser-base)
diff --git a/elisp/geiser-repl.el b/elisp/geiser-repl.el
index 671c798..508525a 100644
--- a/elisp/geiser-repl.el
+++ b/elisp/geiser-repl.el
@@ -29,32 +29,35 @@
(require 'geiser-edit)
(require 'geiser-eval)
(require 'geiser-connection)
+(require 'geiser-custom)
(require 'geiser-base)
+
(require 'comint)
;;; Customization:
(defgroup geiser-repl nil
- "Interacting with a Guile process inside Emacs."
+ "Interacting with the Geiser REPL."
:group 'geiser)
(defcustom geiser-repl-guile-binary
(cond ((eq system-type 'windows-nt) "guile.exe")
((eq system-type 'darwin) "guile")
(t "guile"))
- "Name to use to call the guile executable when starting a REPL."
+ "Name to use to call the Guile executable when starting a REPL."
:type 'string
:group 'geiser-repl)
(defcustom geiser-repl-use-other-window t
- "Use a window other than the current buffer's when switching to
-the Geiser REPL buffer."
+ "Whether to Use a window other than the current buffer's when
+switching to the Geiser REPL buffer."
:type 'boolean
:group 'geiser-repl)
(defcustom geiser-repl-window-allow-split t
- "Allow window splitting when switching to the Geiser REPL buffer."
+ "Whether to allow window splitting when switching to the Geiser
+REPL buffer."
:type 'boolean
:group 'geiser-repl)
diff --git a/elisp/geiser-syntax.el b/elisp/geiser-syntax.el
index 0218f06..24e51df 100644
--- a/elisp/geiser-syntax.el
+++ b/elisp/geiser-syntax.el
@@ -65,9 +65,9 @@
(defun geiser-syntax--enclosing-form-data ()
(save-excursion
- (let ((p (geiser-syntax--end-of-thing))
- (current (cons (symbol-at-point) 0))
- (data))
+ (let* ((p (geiser-syntax--end-of-thing))
+ (current (cons (symbol-at-point) 0))
+ (data (when (car current) (list current))))
(ignore-errors
(while (not (bobp))
(backward-up-list)
@@ -80,7 +80,7 @@
(forward-sexp)
(when (< (point) p) (setq arg-no (1+ arg-no))))
(push (cons proc arg-no) data))))))
- (reverse (if (car current) (push current data) data)))))
+ (reverse data))))
(defun geiser-syntax--prepare-scheme-for-elisp-reader ()
(goto-char (point-min))