~rgrjr/rgr-hacks

cd9766c54a50e3794dca365d7eca82d35367f66a — Bob Rogers 6 months ago 844d92f
Remove unused shell get-old-input code

* rgr-shell-hacks.el:
   + (rgr-comint-get-old-input-with-continuation-lines):  Get rid of
     this, which apparently hasn't been used since 2008.
1 files changed, 1 insertions(+), 29 deletions(-)

M rgr-shell-hacks.el
M rgr-shell-hacks.el => rgr-shell-hacks.el +1 -29
@@ 1,8 1,6 @@
;;;****************************************************************************
;;;
;;;;    GNU Emacs hackery.
;;;
;;; $Id$
;;;;    GNU Emacs shell-mode hackery.
;;;
;;;    [old] Modification history:
;;;


@@ 75,32 73,6 @@ window is selected, else the buffer is selected in the current window."
	    ;; start a new one (but only if not told to search for the nth).
	    (shell)))))

(defun rgr-comint-get-old-input-with-continuation-lines ()
  ;; replacement for comint-get-old-input-default
  "Default for `comint-get-old-input' [modified.  -- rgr, 20-Aug-97].
Take the current line, plus any previous lines ending in '\\', plus the
next (and subsequent) line if the current (previous) line ends in '\\'."
  (save-excursion
    (let ((original-point (point)) (start nil))
      (beginning-of-line)
      ;; Skip backward while previous lines end in "\".
      (while (and (not (bobp))
		  (save-excursion
		    (forward-char -2)
		    (looking-at "\\\\\n")))
	;; Continuation line -- keep going.
	(forward-line -1))
      (comint-skip-prompt)
      (setq start (point))
      ;; Skip forward while
      (goto-char original-point)
      (end-of-line)
      (while (and (not (eobp))
		  (= (char-after (1- (point))) ?\\))
	;; this is equivalent to (progn (forward-line) (end-of-line)).
	(end-of-line 2))
      (buffer-substring-no-properties start (point)))))

;; Truncating output to the last "uptime" command.

(defun rgr-shell-truncate-output ()