(provide (quote scheme)) (defvar scheme-mode-syntax-table nil "") (defvar scheme-mode-abbrev-table nil "") (if (not scheme-mode-syntax-table) (let ((i 0)) (setq scheme-mode-syntax-table (make-syntax-table)) (set-syntax-table scheme-mode-syntax-table) (while (< i 48) (modify-syntax-entry i "_ ") (setq i (1+ i))) (setq i (1+ 57)) (while (< i 65) (modify-syntax-entry i "_ ") (setq i (1+ i))) (setq i (1+ 90)) (while (< i 97) (modify-syntax-entry i "_ ") (setq i (1+ i))) (setq i (1+ 122)) (while (< i 128) (modify-syntax-entry i "_ ") (setq i (1+ i))) (modify-syntax-entry 32 " ") (modify-syntax-entry 9 " ") (modify-syntax-entry 10 "> ") (modify-syntax-entry 12 "> ") (modify-syntax-entry 59 "< ") (modify-syntax-entry 96 "' ") (modify-syntax-entry 39 "' ") (modify-syntax-entry 44 "' ") (modify-syntax-entry 46 "' ") (modify-syntax-entry 35 "' ") (modify-syntax-entry 34 "\" ") (modify-syntax-entry 92 "\\ ") (modify-syntax-entry 40 "() ") (modify-syntax-entry 41 ")( "))) (define-abbrev-table (quote scheme-mode-abbrev-table) nil) (defun scheme-mode-variables nil (byte-code "! !P!!Ή!ω!Љ!щ !҉ " [scheme-mode-syntax-table local-abbrev-table scheme-mode-abbrev-table paragraph-start page-delimiter paragraph-separate indent-line-function comment-start comment-start-skip comment-column comment-indent-hook set-syntax-table make-local-variable "^$\\|" scheme-indent-line ";" ";+ *" 40 scheme-comment-indent] 10)) (defun scheme-mode-commands (map) (byte-code "########" [map define-key " " scheme-indent-line "" backward-delete-char-untabify "o" scheme-send-buffer "z" scheme-zap-define "" scheme-indent-sexp "" find-scheme-definition "" scheme-zap-define-and-resume "" resume-scheme] 11)) (defvar scheme-mode-map (make-sparse-keymap)) (scheme-mode-commands scheme-mode-map) (defun scheme-mode nil "\ Major mode for editing Scheme code. Commands: Delete converts tabs to spaces as it moves back. Blank lines separate paragraphs. Semicolons start comments. \\{scheme-mode-map} Entry to this mode calls the value of scheme-mode-hook if that value is non-nil." (interactive) (byte-code "È !Ɖlj !" [scheme-mode-map major-mode mode-name nil kill-all-local-variables use-local-map scheme-mode "Scheme" scheme-mode-variables run-hooks scheme-mode-hook] 5)) (defun scheme-send-definition nil "\ Send the current definition to the Scheme process made by M-x run-scheme." (interactive) (byte-code "!" [nil error "Process scheme does not exist"] 2)) (defun scheme-comment-indent (&optional pos) (byte-code " b È! i/ !. <) @* )/ )" [pos tem comment-column nil looking-at ";;;" ";;" calculate-scheme-indent] 4)) (defvar scheme-indent-offset nil "") (defvar scheme-indent-hook (quote scheme-indent-hook) "") (defun scheme-indent-line (&optional whole-exp) "\ Indent current line as Scheme code. With argument, indent any additional lines of the same expression rigidly along with this one." (interactive "P") (byte-code "ň d`Z `!!$ <0 @1 ňiZ !B I `\"jdZ`VY dZbZ ň !? b!` b!` V) #-" [indent shift-amt beg end pos nil whole-exp calculate-scheme-indent beginning-of-line skip-chars-forward " " looking-at "[ ]*;;;" zerop delete-region forward-sexp 1 forward-line indent-code-rigidly] 13)) (defun calculate-scheme-indent (&optional parse-start) "\ Return appropriate indentation for current line as scheme code. In usual case returns an integer: the column to indent to. Can instead return a list, whose car is the column to indent to. This means that following lines at the same level of indentation should not necessarily be indented the same way. The second element of the list is the buffer position of the start of the containing expression." (byte-code " ` b! `W3 `#\"