Mercurial > emacs
comparison lisp/ielm.el @ 46942:15fab402303e
[original idea from Luc Teirlinck <teirllm@mail.auburn.edu>]
(inferior-emacs-lisp-mode): Give `comint-inhibit-carriage-motion' a
local value of t.
author | Miles Bader <miles@gnu.org> |
---|---|
date | Mon, 19 Aug 2002 05:03:38 +0000 |
parents | e7a3c79415d6 |
children | 9b53ca22ace7 |
comparison
equal
deleted
inserted
replaced
46941:1241ed1e9eee | 46942:15fab402303e |
---|---|
1 ;;; ielm.el --- interaction mode for Emacs Lisp | 1 ;;; ielm.el --- interaction mode for Emacs Lisp |
2 | 2 |
3 ;; Copyright (C) 1994 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1994, 2002 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Author: David Smith <maa036@lancaster.ac.uk> | 5 ;; Author: David Smith <maa036@lancaster.ac.uk> |
6 ;; Maintainer: FSF | 6 ;; Maintainer: FSF |
7 ;; Created: 25 Feb 1994 | 7 ;; Created: 25 Feb 1994 |
8 ;; Keywords: lisp | 8 ;; Keywords: lisp |
450 (make-local-variable 'font-lock-defaults) | 450 (make-local-variable 'font-lock-defaults) |
451 (setq font-lock-defaults | 451 (setq font-lock-defaults |
452 '(ielm-font-lock-keywords nil nil ((?: . "w") (?- . "w") (?* . "w")))) | 452 '(ielm-font-lock-keywords nil nil ((?: . "w") (?- . "w") (?* . "w")))) |
453 | 453 |
454 ;; A dummy process to keep comint happy. It will never get any input | 454 ;; A dummy process to keep comint happy. It will never get any input |
455 (if (comint-check-proc (current-buffer)) nil | 455 (unless (comint-check-proc (current-buffer)) |
456 ;; Was cat, but on non-Unix platforms that might not exist, so | 456 ;; Was cat, but on non-Unix platforms that might not exist, so |
457 ;; use hexl instead, which is part of the Emacs distribution. | 457 ;; use hexl instead, which is part of the Emacs distribution. |
458 (start-process "ielm" (current-buffer) "hexl") | 458 (start-process "ielm" (current-buffer) "hexl") |
459 (process-kill-without-query (ielm-process)) | 459 (process-kill-without-query (ielm-process)) |
460 (goto-char (point-max)) | 460 (goto-char (point-max)) |
461 | |
462 ;; Lisp output can include raw characters that confuse comint's | |
463 ;; carriage control code. | |
464 (set (make-local-variable 'comint-inhibit-carriage-motion) t) | |
465 | |
461 ;; Add a silly header | 466 ;; Add a silly header |
462 (insert ielm-header) | 467 (insert ielm-header) |
463 (ielm-set-pm (point-max)) | 468 (ielm-set-pm (point-max)) |
464 (comint-output-filter (ielm-process) ielm-prompt) | 469 (comint-output-filter (ielm-process) ielm-prompt) |
465 (set-marker comint-last-input-start (ielm-pm)) | 470 (set-marker comint-last-input-start (ielm-pm)) |
466 (set-process-filter (get-buffer-process (current-buffer)) 'comint-output-filter)) | 471 (set-process-filter (get-buffer-process (current-buffer)) 'comint-output-filter)) |
472 | |
467 (run-hooks 'ielm-mode-hook)) | 473 (run-hooks 'ielm-mode-hook)) |
468 | 474 |
469 (defun ielm-get-old-input nil | 475 (defun ielm-get-old-input nil |
470 ;; Return the previous input surrounding point | 476 ;; Return the previous input surrounding point |
471 (save-excursion | 477 (save-excursion |