all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* inf-lisp.el
@ 2005-04-20  0:35 Luc Teirlinck
  2005-04-20  3:55 ` inf-lisp.el Luc Teirlinck
  0 siblings, 1 reply; 2+ messages in thread
From: Luc Teirlinck @ 2005-04-20  0:35 UTC (permalink / raw)


I propose the following changes to inf-lisp.el.  They make Inferior
Lisp mode customizable through Custom.  (Currently it is not.)
Inferior Lisp mode apparently never got updated since Custom was added
to Emacs.  The patch also updates the instructions for adding
keybindings to Inferior Lisp mode.  The present instructions
apparently predate the introduction of mode hooks, as well as of
add-hook.  I can install if desired.

===File ~/inf-lisp.el-diff==================================
*** inf-lisp.el	02 Sep 2003 07:54:39 -0500	1.34
--- inf-lisp.el	19 Apr 2005 19:10:29 -0500	
***************
*** 66,77 ****
  (require 'lisp-mode)
  
  \f
  ;;;###autoload
! (defvar inferior-lisp-filter-regexp "\\`\\s *\\(:\\(\\w\\|\\s_\\)\\)?\\s *\\'"
    "*What not to save on inferior Lisp's input history.
  Input matching this regexp is not saved on the input history in Inferior Lisp
  mode.  Default is whitespace followed by 0 or 1 single-letter colon-keyword
! \(as in :a, :c, etc.)")
  
  (defvar inferior-lisp-mode-map nil)
  (unless inferior-lisp-mode-map
--- 66,85 ----
  (require 'lisp-mode)
  
  \f
+ (defgroup inferior-lisp nil
+   "Run an outside Lisp in an Emacs buffer."
+   :group 'lisp
+   :version "22.1")
+ 
  ;;;###autoload
! (defcustom inferior-lisp-filter-regexp
!   "\\`\\s *\\(:\\(\\w\\|\\s_\\)\\)?\\s *\\'"
    "*What not to save on inferior Lisp's input history.
  Input matching this regexp is not saved on the input history in Inferior Lisp
  mode.  Default is whitespace followed by 0 or 1 single-letter colon-keyword
! \(as in :a, :c, etc.)"
!   :type 'regexp
!   :group 'inferior-lisp)
  
  (defvar inferior-lisp-mode-map nil)
  (unless inferior-lisp-mode-map
***************
*** 110,117 ****
  ;;;  "This function binds many inferior-lisp commands to C-c <letter> bindings,
  ;;;where they are more accessible. C-c <letter> bindings are reserved for the
  ;;;user, so these bindings are non-standard. If you want them, you should
! ;;;have this function called by the inferior-lisp-load-hook:
! ;;;    (setq inferior-lisp-load-hook '(inferior-lisp-install-letter-bindings))
  ;;;You can modify this function to install just the bindings you want."
  (defun inferior-lisp-install-letter-bindings ()
    (define-key lisp-mode-map "\C-ce" 'lisp-eval-defun-and-go)
--- 118,125 ----
  ;;;  "This function binds many inferior-lisp commands to C-c <letter> bindings,
  ;;;where they are more accessible. C-c <letter> bindings are reserved for the
  ;;;user, so these bindings are non-standard. If you want them, you should
! ;;;have this function called by the inferior-lisp-mode-hook:
! ;;;  (add-hook 'inferior-lisp-mode-hook 'inferior-lisp-install-letter-bindings)
  ;;;You can modify this function to install just the bindings you want."
  (defun inferior-lisp-install-letter-bindings ()
    (define-key lisp-mode-map "\C-ce" 'lisp-eval-defun-and-go)
***************
*** 133,155 ****
    (define-key inferior-lisp-mode-map "\C-cv"
      'lisp-show-variable-documentation))
  
- 
  ;;;###autoload
! (defvar inferior-lisp-program "lisp"
!   "*Program name for invoking an inferior Lisp with for Inferior Lisp mode.")
  
  ;;;###autoload
! (defvar inferior-lisp-load-command "(load \"%s\")\n"
    "*Format-string for building a Lisp expression to load a file.
  This format string should use `%s' to substitute a file name
  and should result in a Lisp expression that will command the inferior Lisp
  to load that file.  The default works acceptably on most Lisps.
  The string \"(progn (load \\\"%s\\\" :verbose nil :print t) (values))\\n\"
  produces cosmetically superior output for this application,
! but it works only in Common Lisp.")
  
  ;;;###autoload
! (defvar inferior-lisp-prompt "^[^> \n]*>+:? *"
    "Regexp to recognise prompts in the Inferior Lisp mode.
  Defaults to \"^[^> \\n]*>+:? *\", which works pretty good for Lucid, kcl,
  and franz.  This variable is used to initialize `comint-prompt-regexp' in the
--- 141,166 ----
    (define-key inferior-lisp-mode-map "\C-cv"
      'lisp-show-variable-documentation))
  
  ;;;###autoload
! (defcustom inferior-lisp-program "lisp"
!   "*Program name for invoking an inferior Lisp in Inferior Lisp mode."
!   :type 'string
!   :group 'inferior-lisp)
  
  ;;;###autoload
! (defcustom inferior-lisp-load-command "(load \"%s\")\n"
    "*Format-string for building a Lisp expression to load a file.
  This format string should use `%s' to substitute a file name
  and should result in a Lisp expression that will command the inferior Lisp
  to load that file.  The default works acceptably on most Lisps.
  The string \"(progn (load \\\"%s\\\" :verbose nil :print t) (values))\\n\"
  produces cosmetically superior output for this application,
! but it works only in Common Lisp."
!   :type 'string
!   :group 'inferior-lisp)
  
  ;;;###autoload
! (defcustom inferior-lisp-prompt "^[^> \n]*>+:? *"
    "Regexp to recognise prompts in the Inferior Lisp mode.
  Defaults to \"^[^> \\n]*>+:? *\", which works pretty good for Lucid, kcl,
  and franz.  This variable is used to initialize `comint-prompt-regexp' in the
***************
*** 163,169 ****
  franz: \"^\\\\(->\\\\|<[0-9]*>:\\\\) *\"
  kcl: \"^>+ *\"
  
! This is a fine thing to set in your .emacs file.")
  
  (defvar inferior-lisp-buffer nil "*The current inferior-lisp process buffer.
  
--- 174,182 ----
  franz: \"^\\\\(->\\\\|<[0-9]*>:\\\\) *\"
  kcl: \"^>+ *\"
  
! This is a fine thing to set in your .emacs file or through Custom."
!   :type 'regexp
!   :group 'inferior-lisp)
  
  (defvar inferior-lisp-buffer nil "*The current inferior-lisp process buffer.
  
***************
*** 201,208 ****
  buffer with \\[set-variable].")
  
  ;;;###autoload
! (defvar inferior-lisp-mode-hook '()
!   "*Hook for customising Inferior Lisp mode.")
  
  (put 'inferior-lisp-mode 'mode-class 'special)
  
--- 214,223 ----
  buffer with \\[set-variable].")
  
  ;;;###autoload
! (defcustom inferior-lisp-mode-hook '()
!   "*Hook for customising Inferior Lisp mode."
!   :type 'hook
!   :group 'inferior-lisp)
  
  (put 'inferior-lisp-mode 'mode-class 'special)
  
***************
*** 573,581 ****
  
  ;;; Do the user's customisation...
  ;;;===============================
! (defvar inferior-lisp-load-hook nil
!   "This hook is run when the library `inf-lisp' is loaded.
! This is a good place to put keybindings.")
  
  (run-hooks 'inferior-lisp-load-hook)
  
--- 588,597 ----
  
  ;;; Do the user's customisation...
  ;;;===============================
! (defcustom inferior-lisp-load-hook nil
!   "This hook is run when the library `inf-lisp' is loaded."
!   :type 'hook
!   :group 'inferior-lisp)
  
  (run-hooks 'inferior-lisp-load-hook)
  
============================================================

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-04-20  3:55 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-20  0:35 inf-lisp.el Luc Teirlinck
2005-04-20  3:55 ` inf-lisp.el Luc Teirlinck

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.