Don't break emacs <= 24.3 just yet
[bpt/emacs.git] / lisp / progmodes / inf-lisp.el
index 1328e30..5419a6d 100644 (file)
@@ -1,6 +1,7 @@
 ;;; inf-lisp.el --- an inferior-lisp mode
 
-;; Copyright (C) 1988, 1993-1994, 2001-2011  Free Software Foundation, Inc.
+;; Copyright (C) 1988, 1993-1994, 2001-2014 Free Software Foundation,
+;; Inc.
 
 ;; Author: Olin Shivers <shivers@cs.cmu.edu>
 ;; Keywords: processes, lisp
@@ -36,7 +37,7 @@
 ;; This makes these modes easier to use.
 
 ;; For documentation on the functionality provided by comint mode, and
-;; the hooks available for customising it, see the file comint.el.
+;; the hooks available for customizing it, see the file comint.el.
 ;; For further information on inferior-lisp mode, see the comments below.
 
 ;; Needs fixin:
   :group 'lisp
   :version "22.1")
 
-;;;###autoload
 (defcustom inferior-lisp-filter-regexp
-  (purecopy "\\`\\s *\\(:\\(\\w\\|\\s_\\)\\)?\\s *\\'")
-  "*What not to save on inferior Lisp's input history.
+  "\\`\\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.)"
@@ -91,6 +91,21 @@ mode.  Default is whitespace followed by 0 or 1 single-letter colon-keyword
     (define-key map "\C-c\C-v" 'lisp-show-variable-documentation)
     map))
 
+(easy-menu-define
+  inferior-lisp-menu
+  inferior-lisp-mode-map
+  "Inferior Lisp Menu"
+  '("Inf-Lisp"
+    ["Eval Last Sexp" lisp-eval-last-sexp t]
+    "--"
+    ["Load File..." lisp-load-file t]
+    ["Compile File..." lisp-compile-file t]
+    "--"
+    ["Show Arglist..." lisp-show-arglist t]
+    ["Describe Symbol..." lisp-describe-sym t]
+    ["Show Documentation for Function..." lisp-show-function-documentation t]
+    ["Show Documentation for Variable..." lisp-show-variable-documentation t]))
+
 ;;; These commands augment Lisp mode, so you can process Lisp code in
 ;;; the source files.
 (define-key lisp-mode-map "\M-\C-x"  'lisp-eval-defun)     ; Gnu convention
@@ -137,15 +152,13 @@ mode.  Default is whitespace followed by 0 or 1 single-letter colon-keyword
   (define-key inferior-lisp-mode-map "\C-cv"
     'lisp-show-variable-documentation))
 
-;;;###autoload
-(defcustom inferior-lisp-program (purecopy "lisp")
-  "*Program name for invoking an inferior Lisp in Inferior Lisp mode."
+(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 (purecopy "(load \"%s\")\n")
-  "*Format-string for building a Lisp expression to load a file.
+(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.
@@ -155,8 +168,7 @@ but it works only in Common Lisp."
   :type 'string
   :group 'inferior-lisp)
 
-;;;###autoload
-(defcustom inferior-lisp-prompt (purecopy "^[^> \n]*>+:? *")
+(defcustom inferior-lisp-prompt "^[^> \n]*>+:? *"
   "Regexp to recognize 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
@@ -168,9 +180,7 @@ This variable is only used if the variable
 More precise choices:
 Lucid Common Lisp: \"^\\\\(>\\\\|\\\\(->\\\\)+\\\\) *\"
 franz: \"^\\\\(->\\\\|<[0-9]*>:\\\\) *\"
-kcl: \"^>+ *\"
-
-This is a fine thing to set in your .emacs file or through Custom."
+kcl: \"^>+ *\""
   :type 'regexp
   :group 'inferior-lisp)
 
@@ -206,12 +216,11 @@ This process selection is performed by function `inferior-lisp-proc'.
 Whenever \\[inferior-lisp] fires up a new process, it resets
 `inferior-lisp-buffer' to be the new process's buffer.  If you only run
 one process, this does the right thing.  If you run multiple
-processes, you can change `inferior-lisp-buffer' to another process
-buffer with \\[set-variable].")
+processes, you might need to change `inferior-lisp-buffer' to
+whichever process buffer you want to use.")
 
-;;;###autoload
 (defvar inferior-lisp-mode-hook '()
-  "*Hook for customizing Inferior Lisp mode.")
+  "Hook for customizing Inferior Lisp mode.")
 
 (put 'inferior-lisp-mode 'mode-class 'special)
 
@@ -453,7 +462,7 @@ This holds a cons cell of the form `(DIRECTORY . FILE)'
 describing the last `lisp-load-file' or `lisp-compile-file' command.")
 
 (defcustom lisp-source-modes '(lisp-mode)
-  "*Used to determine if a buffer contains Lisp source code.
+  "Used to determine if a buffer contains Lisp source code.
 If it's loaded into a buffer that is in one of these major modes, it's
 considered a Lisp source file by `lisp-load-file' and `lisp-compile-file'.
 Used by these commands to determine defaults."