• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/

Lines Matching +defs:beginning +defs:of +defs:buffer

10 ;; This file is part of GNU Emacs.
13 ;; it under the terms of the GNU General Public License as published by
18 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
22 ;; You should have received a copy of the GNU General Public License
30 ;;; That law was passed under the guise of a ban on pornography, but
34 ;;; For information on US government censorship of the Internet, and
35 ;;; what you can do to bring back freedom of the press, see the web
58 it through the emulator. Type ? after typing it for a list of
60 This variable is local to each terminal-emulator buffer."
64 (defcustom terminal-scrolling t ;;>> Setting this to t sort-of defeats my whole aim in writing this package...
66 past the bottom of the screen. If nil, output will win and `wrap' to the top
67 of the screen.
68 This variable is local to each terminal-emulator buffer."
74 This variable is local to each terminal-emulator buffer."
78 ;; If you are the sort of loser who uses scrolling without more breaks
82 "*Maximum number of characters which will be processed by the
123 (define-key map "b" 'switch-to-buffer)
151 ("Scroll at end of page" . te-do-scrolling)
152 ("Wrap at end of page" . te-do-wrapping)
153 ("Switch To Buffer" . switch-to-buffer)
155 ("Kill Buffer" . kill-buffer)
179 (defvar te-log-buffer nil)
256 (princ (format "\nSubcommands of \"%s\" (%s)\n"
267 ;; just use first line of documentation
268 (setq doc (substring doc 0 (match-beginning 0))))
321 "Record output from the terminal emulator in a buffer."
322 (interactive (list (if te-log-buffer
324 (read-buffer "Record output in buffer: "
326 (buffer-name (current-buffer)))
329 (progn (setq te-log-buffer nil)
331 (if (get-buffer name)
334 (set-buffer (get-buffer-create name))
336 (buffer-disable-undo (current-buffer))
337 (erase-buffer)))
338 (setq te-log-buffer (get-buffer name))
339 (message "Recording terminal emulator output into buffer \"%s\""
340 (buffer-name te-log-buffer))))
363 "Scroll at end of page" "Wrap at end of page")))
376 "Scroll at end of page (yuck)"
381 "Wrap to top of window at end of page"
390 (interactive "NMax number of output chars between redisplay updates: ")
416 allowing the next page of output to appear"
441 "Allow one more line of text to be output before doing another more break."
457 ;; this could conceivably be confusing in the presence of
462 (message "Flushing %d chars of pending output" length)
464 (list 0 (format "\n*** %d chars of pending output flushed ***\n"
492 ;; to our termcap entry of what they should look like.)
504 (let* ((w (get-buffer-window (current-buffer)))
506 (cond ((not w)) ; buffer not displayed
538 "Major mode for editing the contents of a terminal-emulator buffer.
549 "Start editing the terminal emulator buffer with ordinary Emacs commands."
564 ;;>> emulator will blow out if buffer isn't exactly te-width x te-height
565 (let ((buffer-read-only nil))
617 mode-line-buffer-identification
622 (set-buffer (process-buffer process))
627 (if (eq (window-buffer (selected-window)) (current-buffer))
645 (let ((buffer-read-only nil))
669 ;; break at end of this page
672 ;; migrate back towards top (ie bottom) of screen.
681 ;; (Who would think of ever writing a system which doesn't understand
682 ;; display terminals natively? Un*x: The Operating System of the Future.)
685 move to start of new line, clear to end of line."
686 (end-of-line)
704 (beginning-of-line)
723 (defun te-clear-rest-of-line ()
725 (let ((n (- (point) (progn (end-of-line) (point)))))
731 (defun te-clear-rest-of-screen ()
733 (te-clear-rest-of-line)
734 (while (progn (end-of-line) (not (eobp)))
735 (forward-char 1) (end-of-line)
742 ;; regenerate buffer to compensate for (nonexistent!!) bugs.
743 (erase-buffer)
789 (defun te-beginning-of-line ()
790 (beginning-of-line))
821 (- (progn (end-of-line) (point)) p))))
833 (- (progn (end-of-line) (point)) p))))
853 (x (- p (progn (beginning-of-line) (point))))
855 (progn (end-of-line) (- (point) p)))))
866 (end-of-line)
875 (beginning-of-line))
881 ;; ^m => beginning-of-line (for which it -should- be using ^p ^a, right?!!)
889 (let* ((obuf (current-buffer)))
893 (set-buffer (process-buffer process))
895 (and (bufferp te-log-buffer)
896 (if (null (buffer-name te-log-buffer))
898 (setq te-log-buffer nil)
899 (set-buffer te-log-buffer)
902 (set-buffer (process-buffer process))))
905 (te-process-output (eq (current-buffer)
906 (window-buffer (selected-window))))
907 (set-buffer (process-buffer process))
909 (set-buffer obuf))))
911 ;; (A version of the following comment which might be distractingly offensive
918 (let ((buffer-read-only nil)
951 (setq char (point)) (end-of-line)
965 ;; I suppose if I split the guts of this out into a separate
972 (?c . te-clear-rest-of-line)
973 (?C . te-clear-rest-of-screen)
977 (?\C-a . te-beginning-of-line)
998 (?\C-m . te-beginning-of-line)
1008 ;; We must update window-point in every window displaying our buffer
1011 (eq (window-buffer w) (current-buffer)))
1037 (eq (current-buffer) (window-buffer (selected-window)))
1057 ((null (buffer-name (process-buffer process)))) ;deleted
1058 (t (let ((b (current-buffer)))
1060 (set-buffer (process-buffer process))
1061 (setq buffer-read-only nil)
1067 (if (and (eq b (process-buffer process))
1085 (defun terminal-emulator (buffer program args &optional width height)
1087 ARGS is a list of argument-strings. Remaining arguments are WIDTH and HEIGHT.
1088 BUFFER's contents are made an image of the display generated by that program,
1089 and any input typed when BUFFER is the current Emacs buffer is sent to that
1094 WIDTH and HEIGHT are determined from the size of the current window
1105 Here is a list of some of the variables which control the behavior
1106 of the emulator -- see their documentation for more information:
1110 This function calls the value of terminal-mode-hook if that exists
1111 and is non-nil after the terminal buffer has been set up and the
1115 (set-buffer (get-buffer-create "*terminal*"))
1116 (buffer-name (if (or (not (boundp 'te-process))
1120 (current-buffer)
1121 (generate-new-buffer "*terminal*"))))
1135 (switch-to-buffer buffer)
1143 (setq mode-line-buffer-identification
1146 (let ((buffer-read-only nil))
1149 (while (setq process (get-buffer-process (current-buffer)))
1160 (start-process "terminal-emulator" (current-buffer)
1209 of the terminal-emulator"
1211 (buffer-disable-undo (current-buffer))
1217 (setq buffer-read-only t)
1238 (make-local-variable 'te-log-buffer)
1239 (setq te-log-buffer nil)
1264 ;; this is the set of chars magic with "..." in `sh'
1311 ;; to avoid any risk of writing a name that
1326 ;; Because of Unix Brain Death(tm), we can't change
1327 ;; the terminal type of a running process, and so
1342 ;; o writing in the last column of the last line