comparison lisp/comint.el @ 1356:dcf780f7ae1b

Doc fix.
author Christopher Zaborsky <rogue@erratum.com>
date Tue, 06 Oct 1992 21:01:11 +0000
parents 853d0d4c61fb
children 7fc9bbcae71b
comparison
equal deleted inserted replaced
1355:1777d125c0a7 1356:dcf780f7ae1b
557 fetches previous (older) inputs." 557 fetches previous (older) inputs."
558 (interactive "p") 558 (interactive "p")
559 (comint-previous-similar-input (- arg))) 559 (comint-previous-similar-input (- arg)))
560 560
561 (defun comint-send-input () 561 (defun comint-send-input ()
562 "Send input to process. After the process output mark, sends all text 562 "Send input to process.
563 from the process mark to point as input to the process. Before the process 563 After the process output mark, sends all text from the process mark to
564 output mark, calls value of variable comint-get-old-input to retrieve old 564 point as input to the process. Before the process output mark, calls value
565 input, copies it to the process mark, and sends it. A terminal newline is 565 of variable comint-get-old-input to retrieve old input, copies it to the
566 also inserted into the buffer and sent to the process. In either case, value 566 process mark, and sends it. A terminal newline is also inserted into the
567 of variable comint-input-sentinel is called on the input before sending it. 567 buffer and sent to the process. In either case, value of variable
568 The input is entered into the input history ring, if the value of variable 568 comint-input-sentinel is called on the input before sending it. The input
569 is entered into the input history ring, if the value of variable
569 comint-input-filter returns non-nil when called on the input. 570 comint-input-filter returns non-nil when called on the input.
570 571
571 If variable comint-eol-on-send is non-nil, then point is moved to the end of 572 If variable comint-eol-on-send is non-nil, then point is moved to the end of
572 line before sending the input. 573 line before sending the input.
573 574
610 (set-marker comint-last-input-start pmark) 611 (set-marker comint-last-input-start pmark)
611 (set-marker comint-last-input-end (point)) 612 (set-marker comint-last-input-end (point))
612 (set-marker (process-mark proc) (point)))))) 613 (set-marker (process-mark proc) (point))))))
613 614
614 (defun comint-get-old-input-default () 615 (defun comint-get-old-input-default ()
615 "Default for comint-get-old-input: take the current line, and discard 616 "Default for comint-get-old-input.
616 any initial text matching comint-prompt-regexp." 617 Take the current line, and discard any initial text matching
618 comint-prompt-regexp."
617 (save-excursion 619 (save-excursion
618 (beginning-of-line) 620 (beginning-of-line)
619 (comint-skip-prompt) 621 (comint-skip-prompt)
620 (let ((beg (point))) 622 (let ((beg (point)))
621 (end-of-line) 623 (end-of-line)
664 ;;; These two functions are for entering text you don't want echoed or 666 ;;; These two functions are for entering text you don't want echoed or
665 ;;; saved -- typically passwords to ftp, telnet, or somesuch. 667 ;;; saved -- typically passwords to ftp, telnet, or somesuch.
666 ;;; Just enter m-x send-invisible and type in your line. 668 ;;; Just enter m-x send-invisible and type in your line.
667 669
668 (defun comint-read-noecho (prompt &optional stars) 670 (defun comint-read-noecho (prompt &optional stars)
669 "Prompt the user with argument PROMPT. Read a single line of text 671 "Prompt the user with argument PROMPT.
670 without echoing, and return it. Note that the keystrokes comprising 672 Read a single line of text without echoing, and return it. Note that
671 the text can still be recovered (temporarily) with \\[view-lossage]. This 673 the keystrokes comprising the text can still be recovered (temporarily)
672 may be a security bug for some applications. Optional argument STARS 674 with \\[view-lossage]. This may be a security bug for some applications.
673 causes input to be echoed with '*' characters on the prompt line." 675 Optional argument STARS causes input to be echoed with '*' characters
676 on the prompt line."
674 (let ((echo-keystrokes 0) 677 (let ((echo-keystrokes 0)
675 (cursor-in-echo-area t) 678 (cursor-in-echo-area t)
676 (answ "") 679 (answ "")
677 tem) 680 tem)
678 (if (not (stringp prompt)) (setq prompt "")) 681 (if (not (stringp prompt)) (setq prompt ""))
685 (message "") 688 (message "")
686 answ)) 689 answ))
687 690
688 691
689 (defun send-invisible (str) 692 (defun send-invisible (str)
690 "Read a string without echoing, and send it to the process running 693 "Read a string without echoing.
691 in the current buffer. A new-line is additionally sent. String is not 694 Then send it to the process running in the current buffer. A new-line
692 saved on comint input history list. 695 is additionally sent. String is not saved on comint input history list.
693 Security bug: your string can still be temporarily recovered with 696 Security bug: your string can still be temporarily recovered with
694 \\[view-lossage]." 697 \\[view-lossage]."
695 ; (interactive (list (comint-read-noecho "Enter non-echoed text"))) 698 ; (interactive (list (comint-read-noecho "Enter non-echoed text")))
696 (interactive "P") ; Defeat snooping via C-x esc 699 (interactive "P") ; Defeat snooping via C-x esc
697 (let ((proc (get-buffer-process (current-buffer)))) 700 (let ((proc (get-buffer-process (current-buffer))))
1021 (substitute-in-file-name 1024 (substitute-in-file-name
1022 (buffer-substring (match-beginning 0) (match-end 0))))) 1025 (buffer-substring (match-beginning 0) (match-end 0)))))
1023 1026
1024 1027
1025 (defun comint-replace-by-expanded-filename () 1028 (defun comint-replace-by-expanded-filename ()
1026 "Replace the filename at point with an expanded, canonicalised, and 1029 "Expand the filename at point.
1027 completed replacement. 1030 Replace the filename with an expanded, canonicalised, and completed
1031 replacement.
1028 \"Expanded\" means environment variables (e.g., $HOME) and ~'s are 1032 \"Expanded\" means environment variables (e.g., $HOME) and ~'s are
1029 replaced with the corresponding directories. \"Canonicalised\" means .. 1033 replaced with the corresponding directories. \"Canonicalised\" means ..
1030 and \. are removed, and the filename is made absolute instead of relative. 1034 and \. are removed, and the filename is made absolute instead of relative.
1031 See functions expand-file-name and substitute-in-file-name. See also 1035 See functions expand-file-name and substitute-in-file-name. See also
1032 comint-dynamic-complete." 1036 comint-dynamic-complete."