emacs-devel
[Top][All Lists]
Advanced

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

more-mode for your pleasure


From: Miles Bader
Subject: more-mode for your pleasure
Date: Tue, 12 Feb 2008 00:08:26 +0900

Since "view-mode" sucks in just about every conceivable way, and is
AFAICT, un-salvageable, here's a more minimalist (but less sucky)
replacement you might enjoy:


;; Should be in subr.el
(defun scroll-up-one-line (&optional lines)
  (interactive "p")
  (scroll-up lines))

(defvar more-map
  (let ((mm (make-sparse-keymap)))
    (suppress-keymap mm)
    (define-key mm " " 'scroll-up)
    (define-key mm "\C-?" 'scroll-down)
    (define-key mm "\C-m" 'scroll-up-one-line)
    (define-key mm "q" 'bury-buffer)
    mm)
  "Keymap for `more-mode'.")

(define-minor-mode more-mode
  "A minor mode for browsing files.  SPC, DEL, and other keys are
bound to scroll the file instead of self-inserting.

\\{more-map}"
  :keymap more-map
  :lighter " More")


-Miles

-- 
"Whatever you do will be insignificant, but it is very important that
 you do it."  Mahatma Gandhi




reply via email to

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