• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/

Lines Matching +defs:mode +defs:line +defs:process

1 ;;; ielm.el --- interaction mode for Emacs Lisp
44 "Interaction mode for Emacs Lisp."
62 `comint-kill-whole-line' or `comint-kill-region' with no
67 \(add-hook 'ielm-mode-hook
71 'comint-kill-whole-line)))
74 `comint-mode-hook' and `comint-mode-map' instead of
75 `ielm-mode-hook' and `ielm-map'. That will affect all comint
78 another binding for `comint-kill-whole-line'."
87 Interrupting the IELM process with \\<ielm-map>\\[comint-interrupt-subjob],
92 does not update the prompt of an *ielm* buffer with a running process.
94 \\[inferior-emacs-lisp-mode] in that IELM buffer to update the value,
95 for new prompts. This works even if the buffer has a running process."
102 prevent a running IELM process from being messed up when the user
114 If non-nil, after entering the first line of an incomplete sexp, a newline
115 will be inserted after the prompt, moving the input to the next line.
121 (defcustom ielm-mode-hook nil
122 "*Hooks to be run when IELM (`inferior-emacs-lisp-mode') is started."
123 :options '(turn-on-eldoc-mode)
142 buffer, distinct from the process buffer, then `*' gives the value in
143 the working buffer, `*1' the value in the process buffer.
149 buffer, distinct from the process buffer, then `**' gives the value in
150 the working buffer, `*2' the value in the process buffer.
156 buffer, distinct from the process buffer, then `***' gives the value in
157 the working buffer, `*3' the value in the process buffer.
167 "*** Welcome to IELM *** Type (describe-mode) for help.\n"
176 (set-keymap-parent ielm-map comint-mode-map))
178 (setq ielm-map (cons 'keymap comint-mode-map)))
183 (define-key ielm-map "\e\t" 'lisp-complete-symbol) ; lisp-interaction-mode
184 ;; These bindings are from `lisp-mode-shared-map' -- can you inherit
202 "Possibly indent the current line as Lisp code."
207 (ielm-indent-line)
232 (defun ielm-indent-line nil
233 "Indent the current line as Lisp code if it is not a prompt line."
235 (lisp-indent-line)))
272 (end-of-line)
279 (beginning-of-line)
312 ;; `inferior Lisp process'. All comint-send-input does is works out
316 ;; been to actually send the output to the `cat' process, and write
319 ;; more process coordination than I was happy to deal with.
421 (comint-output-filter (ielm-process) ielm-output)))
425 (defun ielm-process nil
426 ;; Return the current buffer's process.
427 (get-buffer-process (current-buffer)))
430 ;; Return the process mark of the current buffer.
431 (process-mark (get-buffer-process (current-buffer))))
434 ;; Set the process mark in the current buffer to POS.
435 (set-marker (process-mark (get-buffer-process (current-buffer))) pos))
437 ;;; Major mode
439 (put 'inferior-emacs-lisp-mode 'mode-class 'special)
441 (defun inferior-emacs-lisp-mode nil
442 "Major mode for interactively evaluating Emacs Lisp expressions.
443 Uses the interface provided by `comint-mode' (which see).
450 Inputs longer than one line are moved to the line following the
454 or indents the line if there is nothing to complete.
460 By default, its name is shown on the mode line; you can always display
467 `*1', `*2' and `*3', yield the process buffer values.
477 * Set `ielm-dynamic-return' to nil for bindings like `lisp-interaction-mode'.
478 * Entry to this mode runs `comint-mode-hook' and `ielm-mode-hook'
484 (delay-mode-hooks
485 (comint-mode))
491 (setq comint-process-echoes nil)
500 (setq major-mode 'inferior-emacs-lisp-mode)
501 (setq mode-name "IELM")
502 (setq mode-line-process '(":%s on " (:eval (buffer-name ielm-working-buffer))))
504 (set-syntax-table emacs-lisp-mode-syntax-table)
506 (make-local-variable 'indent-line-function)
509 (setq indent-line-function 'ielm-indent-line)
527 ;; A dummy process to keep comint happy. It will never get any input
532 (start-process "ielm" (current-buffer) "hexl")
533 (file-error (start-process "ielm" (current-buffer) "cat")))
534 (set-process-query-on-exit-flag (ielm-process) nil)
548 '(rear-nonsticky t field output inhibit-line-move-field-capture t))))
549 (comint-output-filter (ielm-process) ielm-prompt-internal)
551 (set-process-filter (get-buffer-process (current-buffer)) 'comint-output-filter))
553 (run-mode-hooks 'ielm-mode-hook))
558 (beginning-of-line)
577 (inferior-emacs-lisp-mode)))