# HG changeset patch # User J.D. Smith # Date 1170222680 0 # Node ID 44a852ca2266a6a8c795c851fb7b4c450d0337ad # Parent 02062a694bef7a9370c5bcd3b33b6727db8794ab - Prevent non-keyword fontification by default. diff -r 02062a694bef -r 44a852ca2266 lisp/comint.el --- a/lisp/comint.el Wed Jan 31 00:45:24 2007 +0000 +++ b/lisp/comint.el Wed Jan 31 05:51:20 2007 +0000 @@ -653,7 +653,7 @@ (make-local-variable 'comint-accum-marker) (setq comint-accum-marker (make-marker)) (make-local-variable 'font-lock-defaults) - (setq font-lock-defaults '(nil)) + (setq font-lock-defaults '(nil t)) (add-hook 'change-major-mode-hook 'font-lock-defontify nil t) ;; This behavior is not useful in comint buffers, and is annoying (set (make-local-variable 'next-line-add-newlines) nil)) @@ -1920,6 +1920,17 @@ (goto-char (process-mark process)) (insert input)))) +(defun comint-copy-old-input () + "Insert after prompt old input at point as new input to be edited. +Calls `comint-get-old-input' to get old input." + (interactive) + (let ((input (funcall comint-get-old-input)) + (process (get-buffer-process (current-buffer)))) + (if (not process) + (error "Current buffer has no process") + (goto-char (process-mark process)) + (insert input)))) + (defun comint-skip-prompt () "Skip past the text matching regexp `comint-prompt-regexp'. If this takes us past the end of the current line, don't skip at all."