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

Lines Matching +defs:mode +defs:function

31 ;; (comint mode).  The idea is that you can build specific process-in-a-buffer
32 ;; modes on top of comint mode -- e.g., Lisp, shell, scheme, T, soar, ....
37 ;; Several packages are already defined using comint mode:
38 ;; - shell.el defines a shell-in-a-buffer mode.
39 ;; - cmulisp.el defines a simple lisp-in-a-buffer mode.
41 ;; - The file cmuscheme.el defines a scheme-in-a-buffer mode.
49 ;; For documentation on the functionality provided by Comint mode, and
54 ;; For hints on converting existing process modes (e.g., tex-mode,
55 ;; background, dbx, gdb, kermit, prolog, telnet) to use comint-mode
56 ;; instead of shell-mode, see the notes at the end of this file.
63 ;; mode)
83 ;; Not bound by default in comint-mode (some are in shell mode)
84 ;; comint-run Run a program under comint-mode
104 ;; comint-mode-hook is the Comint mode hook. Basically for your keybindings.
113 ;; Comint mode buffer local variables:
128 ;; comint-get-old-input function Hooks for specific
130 ;; comint-output-filter-functions hook function modes.
132 ;; comint-input-filter function ...
133 ;; comint-input-sender function ...
141 ;; Comint mode non-buffer local variables:
174 This is a good thing to set in mode hooks.")
189 \(add-hook 'comint-mode-hook
191 (define-key comint-mode-map \"\\C-w\" 'comint-kill-region)
192 (define-key comint-mode-map [C-S-backspace]
195 If you sometimes use comint-mode on text-only terminals or with `emacs -nw',
210 This is a good thing to set in mode hooks.")
251 This variable is buffer-local, and is a good thing to set in mode hooks."
280 See the variable `comint-scroll-show-maximum-output' and the function
303 See also the variable `comint-move-point-for-output' and the function
312 the function `comint-truncate-buffer' is on `comint-output-filter-functions'."
351 (defvar comint-get-old-input (function comint-get-old-input-default)
352 "Function that returns old text in Comint mode.
353 This function is called when return is typed while the point is in old
366 This is a good thing to set in mode hooks.")
369 (function (lambda (str) (not (string-match "\\`\\s *\\'" str))))
381 One possible function is `comint-postoutput-scroll-to-bottom'.
393 "Non-nil directs the `comint-input-sender' function not to send a newline.")
395 (defvar comint-input-sender (function comint-simple-send)
397 Usually this is just `comint-simple-send', but if your mode needs to
398 massage the input string, put a different function here.
426 (defcustom comint-mode-hook nil
427 "Hook run upon entry to `comint-mode'.
435 must be done each time a process is executed in a Comint mode buffer (e.g.,
436 `(process-kill-without-query)'). In contrast, the `comint-mode-hook' is only
441 (defvar comint-mode-map
579 (put 'comint-mode 'mode-class 'special)
581 (define-derived-mode comint-mode fundamental-mode "Comint"
582 "Major mode for interacting with an inferior interpreter.
589 This mode is customized to create major modes such as Inferior Lisp
590 mode, Shell mode, etc. This can be done by setting the hooks
614 \\{comint-mode-map}
616 Entry to this mode runs the hooks on `comint-mode-hook'."
617 (setq mode-line-process '(":%s"))
659 (add-hook 'change-major-mode-hook 'font-lock-defontify nil t)
685 ;; comint mode. Otherwise, leave buffer and existing process alone.
688 (unless (derived-mode-p 'comint-mode)
689 (comint-mode))) ; Install local vars, mode, keymap, ...
721 Blasts any old process running in the buffer. Doesn't set the buffer mode.
754 ;; This auxiliary function cranks up the process for comint-exec in
860 ;; comint-replace-by-expanded-history-before-point Workhorse function.
866 If `comint-input-ring-file-name' is nil this function does nothing.
871 This function is useful for major mode commands and mode hooks.
925 If `comint-input-ring-file-name' is nil this function does nothing.
1182 This function depends on the buffer's idea of the input history, which may not
1440 (function (lambda (a) a)) (nthcdr n (nreverse (nthcdr m args))) " "))))
1468 `comint-input-autoexpand'. The list of function names contained in the value
1626 Each function gets one argument, a string containing the text received
1633 the last function is the text that is actually inserted in the
1830 This function should be a pre-command hook."
1842 (function (lambda (window)
1857 This function should be in the list `comint-output-filter-functions'."
1865 (function (lambda (window)
1891 This function could be on `comint-output-filter-functions' or bound to a key."
1902 This function could be on `comint-output-filter-functions' or bound to a key."
1958 "Default function for sending to PROC input STRING.
1979 ;; `line-beginning-position' inside a field, this function will
2032 This function uses `send-invisible' to read and send a password to the buffer's
2036 This function could be in the list `comint-output-filter-functions'."
2046 "Like `process-send-string', but also does extra bookkeeping for Comint mode."
2056 "Like `process-send-region', but also does extra bookkeeping for Comint mode."
2087 (define-obsolete-function-alias 'comint-kill-output
2117 ;; This function exists for the benefit of the menu; from the keyboard,
2376 That is what this function does.
2378 This function does nothing if point is not at the beginning of a
2482 files: if the major mode of the buffer is in SOURCE-MODES, it's source.
2483 Typically, (lisp-mode) or (scheme-mode).
2490 If the command is given in a file buffer whose major mode is in
2500 SOURCE-MODES is typically going to be something like (tea-mode)
2501 for T programs, (lisp-mode) for Lisp programs, (soar-mode lisp-mode)
2504 The function returns a pair: (default-directory . default-file)."
2505 (cond ((and buffer-file-name (memq major-mode source-modes))
2516 process-in-a-buffer modes), this function can be called on the filename.
2556 '(lisp-mode) t))"
2588 ;; This function is for commands that want to send a query to the process
2590 ;; arglist for a Common Lisp function might send a "(arglist 'foo)" query
2637 ;; These are not installed in the comint-mode keymap. But they are
2638 ;; available for people who want them. Shell-mode installs them:
2639 ;; (define-key shell-mode-map "\t" 'comint-dynamic-complete)
2640 ;; (define-key shell-mode-map "\M-?"
2694 This is a good thing to set in mode hooks.")
2699 This is a good thing to set in mode hooks.")
2790 completion until a function returns non-nil, at which point completion is
2800 This function is similar to `comint-replace-by-expanded-filename', except that
2897 This function inserts completion characters at point by completing STUB from
3143 Each function gets one argument, a string containing the text received
3150 last function is the text that is actually inserted in the redirection buffer.
3162 When the redirection filter function is given output that matches this regexp,
3177 (defvar comint-redirect-original-mode-line-process nil
3178 "Original mode line for redirected process.")
3189 (defvar comint-redirect-original-filter-function nil
3197 This is useful, for instance, for insertion into Help mode buffers.
3209 This function sets local variables that are used by `comint-redirect-filter'
3218 This function is called by `comint-redirect-send-command-to-process',
3222 (make-local-variable 'comint-redirect-original-mode-line-process)
3223 (setq comint-redirect-original-mode-line-process mode-line-process)
3237 (setq mode-line-process
3238 (if mode-line-process
3239 (list (concat (elt mode-line-process 0) " Redirection"))
3247 comint-redirect-original-filter-function)
3248 ;; Restore the mode line
3249 (setq mode-line-process comint-redirect-original-mode-line-process)
3258 "Filter function which redirects output from PROCESS to a buffer or buffers.
3264 This function runs as a process filter, and does not need to be invoked by the
3269 ;; If we have to echo output, give it to the original filter function
3271 comint-redirect-original-filter-function
3272 (funcall comint-redirect-original-filter-function
3277 "Comint filter function which redirects Comint output to a buffer or buffers.
3283 This function does not need to be invoked by the end user."
3394 (setq comint-redirect-original-filter-function
3464 ;; Converting process modes to use comint mode
3468 ;; still use the old shell mode. Here's a guide to conversion.
3480 ;; shell-mode-map comint-mode-map
3494 ;; SHELL-DIRECTORY-TRACKER, the shell mode's comint-input-filter-functions.
3495 ;; Comint mode does not provide functionality equivalent to
3505 ;; If you are implementing some process-in-a-buffer mode, called foo-mode, do
3506 ;; *not* create the comint-mode local variables in your foo-mode function.
3507 ;; This is not modular. Instead, call comint-mode, and let *it* create the
3509 ;; foo-mode-specific local variables in foo-mode. Set the buffer's keymap to
3510 ;; be foo-mode-map, and its mode to be foo-mode. Set the comint-mode hooks
3513 ;; foo-mode-hook, and you're done. Don't run the comint-mode hook yourself;
3514 ;; comint-mode will take care of it. The following example, from shell.el,
3517 ;; (defvar shell-mode-map '())
3518 ;; (cond ((not shell-mode-map)
3519 ;; (setq shell-mode-map (copy-keymap comint-mode-map))
3520 ;; (define-key shell-mode-map "\C-c\C-f" 'shell-forward-command)
3521 ;; (define-key shell-mode-map "\C-c\C-b" 'shell-backward-command)
3522 ;; (define-key shell-mode-map "\t" 'comint-dynamic-complete)
3523 ;; (define-key shell-mode-map "\M-?"
3526 ;; (defun shell-mode ()
3528 ;; (comint-mode)
3530 ;; (setq major-mode 'shell-mode)
3531 ;; (setq mode-name "Shell")
3532 ;; (use-local-map shell-mode-map)
3536 ;; (run-mode-hooks 'shell-mode-hook))
3539 ;; Completion for comint-mode users
3541 ;; For modes that use comint-mode, comint-dynamic-complete-functions is the