?
Current Path : /usr/share/emacs/24.3/lisp/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : //usr/share/emacs/24.3/lisp/view.elc |
;ELC ;;; Compiled by mockbuild@buildfarm06-new.corp.cloudlinux.com on Fri Oct 11 10:06:33 2024 ;;; from file /builddir/build/BUILD/emacs-24.3/lisp/view.el ;;; in Emacs version 24.3.1 ;;; with all optimizations. ;;; This file uses dynamic docstrings, first added in Emacs 19.29. ;;; This file does not contain utf-8 non-ASCII characters, ;;; and so can be loaded in Emacs versions earlier than 23. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (byte-code "\300\301\302\303\304\305\304\306\307\310& \210\311\312\313\314\315\316\307\301&\210\311\317\302\320\315\321\307\301&\210\311\322\302\323\315\321\307\301&\210\311\324\325\326\315\321\307\301\327\330& \210\311\331\302\332\315\321\307\301&\210\311\333\302\334\315\321\307\301\327\335& \207" [custom-declare-group view nil "Peruse file or buffer without editing." :link (function-link view-mode) (custom-manual "(emacs)Misc File Ops") :group wp custom-declare-variable view-highlight-face 'highlight "The face used for highlighting the match found by View mode search." :type face view-scroll-auto-exit "Non-nil means scrolling past the end of buffer exits View mode.\nA value of nil means attempting to scroll past the end of the buffer,\nonly rings the bell and gives a message on how to leave." boolean view-try-extend-at-buffer-end "Non-nil means try to load more of file when reaching end of buffer.\nThis variable is mainly intended to be temporarily set to non-nil by\nthe F command in view-mode, but you can set it to t if you want the action\nfor all scroll commands in view mode." view-remove-frame-by-deleting t "Determine how View mode removes a frame no longer needed.\nIf nil, make an icon of the frame. If non-nil, delete the frame." :version "23.1" view-exits-all-viewing-windows "Non-nil means restore all windows used to view buffer.\nCommands that restore windows when finished viewing a buffer,\napply to all windows that display the buffer and have restore\ninformation. If `view-exits-all-viewing-windows' is nil, only\nthe selected window is considered for restoring." view-inhibit-help-message "Non-nil inhibits the help message shown upon entering View mode." "22.1"] 10) #@148 Non-nil if View mode is enabled. Don't change this variable directly, you must change it by one of the functions that enable or disable view mode. (defvar view-mode nil (#$ . 2259)) (byte-code "\300\301!\210\302\303\304\305\306\307\310\311&\207" [make-variable-buffer-local view-mode custom-declare-variable view-mode-hook nil "Normal hook run when starting to view a buffer or file." :type hook :group view] 8) (defvar view-old-buffer-read-only nil) (byte-code "\300\301!\210\300\302!\207" [make-variable-buffer-local view-old-buffer-read-only view-old-Helper-return-blurb] 2) #@97 Default number of lines to scroll by View page commands. If nil that means use the window size. (defvar view-page-size nil (#$ . 2844)) (make-variable-buffer-local 'view-page-size) #@107 Default number of lines to scroll by View half page commands. If nil that means use half the window size. (defvar view-half-page-size nil (#$ . 3032)) (make-variable-buffer-local 'view-half-page-size) (defvar view-last-regexp nil) (make-variable-buffer-local 'view-last-regexp) #@361 What to do with used windows and where to go when finished viewing buffer. This is local in each buffer being viewed. It is added to by `view-mode-enter' when starting to view a buffer and subtracted from by `view-mode-exit' when finished viewing the buffer. See RETURN-TO-ALIST argument of function `view-mode-exit' for the format of `view-return-to-alist'. (defvar view-return-to-alist nil (#$ . 3317)) (byte-code "\300\301\302\303#\210\304\301!\210\305\301\306\307#\207" [make-obsolete-variable view-return-to-alist "this variable is no more used." "24.1" make-variable-buffer-local put permanent-local t] 4) #@287 If non-nil, a function with one argument (a buffer) called when finished viewing. Commands like \[view-file] and \[view-file-other-window] may set this to bury or kill the viewed buffer. Observe that the buffer viewed might not appear in any window at the time this function is called. (defvar view-exit-action nil (#$ . 3937)) (make-variable-buffer-local 'view-exit-action) #@240 If non-nil, View mode "exit" commands don't actually disable View mode. Instead, these commands just switch buffers or windows. This is set in certain buffers by specialized features such as help commands that use View mode automatically. (defvar view-no-disable-on-exit nil (#$ . 4319)) #@114 Overlay used to display where a search operation found its match. This is local in each buffer, once it is used. (defvar view-overlay nil (#$ . 4614)) (make-variable-buffer-local 'view-overlay) (defvar view-mode-map (byte-code "\301 \302\303\304#\210\302\305\306#\210\302\307\310#\210\302\311\312#\210\302\313\314#\210\302\315\316#\210\302\317\320#\210\302\321\322#\210\302\323\324#\210\302\325\326#\210\302\327\330#\210\302\331\332#\210\302\333\334#\210\302\335\336#\210\302\337\340#\210\302\341\342#\210\302\343\344#\210\302\345\346#\210\302\347\350#\210\302\351\352#\210\302\353\354#\210\302\355\356#\210\302\357\360#\210\302\361\360#\210\302\362\363#\210\302\364\365#\210\302\366\367#\210\302\370\371#\210\302\372\373#\210\302\374\375#\210\302\376\377#\210\302\201@ \201A #\210\302\201B \201C #\210\302\201D \201E #\210\302\201F \201G #\210\302\201H \201G #\210\302\201I \201G #\210\302\201J \201G #\210\302\201K \201G #\210\302\201L \201G #\210\302\201M \201G #\210\302\201N \201G #\210\302\201O \201G #\210\302\201P \201G #\210\302\201Q \201R #\210\302\201S \201R #\210\302\201T \201R #\210)\207" [map make-sparse-keymap define-key "C" View-kill-and-leave "c" View-leave "Q" View-quit-all "E" View-exit-and-edit "e" View-exit "q" View-quit "p" View-search-last-regexp-backward "n" View-search-last-regexp-forward "\\" View-search-regexp-backward "/" View-search-regexp-forward "r" isearch-backward "s" isearch-forward "m" point-to-register "'" register-to-point "x" exchange-point-and-mark "@" View-back-to-mark "." set-mark-command "%" View-goto-percent "g" View-goto-line "=" what-line "F" View-revert-buffer-scroll-page-forward "y" View-scroll-line-backward "\n" View-scroll-line-forward " " "u" View-scroll-half-page-backward "d" View-scroll-half-page-forward "z" View-scroll-page-forward-set-page-size "w" View-scroll-page-backward-set-page-size "" View-scroll-page-backward " " View-scroll-page-forward "o" View-scroll-to-buffer-end ">" end-of-buffer "<" beginning-of-buffer "-" negative-argument "9" digit-argument "8" "7" "6" "5" "4" "3" "2" "1" "0" "H" describe-mode "?" "h"] 4)) #@65 Like `kill-buffer', but does nothing if the buffer is modified. (defalias 'kill-buffer-if-not-modified #[(buf) "\301!\211\205 \302!?\205 \303!)\207" [buf get-buffer buffer-modified-p kill-buffer] 3 (#$ . 6765)]) #@401 View FILE in View mode, returning to previous buffer when done. Emacs commands editing the buffer contents are not available; instead, a special set of commands (mostly letters and punctuation) are defined for moving around in the buffer. Space scrolls forward, Delete scrolls backward. For a list of all View commands, type H or h while viewing. This command runs the normal hook `view-mode-hook'. (defalias 'view-file #[(file) "\303!\204 \304\305\"\210\306!\307!\310 \n?\205 \311\"*\207" [file buffer had-a-buf file-exists-p error "%s does not exist" get-file-buffer find-file-noselect view-buffer kill-buffer-if-not-modified] 3 (#$ . 6990) "fView file: "]) #@515 View FILE in View mode in another window. When done, return that window to its previous buffer, and kill the buffer visiting FILE if unmodified and if it wasn't visited before. Emacs commands editing the buffer contents are not available; instead, a special set of commands (mostly letters and punctuation) are defined for moving around in the buffer. Space scrolls forward, Delete scrolls backward. For a list of all View commands, type H or h while viewing. This command runs the normal hook `view-mode-hook'. (defalias 'view-file-other-window #[(file) "\303!\204 \304\305\"\210\306!\307!\310 \311\n?\205 \312#*\207" [file buf-to-view had-a-buf file-exists-p error "%s does not exist" get-file-buffer find-file-noselect view-buffer-other-window nil kill-buffer-if-not-modified] 4 (#$ . 7666) "fIn other window view file: "]) #@532 View FILE in View mode in another frame. When done, kill the buffer visiting FILE if unmodified and if it wasn't visited before; also, maybe delete other frame and/or return to previous buffer. Emacs commands editing the buffer contents are not available; instead, a special set of commands (mostly letters and punctuation) are defined for moving around in the buffer. Space scrolls forward, Delete scrolls backward. For a list of all View commands, type H or h while viewing. This command runs the normal hook `view-mode-hook'. (defalias 'view-file-other-frame #[(file) "\303!\204 \304\305\"\210\306!\307!\310 \311\n?\205 \312#*\207" [file buf-to-view had-a-buf file-exists-p error "%s does not exist" get-file-buffer find-file-noselect view-buffer-other-frame nil kill-buffer-if-not-modified] 4 (#$ . 8510) "fIn other frame view file: "]) #@1015 View BUFFER in View mode, returning to previous buffer when done. Emacs commands editing the buffer contents are not available; instead, a special set of commands (mostly letters and punctuation) are defined for moving around in the buffer. Space scrolls forward, Delete scrolls backward. For a list of all View commands, type H or h while viewing. This command runs the normal hook `view-mode-hook'. Optional argument EXIT-ACTION is either nil or a function with buffer as argument. This function is called when finished viewing buffer. Use this argument instead of explicitly setting `view-exit-action'. Do not set EXIT-ACTION to `kill-buffer' when BUFFER visits a file: Users may suspend viewing in order to modify the buffer. Exiting View mode will then discard the user's edits. Setting EXIT-ACTION to `kill-buffer-if-not-modified' avoids this. This function does not enable View mode if the buffer's major-mode has a `special' mode-class, because such modes usually have their own View-like bindings. (defalias 'view-buffer #[(buffer &optional exit-action) "\303!\210 \304N\305=\203 \306\307!\207\310\311\n\"\207" [buffer major-mode exit-action switch-to-buffer mode-class special message "Not using View mode because the major mode is special" view-mode-enter nil] 3 (#$ . 9369) "bView buffer: "]) #@789 View BUFFER in View mode in another window. Emacs commands editing the buffer contents are not available; instead, a special set of commands (mostly letters and punctuation) are defined for moving around in the buffer. Space scrolls forward, Delete scrolls backward. For a list of all View commands, type H or h while viewing. This command runs the normal hook `view-mode-hook'. Optional argument NOT-RETURN is ignored. Optional argument EXIT-ACTION is either nil or a function with buffer as argument. This function is called when finished viewing buffer. Use this argument instead of explicitly setting `view-exit-action'. This function does not enable View mode if the buffer's major-mode has a `special' mode-class, because such modes usually have their own View-like bindings. (defalias 'view-buffer-other-window #[(buffer &optional not-return exit-action) "\304\305 \304\"\210)\n\306N\307=\203 \310\311!\207\312\313\"\207" [pop-up-windows buffer major-mode exit-action t pop-to-buffer mode-class special message "Not using View mode because the major mode is special" view-mode-enter nil] 3 (#$ . 10690) "bIn other window view buffer:\nP"]) #@788 View BUFFER in View mode in another frame. Emacs commands editing the buffer contents are not available; instead, a special set of commands (mostly letters and punctuation) are defined for moving around in the buffer. Space scrolls forward, Delete scrolls backward. For a list of all View commands, type H or h while viewing. This command runs the normal hook `view-mode-hook'. Optional argument NOT-RETURN is ignored. Optional argument EXIT-ACTION is either nil or a function with buffer as argument. This function is called when finished viewing buffer. Use this argument instead of explicitly setting `view-exit-action'. This function does not enable View mode if the buffer's major-mode has a `special' mode-class, because such modes usually have their own View-like bindings. (defalias 'view-buffer-other-frame #[(buffer &optional not-return exit-action) "\304\305 \304\"\210)\n\306N\307=\203 \310\311!\207\312\313\"\207" [pop-up-frames buffer major-mode exit-action t pop-to-buffer mode-class special message "Not using View mode because the major mode is special" view-mode-enter nil] 3 (#$ . 11853) "bView buffer in other frame: \nP"]) #@87 Non-nil if View mode is enabled. Use the command `view-mode' to change this variable. (defvar view-mode nil (#$ . 13012)) (make-variable-buffer-local 'view-mode) #@4732 Toggle View mode, a minor mode for viewing text but not editing it. With a prefix argument ARG, enable View mode if ARG is positive, and disable it otherwise. If called from Lisp, enable View mode if ARG is omitted or nil. When View mode is enabled, commands that do not change the buffer contents are available as usual. Kill commands insert text in kill buffers but do not delete. Most other commands beep and tell the user that the buffer is read-only. \<view-mode-map> The following additional commands are provided. Most commands take prefix arguments. Page commands default to "page size" lines which is almost a whole window, or number of lines set by \[View-scroll-page-forward-set-page-size] or \[View-scroll-page-backward-set-page-size]. Half page commands default to and set "half page size" lines which initially is half a window full. Search commands default to a repeat count of one. H, h, ? This message. Digits provide prefix arguments. \[negative-argument] negative prefix argument. \[beginning-of-buffer] move to the beginning of buffer. > move to the end of buffer. \[View-scroll-to-buffer-end] scroll so that buffer end is at last line of window. SPC scroll forward "page size" lines. With prefix scroll forward prefix lines. DEL scroll backward "page size" lines. With prefix scroll backward prefix lines. \[View-scroll-page-forward-set-page-size] like \[View-scroll-page-forward] but with prefix sets "page size" to prefix. \[View-scroll-page-backward-set-page-size] like \[View-scroll-page-backward] but with prefix sets "page size" to prefix. \[View-scroll-half-page-forward] scroll forward "half page size" lines. With prefix, sets "half page size" to prefix lines and scrolls forward that much. \[View-scroll-half-page-backward] scroll backward "half page size" lines. With prefix, sets "half page size" to prefix lines and scrolls backward that much. RET, LFD scroll forward one line. With prefix scroll forward prefix line(s). y scroll backward one line. With prefix scroll backward prefix line(s). \[View-revert-buffer-scroll-page-forward] revert-buffer if necessary and scroll forward. Use this to view a changing file. \[what-line] prints the current line number. \[View-goto-percent] goes prefix argument (default 100) percent into buffer. \[View-goto-line] goes to line given by prefix argument (default first line). . set the mark. x exchanges point and mark. \[View-back-to-mark] return to mark and pops mark ring. Mark ring is pushed at start of every successful search and when jump to line occurs. The mark is set on jump to buffer start or end. \[point-to-register] save current position in character register. ' go to position saved in character register. s do forward incremental search. r do reverse incremental search. \[View-search-regexp-forward] searches forward for regular expression, starting after current page. ! and @ have a special meaning at the beginning of the regexp. ! means search for a line with no match for regexp. @ means start search at beginning (end for backward search) of buffer. \ searches backward for regular expression, starting before current page. \[View-search-last-regexp-forward] searches forward for last regular expression. p searches backward for last regular expression. \[View-quit] quit View mode, restoring this window and buffer to previous state. \[View-quit] is the normal way to leave view mode. \[View-exit] exit View mode but stay in current buffer. Use this if you started viewing a buffer (file) and find out you want to edit it. This command restores the previous read-only status of the buffer. \[View-exit-and-edit] exit View mode, and make the current buffer editable even if it was not editable before entry to View mode. \[View-quit-all] quit View mode, restoring all windows to previous state. \[View-leave] quit View mode and maybe switch buffers, but don't kill this buffer. \[View-kill-and-leave] quit View mode, kill current buffer and go back to other buffer. The effect of \[View-leave], \[View-quit] and \[View-kill-and-leave] depends on how view-mode was entered. If it was entered by view-file, view-file-other-window, view-file-other-frame, or \[dired-view-file] (\[view-file], \[view-file-other-window], \[view-file-other-frame], or the Dired mode v command), then \[View-quit] will try to kill the current buffer. If view-mode was entered from another buffer, by \[view-buffer], \[view-buffer-other-window], \[view-buffer-other frame], \[view-file], \[view-file-other-window], or \[view-file-other-frame], then \[View-leave], \[View-quit] and \[View-kill-and-leave] will return to that buffer. Entry to view-mode runs the normal hook `view-mode-hook'. (defalias 'view-mode #[(&optional arg) "\303 \304=\203 \n?\202 \305 !\306V\211\203 \307 \210\202! \310 \210\311\312\n\203+ \313\202, \314\"\210\315\316!\203M \303 \203@ \303 \232\203M \317\320\n\203J \321\202K \322\"\210)\323 \210\n\207" [#1=#:last-message arg view-mode current-message toggle prefix-numeric-value 0 view-mode-enable view-mode-disable run-hooks view-mode-hook view-mode-on-hook view-mode-off-hook called-interactively-p any message "View mode %sabled" "en" "dis" force-mode-line-update] 4 (#$ . 13182) (list (or current-prefix-arg 'toggle))]) (byte-code "\301\302\303\304\211%\207" [view-mode-map add-minor-mode view-mode " View" nil] 6) #@20 Turn on View mode. (defalias 'view-mode-enable #[nil "\306\307\310\311\312$\210\312\311\211\312\313\305!\2032 \313\305!\205 \314\315\316 \203. \317\316 !\2020 \320 \"\321 \210\322\323!\207" [view-mode view-page-size view-half-page-size buffer-read-only view-old-buffer-read-only Helper-return-blurb add-hook change-major-mode-hook view-mode-disable nil t boundp format "continue viewing %s" buffer-file-name file-name-nondirectory buffer-name force-mode-line-update run-hooks view-mode-hook view-old-Helper-return-blurb] 6 (#$ . 18582)]) #@21 Turn off View mode. (defalias 'view-mode-disable #[nil "\306\307\310\311#\210\203 \312!\210\313 \210\314\315!\203 \316\315!\210\317\320\303!\203% \n\f\205, \211\207" [view-overlay view-mode view-old-Helper-return-blurb Helper-return-blurb buffer-read-only view-old-buffer-read-only remove-hook change-major-mode-hook view-mode-disable t delete-overlay force-mode-line-update local-variable-p view-read-only kill-local-variable nil boundp] 4 (#$ . 19137)]) #@458 Update `view-return-to-alist' of buffer BUFFER. Remove from `view-return-to-alist' all entries referencing dead windows. Optional argument ITEM non-nil means add ITEM to `view-return-to-alist' after purging. For a description of items that can be added see the RETURN-TO-ALIST argument of the function `view-mode-exit'. If `view-return-to-alist' contains an entry for the selected window, purge that entry from `view-return-to-alist' before adding ITEM. (defalias 'view-return-to-alist-update #[(buffer &optional item) "rq\210 \203N \306\211\306\n\203M \n@\211@\307\f!\203D \n\203, \f\310 =\2042 \311\f!\204D \203>