<commit_before>;;; inferior-arc.el --- Arc process in a buffer. Adapted from cmuscheme.el

;; Copyright (C) 1988, 1994, 1997, 2001, 2002, 2003, 2004,
;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.

;; Author: <NAME> <<EMAIL>>
;; Keywords: processes, lisp, arc

;; Adapted for Arc by <NAME> <<EMAIL>>

;; This file is NOT part of GNU Emacs.

;; This code 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 2, or (at your option)
;; any later version.

;; inferior-arc.el 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 inferior-arc.el; see the file COPYING.  If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.

;;; Commentary:

;;    This is a customization of comint-mode (see comint.el)
;;
;; Written by <NAME> (<EMAIL>). With bits and pieces
;; lifted from scheme.el, shell.el, clisp.el, newclisp.el, cobol.el, et al..
;; 8/88
;;
;; Please send me bug reports, bug fixes, and extensions, so that I can
;; merge them into the master source.
;;
;; The changelog is at the end of this file.
;;
;;; CHANGE LOG
;;; ===========================================================================
;;; 8/88 Olin
;;; Created.
;;;
;;; 2/15/89 Olin
;;; Removed -emacs flag from process invocation. It's only useful for
;;; cscheme, and makes cscheme assume it's running under xscheme.el,
;;; which messes things up royally. A bug.
;;;
;;; 5/22/90 Olin
;;; - Upgraded to use comint-send-string and comint-send-region.
;;; - run-scheme now offers to let you edit the command line if
;;;   you invoke it with a prefix-arg. M-x scheme is redundant, and
;;;   has been removed.
;;; - Explicit references to process "scheme" have been replaced with
;;;   (scheme-proc). This allows better handling of multiple process bufs.
;;; - Added scheme-send-last-sexp, bound to C-x C-e. A gnu convention.
;;; - Have not added process query facility a la cmulisp.el's lisp-show-arglist
;;;   and friends, but interested hackers might find a useful application
;;;   of this facility.
;;;
;;; 3/12/90 Olin
;;; - scheme-load-file and scheme-compile-file no longer switch-to-scheme.
;;;   Tale suggested this.
;;;
;;; 2/08/08 sjs
;;; - Adapted for Arc (basically s/scheme/arc/g)

;;; Code:

(require 'arc)
(require 'comint)


(defgroup arc nil
  "Run an Arc process in a buffer."
  :group 'arc)

;;; INFERIOR ARC MODE STUFF
;;;============================================================================

(defcustom inferior-arc-mode-hook nil
  "*Hook for customizing inferior-arc mode."
  :type 'hook
  :group 'arc)

(defvar inferior-arc-mode-map
  (let ((m (make-sparse-keymap)))
    (define-key m "\M-\C-x" 'arc-send-definition) ;gnu convention
    (define-key m "\C-x\C-e" 'arc-send-last-sexp)
    (define-key m "\C-c\C-l" 'arc-load-file)
    m))

(defvar arc-program-name "arc --no-rl"
  "The name of the program used to run Arc.")

;; Install the process communication commands in the arc-mode keymap.
(define-key arc-mode-map "\M-\C-x" 'arc-send-definition);gnu convention
(define-key arc-mode-map "\C-x\C-e" 'arc-send-last-sexp);gnu convention
(define-key arc-mode-map "\C-c\C-e" 'arc-send-definition)
(define-key arc-mode-map "\C-c\M-e" 'arc-send-definition-and-go)
(define-key arc-mode-map "\C-c\C-r" 'arc-send-region)
(define-key arc-mode-map "\C-c\M-r" 'arc-send-region-and-go)
(define-key arc-mode-map "\C-c\C-x" 'arc-expand-current-form)
(define-key arc-mode-map "\C-c\C-z" 'switch-to-arc)
(define-key arc-mode-map "\C-c\C-l" 'arc-load-file)

(let ((map (lookup-key arc-mode-map [menu-bar arc])))
  (define-key map [separator-eval] '("--"))
  (define-key map [load-file]<commit_msg>update emacs settings<commit_after>;;; inferior-arc.el --- Arc process in a buffer. Adapted from cmuscheme.el

;; Copyright (C) 1988, 1994, 1997, 2001, 2002, 2003, 2004,
;;   2005, 2006, 2007, 2008 Free Software Foundation, Inc.

;; Author: <NAME> <<EMAIL>>
;; Keywords: processes, lisp, arc

;; Adapted for Arc by <NAME> <<EMAIL>>

;; This file is NOT part of GNU Emacs.

;; This code 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 2, or (at your option)
;; any later version.

;; inferior-arc.el 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 inferior-arc.el; see the file COPYING.  If not, write to the
;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
;; Boston, MA 02110-1301, USA.

;;; Commentary:

;;    This is a customization of comint-mode (see comint.el)
;;
;; Written by <NAME> (<EMAIL>). With bits and pieces
;; lifted from scheme.el, shell.el, clisp.el, newclisp.el, cobol.el, et al..
;; 8/88
;;
;; Please send me bug reports, bug fixes, and extensions, so that I can
;; merge them into the master source.
;;
;; The changelog is at the end of this file.
;;
;;; CHANGE LOG
;;; ===========================================================================
;;; 8/88 Olin
;;; Created.
;;;
;;; 2/15/89 Olin
;;; Removed -emacs flag from process invocation. It's only useful for
;;; cscheme, and makes cscheme assume it's running under xscheme.el,
;;; which messes things up royally. A bug.
;;;
;;; 5/22/90 Olin
;;; - Upgraded to use comint-send-string and comint-send-region.
;;; - run-scheme now offers to let you edit the command line if
;;;   you invoke it with a prefix-arg. M-x scheme is redundant, and
;;;   has been removed.
;;; - Explicit references to process "scheme" have been replaced with
;;;   (scheme-proc). This allows better handling of multiple process bufs.
;;; - Added scheme-send-last-sexp, bound to C-x C-e. A gnu convention.
;;; - Have not added process query facility a la cmulisp.el's lisp-show-arglist
;;;   and friends, but interested hackers might find a useful application
;;;   of this facility.
;;;
;;; 3/12/90 Olin
;;; - scheme-load-file and scheme-compile-file no longer switch-to-scheme.
;;;   Tale suggested this.
;;;
;;; 2/08/08 sjs
;;; - Adapted for Arc (basically s/scheme/arc/g)

;;; Code:

(require 'arc)
(require 'comint)


(defgroup arc nil
  "Run an Arc process in a buffer."
  :group 'arc)

;;; INFERIOR ARC MODE STUFF
;;;============================================================================

(defcustom inferior-arc-mode-hook nil
  "*Hook for customizing inferior-arc mode."
  :type 'hook
  :group 'arc)

(defvar inferior-arc-mode-map
  (let ((m (make-sparse-keymap)))
    (define-key m "\M-\C-x" 'arc-send-definition) ;gnu convention
    (define-key m "\C-x\C-e" 'arc-send-last-sexp)
    (define-key m "\C-c\C-l" 'arc-load-file)
    m))

(defvar arc-program-name "arc.sh -n"
  "The name of the program used to run Arc.")

;; Install the process communication commands in the arc-mode keymap.
(define-key arc-mode-map "\M-\C-x" 'arc-send-definition);gnu convention
(define-key arc-mode-map "\C-x\C-e" 'arc-send-last-sexp);gnu convention
(define-key arc-mode-map "\C-c\C-e" 'arc-send-definition)
(define-key arc-mode-map "\C-c\M-e" 'arc-send-definition-and-go)
(define-key arc-mode-map "\C-c\C-r" 'arc-send-region)
(define-key arc-mode-map "\C-c\M-r" 'arc-send-region-and-go)
(define-key arc-mode-map "\C-c\C-x" 'arc-expand-current-form)
(define-key arc-mode-map "\C-c\C-z" 'switch-to-arc)
(define-key arc-mode-map "\C-c\C-l" 'arc-load-file)

(let ((map (lookup-key arc-mode-map [menu-bar arc])))
  (define-key map [separator-eval] '("--"))
  (define-key map [load-file]
{'fraction_non_alphanumeric': 0.1828875681030213, 'fraction_numerical': 0.02030708271421496, 'mean_word_length': 3.768004722550177, 'pattern_counts': {'":': 0, '<': 19, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1964912', 'n_tokens_mistral': 2865, 'n_tokens_neox': 2670, 'n_words': 949}