summaryrefslogtreecommitdiff
path: root/emacs/guileint/guileint.el
blob: e2cf108a8b93afa3a0245d0d468413a01c6f740c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
;;; NAME:	 guileint.el
;;; SYNOPSIS:	 A Guile/Emacs interface prototype
;;; VERSION:	 1.5
;;; LAST CHANGE: 2002-10-19
;;; CREATED:	 1997-07-17
;;; AUTHOR:	 Mikael Djurfeldt <djurfeldt@nada.kth.se>
;;; COPYRIGHT:	 (C) 1997, 2002 Mikael Djurfeldt
;;;
;;;  Verbatim copies of this file may be freely redistributed.
;;;
;;;  Modified versions of this file may be redistributed provided that this
;;;  notice remains unchanged, the file contains prominent notice of
;;;  author and time of modifications, and redistribution of the file
;;;  is not further restricted in any way.
;;;
;;;  This file is distributed `as is', without warranties of any kind.
;;;
;;; REQUIREMENTS:
;;;
;;; USAGE:
;;;
;;; BUGS:
;;;

(require 'cl-19 "cl")

(setq scheme-program-name
      (let ((v (getenv "SCHEME_PROGRAM_NAME")))
	(or v
	    (concat "guile"
		    (and window-system " --emacs")))))

;;; Select buffers to pop up as separate windows
(if window-system
    (progn
      (defvar default-special-display-buffer-names
	special-display-buffer-names)
      (setq special-display-buffer-names
	    (union default-special-display-buffer-names '("*scheme*")))

      (setq same-window-buffer-names
	    (delete "*scheme*" same-window-buffer-names))

      (setq special-display-frame-alist
	    '((height . 24) (width . 80) (unsplittable . t)))
      ))

;;; Do things to support lisp-hacking better
(if (equal (substring emacs-version 0 2) "19")
    ;; Emacs version 19 specific initializations
    (progn
      (copy-face 'default 'paren)
      (condition-case err
	  (make-face-bold 'paren)
	(error))
      (setq show-paren-face 'paren)
      (require 'paren)
      ;; The old parenthesis matcher has the advantage of displaying
      ;; non-visible matching parenthesis in the minibuffer.
      ;; Since paren.el adds (setq blink-paren-function nil) to the
      ;; window-setup-hook it's necessary to put this setq there
      ;; also.
      (add-hook 'window-setup-hook (function restore-blink-paren) t)
      (setq blink-matching-delay 0.5)
      ))

(defun restore-blink-paren ()
  (interactive)
  (setq blink-matching-paren-on-screen t)
  (set-face-underline-p 'paren t))

;;; Menus
;;;

(require 'defmenu)

;(setq menu-bar-final-items
;      '(completion inout signals scheme help-menu))
(setq menu-bar-final-items
      '(interpret scheme help-menu))

;; The global menu
;;
(define-menu global-map 'interpret "Interpret"
  '(("Guile" run-scheme (not (comint-check-proc "*scheme*")))
    ("Switch to *scheme*" guile-switch-to-scheme
     (comint-check-proc "*scheme*"))))

(load "inda-scheme")

(provide 'guileint)