diff options
| author | Juanma Barranquero | 2005-06-10 00:43:13 +0000 |
|---|---|---|
| committer | Juanma Barranquero | 2005-06-10 00:43:13 +0000 |
| commit | 14629f1501ea4866d4deab191179ec14cf4ae393 (patch) | |
| tree | c9322f00fc19a29f87388da9a74b56755cd5cff9 | |
| parent | 54fc2b6add0885be49b29c8b3ac6e8620d282cce (diff) | |
| download | emacs-14629f1501ea4866d4deab191179ec14cf4ae393.tar.gz emacs-14629f1501ea4866d4deab191179ec14cf4ae393.zip | |
(term-mode, term-check-proc, term-input-sender, term-simple-send,
term-extract-string, term-word, term-match-partial-filename): Fix typos in
docstrings.
(term-send-string): Improve argument/docstring consistency.
| -rw-r--r-- | lisp/term.el | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/lisp/term.el b/lisp/term.el index 47411b5099a..00c1083892e 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -597,7 +597,7 @@ This variable is buffer-local.") | |||
| 597 | "Function to actually send to PROCESS the STRING submitted by user. | 597 | "Function to actually send to PROCESS the STRING submitted by user. |
| 598 | Usually this is just 'term-simple-send, but if your mode needs to | 598 | Usually this is just 'term-simple-send, but if your mode needs to |
| 599 | massage the input string, this is your hook. This is called from | 599 | massage the input string, this is your hook. This is called from |
| 600 | the user command term-send-input. term-simple-send just sends | 600 | the user command term-send-input. `term-simple-send' just sends |
| 601 | the string plus a newline.") | 601 | the string plus a newline.") |
| 602 | 602 | ||
| 603 | (defcustom term-eol-on-send t | 603 | (defcustom term-eol-on-send t |
| @@ -888,7 +888,7 @@ is buffer-local.") | |||
| 888 | (while (< i 128) | 888 | (while (< i 128) |
| 889 | (define-key map (make-string 1 i) 'term-send-raw) | 889 | (define-key map (make-string 1 i) 'term-send-raw) |
| 890 | ;; Avoid O and [. They are used in escape sequences for various keys. | 890 | ;; Avoid O and [. They are used in escape sequences for various keys. |
| 891 | (unless (or (eq i ?O) (eq i 91)) | 891 | (unless (or (eq i ?O) (eq i 91)) |
| 892 | (define-key esc-map (make-string 1 i) 'term-send-raw-meta)) | 892 | (define-key esc-map (make-string 1 i) 'term-send-raw-meta)) |
| 893 | (setq i (1+ i))) | 893 | (setq i (1+ i))) |
| 894 | (dolist (elm (generic-character-list)) | 894 | (dolist (elm (generic-character-list)) |
| @@ -941,11 +941,11 @@ is buffer-local.") | |||
| 941 | (make-display-table))) | 941 | (make-display-table))) |
| 942 | i) | 942 | i) |
| 943 | ;; avoid changing the display table for ^J | 943 | ;; avoid changing the display table for ^J |
| 944 | (setq i 0) | 944 | (setq i 0) |
| 945 | (while (< i 10) | 945 | (while (< i 10) |
| 946 | (aset dt i (vector i)) | 946 | (aset dt i (vector i)) |
| 947 | (setq i (1+ i))) | 947 | (setq i (1+ i))) |
| 948 | (setq i 11) | 948 | (setq i 11) |
| 949 | (while (< i 32) | 949 | (while (< i 32) |
| 950 | (aset dt i (vector i)) | 950 | (aset dt i (vector i)) |
| 951 | (setq i (1+ i))) | 951 | (setq i (1+ i))) |
| @@ -983,7 +983,7 @@ and `term-scroll-to-bottom-on-output'. | |||
| 983 | If you accidentally suspend your process, use \\[term-continue-subjob] | 983 | If you accidentally suspend your process, use \\[term-continue-subjob] |
| 984 | to continue it. | 984 | to continue it. |
| 985 | 985 | ||
| 986 | This mode can be customised to create specific modes for running | 986 | This mode can be customized to create specific modes for running |
| 987 | particular subprocesses. This can be done by setting the hooks | 987 | particular subprocesses. This can be done by setting the hooks |
| 988 | `term-input-filter-functions', `term-input-filter', | 988 | `term-input-filter-functions', `term-input-filter', |
| 989 | `term-input-sender' and `term-get-old-input' to appropriate functions, | 989 | `term-input-sender' and `term-get-old-input' to appropriate functions, |
| @@ -1273,7 +1273,7 @@ you type \\[term-send-input] which sends the current line to the inferior." | |||
| 1273 | (defun term-check-proc (buffer) | 1273 | (defun term-check-proc (buffer) |
| 1274 | "True if there is a process associated w/buffer BUFFER, and | 1274 | "True if there is a process associated w/buffer BUFFER, and |
| 1275 | it is alive (status RUN or STOP). BUFFER can be either a buffer or the | 1275 | it is alive (status RUN or STOP). BUFFER can be either a buffer or the |
| 1276 | name of one" | 1276 | name of one." |
| 1277 | (let ((proc (get-buffer-process buffer))) | 1277 | (let ((proc (get-buffer-process buffer))) |
| 1278 | (and proc (memq (process-status proc) '(run stop))))) | 1278 | (and proc (memq (process-status proc) '(run stop))))) |
| 1279 | 1279 | ||
| @@ -2088,7 +2088,7 @@ If this takes us past the end of the current line, don't skip at all." | |||
| 2088 | (defun term-simple-send (proc string) | 2088 | (defun term-simple-send (proc string) |
| 2089 | "Default function for sending to PROC input STRING. | 2089 | "Default function for sending to PROC input STRING. |
| 2090 | This just sends STRING plus a newline. To override this, | 2090 | This just sends STRING plus a newline. To override this, |
| 2091 | set the hook TERM-INPUT-SENDER." | 2091 | set the hook `term-input-sender'." |
| 2092 | (term-send-string proc string) | 2092 | (term-send-string proc string) |
| 2093 | (term-send-string proc "\n")) | 2093 | (term-send-string proc "\n")) |
| 2094 | 2094 | ||
| @@ -2180,7 +2180,7 @@ Security bug: your string can still be temporarily recovered with | |||
| 2180 | If your process is choking on big inputs, try lowering the value.") | 2180 | If your process is choking on big inputs, try lowering the value.") |
| 2181 | 2181 | ||
| 2182 | (defun term-send-string (proc str) | 2182 | (defun term-send-string (proc str) |
| 2183 | "Send PROCESS the contents of STRING as input. | 2183 | "Send to PROC the contents of STR as input. |
| 2184 | This is equivalent to process-send-string, except that long input strings | 2184 | This is equivalent to process-send-string, except that long input strings |
| 2185 | are broken up into chunks of size term-input-chunk-size. Processes | 2185 | are broken up into chunks of size term-input-chunk-size. Processes |
| 2186 | are given a chance to output between chunks. This can help prevent processes | 2186 | are given a chance to output between chunks. This can help prevent processes |
| @@ -2195,9 +2195,9 @@ from hanging when you send them long inputs on some OS's." | |||
| 2195 | (setq i next-i))))) | 2195 | (setq i next-i))))) |
| 2196 | 2196 | ||
| 2197 | (defun term-send-region (proc start end) | 2197 | (defun term-send-region (proc start end) |
| 2198 | "Sends to PROC the region delimited by START and END. | 2198 | "Send to PROC the region delimited by START and END. |
| 2199 | This is a replacement for process-send-region that tries to keep | 2199 | This is a replacement for process-send-region that tries to keep |
| 2200 | your process from hanging on long inputs. See term-send-string." | 2200 | your process from hanging on long inputs. See `term-send-string'." |
| 2201 | (term-send-string proc (buffer-substring start end))) | 2201 | (term-send-string proc (buffer-substring start end))) |
| 2202 | 2202 | ||
| 2203 | 2203 | ||
| @@ -2427,7 +2427,7 @@ See `term-prompt-regexp'." | |||
| 2427 | ;;; This is pretty stupid about strings. It decides we're in a string | 2427 | ;;; This is pretty stupid about strings. It decides we're in a string |
| 2428 | ;;; if there's a quote on both sides of point on the current line. | 2428 | ;;; if there's a quote on both sides of point on the current line. |
| 2429 | (defun term-extract-string () | 2429 | (defun term-extract-string () |
| 2430 | "Returns string around POINT that starts the current line or nil." | 2430 | "Return string around `point' that starts the current line or nil." |
| 2431 | (save-excursion | 2431 | (save-excursion |
| 2432 | (let* ((point (point)) | 2432 | (let* ((point (point)) |
| 2433 | (bol (progn (beginning-of-line) (point))) | 2433 | (bol (progn (beginning-of-line) (point))) |
| @@ -2601,7 +2601,7 @@ See `term-prompt-regexp'." | |||
| 2601 | 2601 | ||
| 2602 | (defun term-adjust-current-row-cache (delta) | 2602 | (defun term-adjust-current-row-cache (delta) |
| 2603 | (when term-current-row | 2603 | (when term-current-row |
| 2604 | (setq term-current-row | 2604 | (setq term-current-row |
| 2605 | (max 0 (+ term-current-row delta))))) | 2605 | (max 0 (+ term-current-row delta))))) |
| 2606 | 2606 | ||
| 2607 | (defun term-terminal-pos () | 2607 | (defun term-terminal-pos () |
| @@ -2781,11 +2781,11 @@ See `term-prompt-regexp'." | |||
| 2781 | ;; In insert if the if the current line | 2781 | ;; In insert if the if the current line |
| 2782 | ;; has become too long it needs to be | 2782 | ;; has become too long it needs to be |
| 2783 | ;; chopped off. | 2783 | ;; chopped off. |
| 2784 | (when term-insert-mode | 2784 | (when term-insert-mode |
| 2785 | (setq pos (point)) | 2785 | (setq pos (point)) |
| 2786 | (end-of-line) | 2786 | (end-of-line) |
| 2787 | (when (> (current-column) term-width) | 2787 | (when (> (current-column) term-width) |
| 2788 | (delete-region (- (point) (- (current-column) term-width)) | 2788 | (delete-region (- (point) (- (current-column) term-width)) |
| 2789 | (point))) | 2789 | (point))) |
| 2790 | (goto-char pos))) | 2790 | (goto-char pos))) |
| 2791 | (setq term-current-column nil) | 2791 | (setq term-current-column nil) |
| @@ -2804,15 +2804,15 @@ See `term-prompt-regexp'." | |||
| 2804 | (setq count (term-current-column)) | 2804 | (setq count (term-current-column)) |
| 2805 | ;; The line cannot exceed term-width. TAB at | 2805 | ;; The line cannot exceed term-width. TAB at |
| 2806 | ;; the end of a line should not cause wrapping. | 2806 | ;; the end of a line should not cause wrapping. |
| 2807 | (setq count (min term-width | 2807 | (setq count (min term-width |
| 2808 | (+ count 8 (- (mod count 8))))) | 2808 | (+ count 8 (- (mod count 8))))) |
| 2809 | (if (> term-width count) | 2809 | (if (> term-width count) |
| 2810 | (progn | 2810 | (progn |
| 2811 | (term-move-columns | 2811 | (term-move-columns |
| 2812 | (- count (term-current-column))) | 2812 | (- count (term-current-column))) |
| 2813 | (setq term-current-column count)) | 2813 | (setq term-current-column count)) |
| 2814 | (when (> term-width (term-current-column)) | 2814 | (when (> term-width (term-current-column)) |
| 2815 | (term-move-columns | 2815 | (term-move-columns |
| 2816 | (1- (- term-width (term-current-column))))) | 2816 | (1- (- term-width (term-current-column))))) |
| 2817 | (when (= term-width (term-current-column)) | 2817 | (when (= term-width (term-current-column)) |
| 2818 | (term-move-columns -1)))) | 2818 | (term-move-columns -1)))) |
| @@ -2903,7 +2903,7 @@ See `term-prompt-regexp'." | |||
| 2903 | (term-goto (car term-saved-cursor) | 2903 | (term-goto (car term-saved-cursor) |
| 2904 | (cdr term-saved-cursor))) | 2904 | (cdr term-saved-cursor))) |
| 2905 | (setq term-terminal-state 0)) | 2905 | (setq term-terminal-state 0)) |
| 2906 | ((eq char ?c) ;; \Ec - Reset (terminfo: rs1) | 2906 | ((eq char ?c) ;; \Ec - Reset (terminfo: rs1) |
| 2907 | ;; This is used by the "clear" program. | 2907 | ;; This is used by the "clear" program. |
| 2908 | (setq term-terminal-state 0) | 2908 | (setq term-terminal-state 0) |
| 2909 | (term-reset-terminal)) | 2909 | (term-reset-terminal)) |
| @@ -3035,7 +3035,7 @@ See `term-prompt-regexp'." | |||
| 3035 | (setq term-current-row (1- term-height)))))) | 3035 | (setq term-current-row (1- term-height)))))) |
| 3036 | 3036 | ||
| 3037 | ;;; Reset the terminal, delete all the content and set the face to the | 3037 | ;;; Reset the terminal, delete all the content and set the face to the |
| 3038 | ;;; default one. | 3038 | ;;; default one. |
| 3039 | (defun term-reset-terminal () | 3039 | (defun term-reset-terminal () |
| 3040 | (erase-buffer) | 3040 | (erase-buffer) |
| 3041 | (setq term-current-row 0) | 3041 | (setq term-current-row 0) |
| @@ -3189,7 +3189,7 @@ See `term-prompt-regexp'." | |||
| 3189 | ((or (eq char ?H) ; cursor motion (terminfo: cup) | 3189 | ((or (eq char ?H) ; cursor motion (terminfo: cup) |
| 3190 | ;; (eq char ?f) ; xterm seems to handle this sequence too, not | 3190 | ;; (eq char ?f) ; xterm seems to handle this sequence too, not |
| 3191 | ;; needed for now | 3191 | ;; needed for now |
| 3192 | ) | 3192 | ) |
| 3193 | (if (<= term-terminal-parameter 0) | 3193 | (if (<= term-terminal-parameter 0) |
| 3194 | (setq term-terminal-parameter 1)) | 3194 | (setq term-terminal-parameter 1)) |
| 3195 | (if (<= term-terminal-previous-parameter 0) | 3195 | (if (<= term-terminal-previous-parameter 0) |
| @@ -3210,8 +3210,8 @@ See `term-prompt-regexp'." | |||
| 3210 | (term-down (max 1 term-terminal-parameter) t)) | 3210 | (term-down (max 1 term-terminal-parameter) t)) |
| 3211 | ;; \E[C - cursor right (terminfo: cuf) | 3211 | ;; \E[C - cursor right (terminfo: cuf) |
| 3212 | ((eq char ?C) | 3212 | ((eq char ?C) |
| 3213 | (term-move-columns | 3213 | (term-move-columns |
| 3214 | (max 1 | 3214 | (max 1 |
| 3215 | (if (>= (+ term-terminal-parameter (term-current-column)) term-width) | 3215 | (if (>= (+ term-terminal-parameter (term-current-column)) term-width) |
| 3216 | (- term-width (term-current-column) 1) | 3216 | (- term-width (term-current-column) 1) |
| 3217 | term-terminal-parameter)))) | 3217 | term-terminal-parameter)))) |
| @@ -3252,7 +3252,7 @@ See `term-prompt-regexp'." | |||
| 3252 | )) | 3252 | )) |
| 3253 | 3253 | ||
| 3254 | ;;; Modified to allow ansi coloring -mm | 3254 | ;;; Modified to allow ansi coloring -mm |
| 3255 | ;; \E[m - Set/reset modes, set bg/fg | 3255 | ;; \E[m - Set/reset modes, set bg/fg |
| 3256 | ;;(terminfo: smso,rmso,smul,rmul,rev,bold,sgr0,invis,op,setab,setaf) | 3256 | ;;(terminfo: smso,rmso,smul,rmul,rev,bold,sgr0,invis,op,setab,setaf) |
| 3257 | ((eq char ?m) | 3257 | ((eq char ?m) |
| 3258 | (when (= term-terminal-more-parameters 1) | 3258 | (when (= term-terminal-more-parameters 1) |
| @@ -3297,7 +3297,7 @@ The top-most line is line 0." | |||
| 3297 | (not (and (= term-scroll-start 0) | 3297 | (not (and (= term-scroll-start 0) |
| 3298 | (= term-scroll-end term-height))))) | 3298 | (= term-scroll-end term-height))))) |
| 3299 | (term-move-columns (- (term-current-column))) | 3299 | (term-move-columns (- (term-current-column))) |
| 3300 | (term-goto | 3300 | (term-goto |
| 3301 | term-scroll-start (term-current-column))) | 3301 | term-scroll-start (term-current-column))) |
| 3302 | 3302 | ||
| 3303 | ;; (defun term-switch-to-alternate-sub-buffer (set) | 3303 | ;; (defun term-switch-to-alternate-sub-buffer (set) |
| @@ -3846,7 +3846,7 @@ directory tracking functions.") | |||
| 3846 | 3846 | ||
| 3847 | 3847 | ||
| 3848 | (defun term-word (word-chars) | 3848 | (defun term-word (word-chars) |
| 3849 | "Return the word of WORD-CHARS at point, or nil if non is found. | 3849 | "Return the word of WORD-CHARS at point, or nil if none is found. |
| 3850 | Word constituents are considered to be those in WORD-CHARS, which is like the | 3850 | Word constituents are considered to be those in WORD-CHARS, which is like the |
| 3851 | inside of a \"[...]\" (see `skip-chars-forward')." | 3851 | inside of a \"[...]\" (see `skip-chars-forward')." |
| 3852 | (save-excursion | 3852 | (save-excursion |
| @@ -3863,7 +3863,7 @@ inside of a \"[...]\" (see `skip-chars-forward')." | |||
| 3863 | 3863 | ||
| 3864 | 3864 | ||
| 3865 | (defun term-match-partial-filename () | 3865 | (defun term-match-partial-filename () |
| 3866 | "Return the filename at point, or nil if non is found. | 3866 | "Return the filename at point, or nil if none is found. |
| 3867 | Environment variables are substituted. See `term-word'." | 3867 | Environment variables are substituted. See `term-word'." |
| 3868 | (let ((filename (term-word "~/A-Za-z0-9+@:_.$#,={}-"))) | 3868 | (let ((filename (term-word "~/A-Za-z0-9+@:_.$#,={}-"))) |
| 3869 | (and filename (substitute-in-file-name filename)))) | 3869 | (and filename (substitute-in-file-name filename)))) |