; if you call it without passing a buffer as argument
; and they are not easy to fix.
; (interactive)
- (make-local-variable 'view-old-mode-line-buffer-identification)
- (setq view-old-mode-line-buffer-identification
- mode-line-buffer-identification)
(make-local-variable 'view-old-buffer-read-only)
(setq view-old-buffer-read-only buffer-read-only)
(make-local-variable 'view-old-local-map)
(and (boundp 'Helper-return-blurb) Helper-return-blurb))
(setq buffer-read-only t)
- (setq mode-line-buffer-identification
- (list
- (if (buffer-file-name)
- "Viewing %f"
- "Viewing %b")))
(setq view-mode t)
(setq Helper-return-blurb
(format "continue viewing %s"
If you viewed an existing buffer, that buffer returns to its previous mode.
If you viewed a file that was not present in Emacs, its buffer is killed."
(interactive)
- (setq mode-line-buffer-identification
- view-old-mode-line-buffer-identification)
(use-local-map view-old-local-map)
(setq buffer-read-only view-old-buffer-read-only)