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 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545
|
;;; -*- Mode: Emacs-Lisp -*-
;;; ilisp-def.el --
;;; ILISP defvar's
;;;
;;; This file is part of ILISP.
;;; Please refer to the file COPYING for copyrights and licensing
;;; information.
;;; Please refer to the file ACKNOWLEGDEMENTS for an (incomplete) list
;;; of present and past contributors.
;;;
;;; $Id: ilisp-def.el,v 1.5 2002-06-03 23:37:00 wbd Exp $
;;;%Variables
;;;%%Deflocal
(defvar ilisp-locals '(comint-prompt-regexp
input-ring-size
comint-get-old-input
comint-input-sentinel
comint-input-filter
comint-input-sender
comint-eol-on-send
comint-send-newline
comint-always-scroll
comint-fix-error
comint-continue
comint-interrupt-regexp
comint-error-regexp
comint-output-filter
comint-interrupt-start
comint-handler
comint-update-status
comint-prompt-status
comint-abort-hook
comint-use-prompt-regexp-instead-of-fields)
"List of ilisp local variables.")
(defun lisp-deflocal (local)
(unless (memq local ilisp-locals)
(setq ilisp-locals (cons local ilisp-locals))))
;;;
(defmacro deflocal (variable default &optional documentation)
"Define an ilisp local variable."
(` (progn (lisp-deflocal '(, variable))
(defvar (, variable) (, default) (, documentation)))))
;;;%%Simple customization
(defcustom ilisp-*prefix*
(if (and (boundp 'ilisp-*use-fsf-compliant-keybindings*)
ilisp-*use-fsf-compliant-keybindings*)
"\C-c"
"\C-z")
"Prefix sequence for ilisp commands.")
(deflocal ilisp-program nil
"*Program and arguments for invoking an inferior LISP.
The program can be an rsh to run on a remote machine. If there is not
a common file system, the interface files will be sent down the pipe
instead. The value of this variable is set from DIALECT-program, or
inherited from a less specific dialect if DIALECT-program is nil.")
(defvar ilisp-motd
"ILISP V%s Use M-x ilisp-bug for problems and suggestions."
"*Message of the day format string for ILISP given VERSION. To
prevent any message from being printed, set this to nil.")
(defvar lisp-wait-p nil
"*T if LISP eval/compile commands should wait for the result.
A minus prefix to the command will change the sense of this switch
for just the next command.")
(defvar lisp-no-popper 'message
"*T if all output goes to the inferior LISP rather than in a pop-up window.
'(quote message) if you want output of one line to go to the echo area
(usually the Minibuffer) or to a pop-up window if more. You should
probably also set comint-always-scroll to T as well so that output is
always visible.")
(defvar ilisp-*use-frame-for-output* t
"*If T, ILISP uses a frame for its output, rather than a pop-up window.
The output going to the frame is usually multiline. Single line
output usually goes to the echo area in the minibuffer. If no window
system is running then the value of this variable is ininfluent.")
(defcustom ilisp-*use-fsf-compliant-keybindings* nil
"*If non-nil, ILISP will use FSF Emacs compliant keybindings.
In brief, this means all ilisp-specific features will be bound to C-c
KEY, where KEY is a control character, a digit, or one of }, {, >, <,
:, or ;. In some cases ilisp may rebind a regular Emacs key, if the
new binding does \"the same thing\" as the original binding but in a
way more appropriate for ilisp."
:type 'boolean
:version "20.5"
:group 'ILisp-interaction
;; note: custom-ilisp.el is not loaded yet, so I'm just getting
;; ready for the future by specifying a group above.
)
(defvar lisp-show-status t
"*Set to nil to stop showing process status in lisp-mode buffers.")
(defvar ilisp-*prefix-match* nil
"*If T, when completing through the inferior LISP matches only as a prefix.
This will speed up completion, but you no longer get partial
completion.")
(deflocal ilisp-filter-regexp nil
"*What not to save on an inferior LISP's input history.
Input matching this regexp is not saved on the input history in ilisp
mode.")
(deflocal ilisp-filter-length 3
"*Do not save strings less than this in the command history.")
(deflocal ilisp-other-prompt nil
"*Regexp to recognise \"other\" prompts in the inferior LISP.
These 'prompts' are those of non-(read/eval/print) top-levels that
bol-ilisp skips them.")
(deflocal ilisp-raw-echo nil
"*Set this to T to cause echoing in raw keyboard mode.")
(deflocal ilisp-load-no-compile-query nil
"*Set this to T to stop load querying about compile.")
;;;%%%Hooks
(defvar ilisp-site-hook nil
"Hook for site customization of ilisp mode when it is loaded.")
(defvar ilisp-load-hook '()
"Hook for customizing ilisp mode when it is loaded.")
(defvar ilisp-mode-hook '()
"Hook for customizing ilisp mode.")
(defvar ilisp-init-hook nil
"Hook of functions to call on first prompt in inferior LISP.")
(deflocal ilisp-init-hook-local nil
"Local Hook of functions to call on first prompt in inferior LISP.")
;;;%%Advanced customization
;;;%%%Commands
(deflocal ilisp-reset nil
"String for resetting the top-level of the inferior LISP.")
(deflocal ilisp-load-or-send-command nil
"Format string for loading BINARY if possible otherwise loading FILE.
If you can't load either, return NIL.")
(deflocal ilisp-hash-form-regexp nil
"Regular expression for finding a package specification in a buffer.
The entire sexp starting with this pattern will be passed to
ilisp-package-command to find the package.")
(deflocal ilisp-in-package-command-string nil
"Regular expression for finding a command that makes some package active.")
(deflocal ilisp-defpackage-command-string nil
"Regular expression for finding a command that defines a package.")
(deflocal ilisp-package-separator-regexp nil
"Regular expression that matches the package separator.")
(deflocal ilisp-package-command nil
"Format string to find the package given PACKAGE.")
(deflocal ilisp-package-name-command nil
"Format string to return the name of the current package.")
(deflocal ilisp-in-package-command nil
"Format string to set the package given PACKAGE.")
(deflocal ilisp-last-command nil
"Format string for getting the last returned value.")
(deflocal ilisp-save-command nil
"Format string for saving result history given FORM.")
(deflocal ilisp-restore-command nil
"Format string for restoring result history.")
(deflocal ilisp-block-command nil
"Format string for grouping FORMS into one.")
(deflocal ilisp-no-package-in-core-regexp nil
"Regexp that matches to ilisp-package-block-command's result in a
case when the package was not found in core. Remember to set
`ilisp-fallback-package' too.")
(deflocal ilisp-fallback-package nil
"Package name to be used when the buffer's real package cannot be found
from the core.")
(deflocal ilisp-eval-command nil
"Format string for evaluating FORM in PACKAGE from FILE at LINE.")
(deflocal ilisp-defvar-regexp nil
"Regular expression for identifying a defvar form.")
(deflocal ilisp-defvar-command nil
"Format string for re-evaluating DEFVAR in PACKAGE from FILE at LINE.")
(deflocal ilisp-describe-command nil
"Format string for describing FORM in PACKAGE.")
(deflocal ilisp-compile-command nil
"Format string for compiling FORM in PACKAGE.")
(deflocal ilisp-inspect-command nil
"Format string for inspecting FORM in PACKAGE.")
(deflocal ilisp-arglist-command nil
"Format string for arglist of SYMBOL in PACKAGE.")
(deflocal ilisp-documentation-types nil
"((\"type\") ...) possible LISP documentation types.")
(deflocal ilisp-documentation-command nil
"Format string for documentation given SYMBOL in PACKAGE and TYPE.")
(deflocal ilisp-macroexpand-1-command nil
"Format string for top-level macroexpand given FORM and PACKAGE.")
(deflocal ilisp-macroexpand-command nil
"Format string for macroexpand given FORM and PACKAGE.")
(deflocal ilisp-complete-command nil
"Format string for finding possibly matching symbols.
Given SYMBOL, PACKAGE, FUNCTIONP, EXTERNALP and PARTIAL-MATCHP, it
should print '((string) (string) ...)'.")
(deflocal ilisp-callers-command nil
"Format for finding the callers of SYMBOL in PACKAGE.
The function should print out callers with one per line.")
(deflocal ilisp-trace-command nil
"Format for tracing SYMBOL in PACKAGE.")
(deflocal ilisp-untrace-command nil
"Format for untracing SYMBOL in PACKAGE.")
(deflocal ilisp-directory-command nil
"Format for getting default DIRECTORY.")
(deflocal ilisp-set-directory-command nil
"Format for setting default DIRECTORY.")
(deflocal ilisp-binary-command nil
"Command to return the extension for binary files.")
(deflocal ilisp-binary-extension nil
"*The extension to use for LISP binaries.
If there is an ilisp-binary-command, this string will be determined at
initialization time.")
(deflocal ilisp-init-binary-command nil
"Command to return the extension for initialization binary files.")
(deflocal ilisp-init-binary-extension nil
"The extension for initialization binary files.
If there is an ilisp-init-binary-command, this string will be
determined at initialization time.")
(deflocal ilisp-load-command nil
"Format string for loading a file in LISP given FILE.")
(deflocal ilisp-compile-file-command nil
"Format string for compiling a file in LISP given FILE and EXTENSION.")
(deflocal ilisp-print-info-message-command nil
"Format string for printing argument list information etc. given a STRING.")
;;;%%%%Source
(deflocal ilisp-source-types nil
"Alist of strings for source types.
The strings can be either symbols or list expressions since the input
accepts symbols or open ended lists as type specifiers.")
(deflocal ilisp-find-source-command nil
"Format string for finding the source file that defined SYMBOL in PACKAGE.
It should return NIL if no source is found.")
(deflocal ilisp-locator nil
"Function that finds the next SYMBOL TYPE definition in the current buffer.
The complete argument list is \(SYMBOL TYPE FIRST-P BACK-P): FIRST-P
is T the first time it is called in a buffer. BACK-P is T to move
backwards.")
(deflocal ilisp-calls-locator nil
"Function that finds calls to SYMBOL in the current buffer.
The complete argument list is \(SYMBOL TYPE FIRST-P BACK-P )FIRST-P is
T the first time it is called in a buffer. BACK-P is T to move
backwards.")
(deflocal ilisp-source-directory-fixup-alist
nil
"*Alist of matchers to be used in conjuction with 'edit-definition-alist'.
The elements of the alist have the form (REGEXP . FIXUP-FUNCTION)
which will be applied to lists of source filenames to be used with
'edit-definitions-list'. FIXUP-FUNCTION takes no arguments and should
use replace-match to fix the filenames.")
;;;%%%Misc
(deflocal ilisp-use-map nil "Keymap to use in ILISP mode.")
(defvar ilisp-bugs-to "ilisp@cons.org" "Who to send bug reports to.")
(defvar ilisp-modes '(ilisp-mode) "List of all inferior ilisp modes.")
(defvar lisp-source-modes '(lisp-mode scheme-mode)
"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 find-file-lisp, load-file-lisp and
compile-file-lisp. Used by these commands to determine defaults.")
(deflocal ilisp-no-newline nil
"Set to T to stop ilisp from inserting a newline after a command.")
(deflocal ilisp-error-filter nil "Function to filter error output.")
(deflocal ilisp-error-regexp nil "Regular expression to match error.")
(deflocal ilisp-symbol-delimiters nil
"Delimiters found around symbols.")
;;;%%Program
(defvar ilisp-completion-map nil "Keymap for reading ilisp readers.")
(defvar ilisp-epoch-running (and (boundp 'epoch::version) epoch::version)
"Non-nil if epoch is running.")
(defvar ilisp-*version*
"5.12.0" ;; ILISP-VERSION marker
"ILISP version.")
(defvar ilisp-*directory* nil "The directory that ilisp is found in.")
(defvar ilisp-mode-map nil "Key map for ILISP.")
(defvar ilisp-raw-map nil
"Keyboard map for sending characters directly to the inferior LISP.")
(defvar ilisp-raw-message "Raw keyboard mode until C-g"
"Message for how to stop raw mode.")
(defvar ilisp-buffer nil "Name of selected ilisp buffer.")
(defvar ilisp-status nil "Status string for selected ilisp buffer.")
(defvar ilisp-buffers nil "List of ILISP buffers.")
(defvar ilisp-dialects nil "List of ILISP dialects.")
(deflocal ilisp-load-inits nil
"Alist of dialect files to load when initializing an inferior LISP.
By default the file will be loaded from the ilisp-directory.")
;;; This is useful to have a clause in ilisp code like:
;;; (if (memq 'allegro (ilisp-value 'ilisp-dialect))
;;; allegro-code
;;; normal-code)
(deflocal ilisp-dialect nil
"List of the dialects that defined the current inferior LISP.")
(defvar ilisp-initialized nil
"List of buffer names that have been initialized.")
(deflocal ilisp-initializing nil
"Set to T while waiting for inferior LISP to get initialized.")
(deflocal ilisp-load-files nil "List of files being loaded.")
(defvar lisp-changes nil
"List of markers for changed forms.")
(deflocal ilisp-pending-changes nil
"List of changes that are pending, but have not been confirmed yet.")
;;;%%%Completion
;;; Dynamically bound variables for controlling reading
(defvar ilisp-complete nil "T if in minibuffer completion mode.")
(defvar ilisp-no-complete nil "T if incomplete symbols are allowed.")
(defvar ilisp-table nil "Completion table for ilisp readers.")
(defvar ilisp-paren nil "T if paren is allowed in ilisp readers.")
(defvar ilisp-completion-package nil
"Package of buffer requesting completion.")
(defvar ilisp-completion-function-p nil
"T if only symbols with function values are allowed.")
;;; State variables for ilisp reading
(defvar ilisp-mini-prefix nil "Package and qualification from minibuffer.")
(defvar ilisp-original nil "Original string for ilisp completion.")
(defvar ilisp-original-function-p nil "Function-p for ilisp completion.")
(defvar ilisp-original-table nil "Completion table for ilisp-original.")
;;;%Buffer
;;;%Packages
(defvar buffer-package 'not-yet-computed "Cached package name.")
(defvar buffer-mode-name nil "Original mode name.")
(defvar lisp-buffer-package nil "T if in lisp-buffer-package.")
(defvar lisp-dont-cache-package nil
"If Non-Nil then refind the most recent in-package each time.")
;;;%Globals from ilisp-ext.el
;;;
(defvar ilisp-ext-load-hook nil "Hook to run when extensions are loaded.")
(defvar left-delimiter "\(" "*Left delimiter for find-unbalanced.")
(defvar right-delimiter "\)" "*Right delimiter for find-unbalanced.")
;;; Copies of ilisp var definitions
(defvar ilisp-complete nil "T when ilisp is in completion mode.")
(defvar ilisp-modes '(ilisp-mode) "List of all inferior ilisp modes.")
(defvar lisp-fill-marker (make-marker)
"Keeps track of point so that it does not move during a reindent-lisp.")
(defvar ilisp-comment-marker (make-marker)
"Marker for end of a comment region.")
(defvar lisp-buffer-file nil
"Cons of buffer-file-name and the expanded name.")
(make-variable-buffer-local 'lisp-buffer-file)
(defvar ilisp-last-message nil)
(defvar ilisp-last-prompt nil)
(defvar lisp-prev-l/c-dir/file nil
"Saves the (directory . file) pair used in the last file handling command.
A \"file handling command\" may be 'find-file-lisp', 'load-file-lisp'
or 'compile-file-lisp' command. Used for determining the default in
the next one.")
(defvar ilisp-last-buffer nil
"The last used LISP buffer.")
;;; ilisp-bindings-*bind-right-bracket-p*
(defcustom ilisp-bindings-*bind-right-bracket-p*
nil
"If non-nil the key ']' will be bound to #'close-all-lisp."
:group 'ILisp-interaction)
;;; ilisp-bindings-*bind-space-p*
(defcustom ilisp-bindings-*bind-space-p*
t
"If non-nil the 'SPACE' key will be bound to #'ilisp-arglist-message-lisp-space."
:group 'ILisp-interaction)
;;; ilisp-arglist-message-space-lisp --
;;;
;; 19990806 Martin Atzmueller
(defvar ilisp-*arglist-message-lisp-space-p* t
"If T display the arglist or value of a function/symbol after a #\\Space.
Set to 'all if you want the arglist or value of a function/symbol
to be printed.")
(defvar ilisp-*arglist-message-switch-back-p* nil
"If T, the edited buffer is selected after the arglist has been displayed.")
(defvar ilisp-*use-frame-for-arglist-output-p* t
"If T, ILISP uses a distinct frame for its arglist output.
Otherwise ILISP uses the default 'lisp-display-ouput'.
The output going to the frame is usually multiline. If no window
system is running then the value of this variable is ininfluent.
Default is T.
Note: this can be set once before startup. Changing this after startup
will not have any effect! This effectively means, that this variable
must be set here. It relies on ilisp-*use-frame-for-output*, too.
Only if both are t the output will be sent to a frame.")
(defvar ilisp-*enable-ilisp-special-frame-p* nil
"If T, the ILISP inferior lisp buffer-name will be in
special-display-buffer-names; therefore the lisp-interaction buffer
will be in a 'special' seperate frame.")
(defvar ilisp-*enable-imenu-p* t
"Enables/disables loading/use of IMENU.
It provides for a index of all functions in a file. Default is T.")
;;; ilisp-enable-easy-menu-p --
;;;
;; 19990806 Martin Atzmueller
(defvar ilisp-*enable-cl-easy-menu-p* t
"Set to t if you want the new (and better!) menu for ILISP CL.")
(defvar ilisp-*enable-scheme-easy-menu-p* nil
"Set to t if you want the new (and better!) menu for ILISP Scheme.")
;;; ilisp-*enable-ild-support-p*
;;; 19990818 Marco Antoniotti
(defvar ilisp-*enable-ild-support-p* t
"Enables/disables loading of ILD package by J. M. Siskind.
Default is T.")
;;; ilisp-*use-hyperspec-interface-p*
;;; 19990820 Marco Antoniotti
(defvar ilisp-*use-hyperspec-interface-p* t
"Enables/disables loading of the 'hyperspec' module provided with ILISP.
Default is T.")
(defvar ilisp-*use-fi-clman-interface-p* nil
"Enables/disables use of Franz Inc's 'fi:clman' module.
Default is NIL.")
(defvar ilisp-*use-cltl2-interface-p* t
"Enables/disables loading of the CLtL2 lookup module provided with ILISP.
Default is T.")
;;; end of file -- ilisp-def.lisp --
|