Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!linus!gwr From: gwr@linus.UUCP (Gordon W. Ross) Newsgroups: comp.emacs Subject: Re: view/less mode for Gnu Emacs Message-ID: <11743@linus.UUCP> Date: Fri, 21-Aug-87 19:36:49 EDT Article-I.D.: linus.11743 Posted: Fri Aug 21 19:36:49 1987 Date-Received: Sun, 23-Aug-87 06:28:54 EDT References: <1835@megaron.arizona.edu> Reply-To: gwr@linus.UUCP (Gordon W. Ross) Distribution: world Organization: The MITRE Corporation, Bedford, MA. Lines: 27 Keywords: view-mode less Summary: Making cleanup-backspaces leave buffer-modified-p as is Though I found David Gudeman's version of view-mode (works like the unix progam "less") to be welcome improvement over the standard view-mode, I decided it needed a small improvement. I use it to view formatted man pages (in /usr/man/cat[1-9]) and like being able to remove the backspace constructions, but find it annoying to be asked wether I want to save the man page buffer whenever I do a save. I don't even have write permission there. Therefore, what follows is a modified version of view-cleanup-backspaces which leaves the buffer modified flag in whatever state it was in when this function was called. Many thanks to David Gudeman for this very useful goodie (which he posted to this newsgroup on 27 Jul 87). (defun view-cleanup-backspaces () "Execute cleanup-backspaces even if the buffer is read only. Leave buffer-modified-p as it was upon entry to this function." (interactive) (let ((buffer-read-only)(buf-mod (buffer-modified-p))) (cleanup-backspaces) (set-buffer-modified-p buf-mod) )) -- Gordon W. Ross ARPA: linus!gwr@MITRE-BEDFORD The MITRE Corporation UUCP: decvax!linus!gwr Bedford, MA 01730 Phone: (617) 271-3205