[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: clearing buffer

From: Michael . Cook
Subject: Re: clearing buffer
Date: Mon, 09 Jul 2001 17:03:55 -0400
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7

Noah Friedman <address@hidden> writes:

> Here's what I use.  It deletes everything up to (but not
> including) the most recent prompt.  In particular, commands which
> have been typed but not yet executed, are not deleted.

here's what i use.  in one keystroke, it narrows the buffer to hide
everything before point.

(defun mc/narrow-to-eob ()
  "Narrow the current buffer from point to the end."
  (narrow-to-region (point) (point-max)))

(global-set-key [?\C-<] 'mc/narrow-to-eob)

handy in other contexts, too.  there's also:

(defun mc/narrow-to-bob ()
  "Narrow the current buffer from the beginning to point."
  (narrow-to-region (point-min) (point)))

(global-set-key [?\C->] 'mc/narrow-to-bob)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]