;ELC ;;; compiled by jwz@thalidomide on Fri Dec 31 02:00:42 1993 ;;; from file /th/jwz/emacs19/lisp/modes/view-less.el ;;; emacs version 19.9 Lucid (beta9). ;;; bytecomp version 2.22; 22-dec-93. ;;; optimization is on. ;;; this file uses opcodes which do not exist in Emacs 18. (if (and (boundp 'emacs-version) (or (and (boundp 'epoch::version) epoch::version) (string-lessp emacs-version "19"))) (error "This file was compiled for Emacs 19.")) (provide 'view) (defvar view-search-string "" "\ Last string searched for with view-search functions.") (defvar view-search-arg 1 "\ Arg to last view search.") (defvar view-default-lines 10 "\ Default value for the \"d\" and \"u\" commands in view-mode") (byte-code "!!   \" ! # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # @# AB# CD#‡" [boundp view-kill-on-exit nil view-mode-map make-keymap set-keymap-name suppress-keymap define-key "-" negative-argument " " scroll-up "f" "" scroll-down "b" backspace " " view-scroll-lines-up "\n" "e" "j" "y" view-scroll-lines-down "k" "d" view-scroll-some-lines-up "u" view-scroll-some-lines-down "r" recenter "t" toggle-truncate-lines "N" view-buffer "E" view-file "P" "!" shell-command "|" shell-command-on-region "=" what-line "?" view-search-backward "h" view-mode-describe "s" view-repeat-search "n" "/" view-search-forward "\\" "g" view-goto-line "G" view-Goto-line "%" view-goto-percent "p" "m" point-to-register "'" register-to-point "C" view-cleanup-backspaces "q" view-quit] 4) (fset 'view-file #[(file &optional p) " !? ! ! !\nL )ʇ" [get-file-buffer file new-p p find-file-other-window find-file view-mode make-local-variable view-kill-on-exit view-brief-help nil] 2 "\ Find FILE, enter view mode. With prefix arg use other window." "fView File: \nP"]) (fset 'view-buffer #[(buf &optional p) "\n!\n! " [p switch-to-buffer-other-window buf switch-to-buffer view-mode view-brief-help] 2 "\ Switch to BUF, enter view mode. With prefix arg use other window." "bView Buffer: \nP"]) (fset 'view-file-other-window #[(file) " \"" [view-file file t] 3 "\ Find FILE in other window, and enter view mode."]) (fset 'view-buffer-other-window #[(buffer) " \"" [view-buffer buffer t] 3 "\ Switch to BUFFER in another window, and enter view mode."]) (fset 'view-brief-help #[nil "!!" [message substitute-command-keys "\\[scroll-up] = page forward;\\[scroll-down] = page back; \\[view-mode-describe] = help; \\[view-quit] = quit."] 3]) (fset 'view-mode #[(&optional p) "!!L ! \"!)! L   CӉ" [make-local-variable view-default-lines view-kill-on-exit nil copy-keymap view-mode-map map set-keymap-parent current-local-map use-local-map view-last-mode major-mode "View" mode-name view-mode p cleanup-backspaces "View: %17b" mode-line-buffer-identification t buffer-read-only] 3 "\ Mode for viewing text, with bindings like `less'. Commands are: \\ 0..9 prefix args - prefix minus \\[scroll-up] page forward \\[scroll-down] page back \\[view-scroll-lines-up] scroll prefix-arg lines forward, default 1. \\[view-scroll-lines-down] scroll prefix-arg lines backward, default 1. \\[view-scroll-some-lines-down] scroll prefix-arg lines backward, default 10. \\[view-scroll-some-lines-up] scroll prefix-arg lines forward, default 10. \\[what-line] print line number \\[view-mode-describe] print this help message \\[view-search-forward] regexp search, uses previous string if you just hit RET \\[view-search-backward] as above but searches backward \\[view-repeat-search] repeat last search \\[view-goto-line] goto line prefix-arg, default 1 \\[view-Goto-line] goto line prefix-arg, default last line \\[view-goto-percent] goto a position by percentage \\[toggle-truncate-lines] toggle truncate-lines \\[view-file] view another file \\[view-buffer] view another buffer \\[view-cleanup-backspaces] cleanup backspace constructions \\[shell-command] execute a shell command \\[shell-command-on-region] execute a shell command with the region as input \\[view-quit] exit view-mode, and bury the current buffer. If invoked with the optional (prefix) arg non-nil, view-mode cleans up backspace constructions. More precisely: \\{view-mode-map}" "P"]) (fset 'cleanup-backspaces #[nil "ebgU!u#u!!k!u!]!!cO!!cAu<)" [8 delete-char 1 search-forward "" nil t -2 looking-at "_\\|\\(.\\)\\1\\||\\^" 2 "._\\|\\^|" "+o\\|o+" 3 "(+)" "|-" "*"] 4 "\ Cleanup backspace constructions. _^H and ^H_ sequences are deleted. x^Hx sequences are turned into x for all characters x. ^^H| and |^H^ sequences are turned into ^. +^Ho and o^H+ are turned into (+)." nil]) (fset 'toggle-truncate-lines #[(&optional p) " ?!UĪ " [p truncate-lines prefix-numeric-value 0 nil t recenter] 2 "\ Toggles the values of truncate-lines." "P"]) (fset 'view-cleanup-backspaces #[nil "  \n!*" [nil buffer-modified-p buf-mod buffer-read-only cleanup-backspaces set-buffer-modified-p] 2 "\ Cleanup backspaces and if buffer is currently unmodified, don't flag it as a modified buffer. This works even if the buffer is read-only." nil]) (fset 'view-scroll-lines-up #[(p) " !" [scroll-up p] 2 "\ Scroll up prefix-arg lines, default 1." "p"]) (fset 'view-scroll-lines-down #[(p) " [!" [scroll-up p] 2 "\ Scroll down prefix-arg lines, default 1." "p"]) (fset 'view-scroll-some-lines-down #[(&optional n) "V\n!" [n 1 view-default-lines scroll-down] 2 "\ Scroll down prefix-arg lines, default 10, or last argument." "p"]) (fset 'view-scroll-some-lines-up #[(&optional n) "V\n!" [n 1 view-default-lines scroll-up] 2 "\ Scroll up prefix-arg lines, default 10, or last argument." "p"]) (fset 'view-goto-line #[(&optional n) " !" [goto-line n] 2 "\ Goto line prefix, default 1." "p"]) (fset 'view-Goto-line #[(&optional n) "\n! !!" [current-prefix-arg goto-line n end-of-buffer recenter -1 move-to-window-line 0] 2 "\ Goto line prefix, default last line." "p"]) (fset 'view-goto-percent #[(&optional p) "!e\ndeZ_å\\by" [set-mark-command nil p 100 0] 4 "\ Sets mark and goes to a position PERCENT percent of the file." "p"]) (fset 'view-mode-describe #[nil " *" ["View" view-mode major-mode mode-name describe-mode] 2 nil nil]) (fset 'view-search-forward #[(s p) "\nØ \nʼn$)" [((byte-code " Ň" [p view-search-arg "" s view-search-string nil] 2)) word-search-forward s "" view-search-string nil p] 5 "\ Search forward for REGEXP. If regexp is empty, use last search string. With prefix ARG, search forward that many occurrences." "sView search: \np"]) (fset 'view-search-backward #[(s p) " \n[\"" [view-search-forward s p] 3 "\ Search backward for REGEXP. If regexp is empty, use last search string. With prefix ARG, search forward that many occurrences." "sView search backward: \np"]) (fset 'view-repeat-search #[(p) " \n \n= [\n!\"" [view-search-forward view-search-string p view-search-arg - prefix-numeric-value] 4 "\ Repeat last view search command. If a prefix arg is given, use that instead of the previous arg, if the prefix is just a -, then take the negative of the last prefix arg." "P"]) (fset 'view-quit #[(&optional p) "p!  ! \n \n=\n =Ώ !! !*" [boundp view-last-mode old-mode b view-kill-on-exit p kill-buffer kill-all-local-variables normal-mode major-mode default-major-mode fundamental-mode nil (funcall old-mode) ((error)) switch-to-buffer other-buffer bury-buffer] 3 "\ Switch to another buffer and bury this one. If the buffer being viewed had not been in a buffer already, it is killed. With a prefix arg, it will be buried instead of killed." "P"]) (fset 'auto-view-mode #[nil "!? " [buffer-file-name file-writable-p view-mode] 2 "\ If the file of the current buffer is not writable, call view-mode. This is meant to be added to find-file-hooks."])