comparison lisp/comint/comint.el @ 2:ac2d302a0011 r19-15b2

Import from CVS: tag r19-15b2
author cvs
date Mon, 13 Aug 2007 08:46:35 +0200
parents 376386a54a3c
children 0293115a14e9
comparison
equal deleted inserted replaced
1:c0c6a60d29db 2:ac2d302a0011
579 (interactive "@e") 579 (interactive "@e")
580 (let ((history (comint-make-history-menu))) 580 (let ((history (comint-make-history-menu)))
581 (popup-menu (if history 581 (popup-menu (if history
582 (append comint-popup-menu 582 (append comint-popup-menu
583 (list "---" (cons "Command History" history))) 583 (list "---" (cons "Command History" history)))
584 comint-menu)))) 584 comint-popup-menu))))
585 585
586 (defvar comint-history-menu-max 40 586 (defvar comint-history-menu-max 40
587 "*Maximum number of entries to display on the Comint command-history menu.") 587 "*Maximum number of entries to display on the Comint command-history menu.")
588 588
589 (defun comint-history-menu-filter (menu) 589 (defun comint-history-menu-filter (menu)
633 running process in that buffer, it is not restarted. Optional third arg 633 running process in that buffer, it is not restarted. Optional third arg
634 STARTFILE is the name of a file to send the contents of to the process. 634 STARTFILE is the name of a file to send the contents of to the process.
635 635
636 If PROGRAM is a string, any more args are arguments to PROGRAM." 636 If PROGRAM is a string, any more args are arguments to PROGRAM."
637 (or (fboundp 'start-process) 637 (or (fboundp 'start-process)
638 (error "Multi-processing is not supported for this system")) 638 (error "Multiple processes are not supported for this system"))
639 (let ((buffer (get-buffer-create (concat "*" name "*")))) 639 (let ((buffer (get-buffer-create (concat "*" name "*"))))
640 ;; If no process, or nuked process, crank up a new one and put buffer in 640 ;; If no process, or nuked process, crank up a new one and put buffer in
641 ;; comint mode. Otherwise, leave buffer and existing process alone. 641 ;; comint mode. Otherwise, leave buffer and existing process alone.
642 (cond ((not (comint-check-proc buffer)) 642 (cond ((not (comint-check-proc buffer))
643 (save-excursion 643 (save-excursion
1826 ;;; the string is an existing filename, *and* the filename is not a directory, 1826 ;;; the string is an existing filename, *and* the filename is not a directory,
1827 ;;; then the string is taken as default. This allows you to just position 1827 ;;; then the string is taken as default. This allows you to just position
1828 ;;; your cursor over a string that's a filename and have it taken as default. 1828 ;;; your cursor over a string that's a filename and have it taken as default.
1829 ;;; 1829 ;;;
1830 ;;; If the command is given in a file buffer whose major mode is in 1830 ;;; If the command is given in a file buffer whose major mode is in
1831 ;;; SOURCE-MODES, then the the filename is the default file, and the 1831 ;;; SOURCE-MODES, then the filename is the default file, and the
1832 ;;; file's directory is the default directory. 1832 ;;; file's directory is the default directory.
1833 ;;; 1833 ;;;
1834 ;;; If the buffer isn't a source file buffer (e.g., it's the process buffer), 1834 ;;; If the buffer isn't a source file buffer (e.g., it's the process buffer),
1835 ;;; then the default directory & file are what was used in the last source-file 1835 ;;; then the default directory & file are what was used in the last source-file
1836 ;;; processing command (i.e., PREVIOUS-DIR/FILE). If this is the first time 1836 ;;; processing command (i.e., PREVIOUS-DIR/FILE). If this is the first time