%PDF- %PDF-
Direktori : /usr/local/share/emacs/27.2/lisp/ |
Current File : //usr/local/share/emacs/27.2/lisp/follow.elc |
;ELC ;;; Compiled ;;; in Emacs version 27.2 ;;; 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!\210\302\303\304\305\306\307\306\310&\210\311\312\304\313\314\315\306\303&\210\311\316\317\320\314\321\306\303&\207" [require easymenu custom-declare-group follow nil "Synchronize windows showing the same buffer." :group windows convenience custom-declare-variable follow-mode-hook "Normal hook run by `follow-mode'." :type hook follow-mode-prefix "." "Prefix key to use for follow commands in Follow mode.\nThe value of this variable is checked as part of loading Follow mode.\nAfter that, changing the prefix key requires manipulating keymaps." string] 8) #@36 Minor mode keymap for Follow mode. (defvar follow-mode-map (byte-code "\303 \303 \304\305\306#\210\304\307\310#\210\304\311\310#\210\304\312\313#\210\304\314\315#\210\304\316\317#\210\304\320\321#\210\304\322\323#\210\304\324\325#\210\304\326\327#\210\304\330\331#\210\304 \n#\210\304 \332\333#\210\304 \334\335#\210\304 \336\337#\210\304 \340\341#\210\304 \342\343#\210\304 \344\345#\210 *\207" [map mainmap follow-mode-prefix make-sparse-keymap define-key "" follow-scroll-up "\366" follow-scroll-down "v" "1" follow-delete-other-windows-and-split "b" follow-switch-to-buffer "" follow-switch-to-buffer-all "\f" follow-recenter "<" follow-first-window ">" follow-last-window "n" follow-next-window "p" follow-previous-window [remap end-of-buffer] follow-end-of-buffer [remap scroll-bar-toolkit-scroll] follow-scroll-bar-toolkit-scroll [remap scroll-bar-drag] follow-scroll-bar-drag [remap scroll-bar-scroll-up] follow-scroll-bar-scroll-up [remap scroll-bar-scroll-down] follow-scroll-bar-scroll-down [remap mwheel-scroll] follow-mwheel-scroll] 4) (#$ . 991)) (defalias 'follow-menu-filter #[(menu) "\302\300!\203\f \203\f \207\303\207" [follow-mode menu boundp (["Follow mode" follow-mode :style toggle :selected follow-mode])] 2]) (byte-code "\300\301\302\303#\210\304\305\306\307\310\311\312\313&\210\304\314\301\315\310\316\312\313\317\320& \210\304\321\322\323\310\316\312\313&\207" [easy-menu-add-item nil ("Tools") ("Follow" :filter follow-menu-filter ["Scroll Up" follow-scroll-up follow-mode] ["Scroll Down" follow-scroll-down follow-mode] "--" ["Delete Other Windows and Split" follow-delete-other-windows-and-split follow-mode] "--" ["Switch To Buffer" follow-switch-to-buffer follow-mode] ["Switch To Buffer (all windows)" follow-switch-to-buffer-all follow-mode] "--" ["First Window" follow-first-window follow-mode] ["Last Window" follow-last-window follow-mode] ["Next Window" follow-next-window follow-mode] ["Previous Window" follow-previous-window follow-mode] "--" ["Recenter" follow-recenter follow-mode] "--" ["Follow mode" follow-mode :style toggle :selected follow-mode]) custom-declare-variable follow-mode-line-text " Follow" "Text shown in the mode line when Follow mode is active.\nDefaults to \" Follow\". Examples of other values\nare \" Fw\", or simply \"\"." :type string :group follow follow-auto "Non-nil activates Follow mode whenever a file is loaded." boolean :set #[(symbol value) "\203 \302\303\304\305#\210\202 \306\303\304\"\210\307 \"\207" [value symbol add-hook find-file-hook follow-find-file-hook t remove-hook set-default] 4] follow-hide-ghost-cursors t "When non-nil, Follow mode attempts to hide the obtrusive cursors\nin the non-selected windows of a window group.\n\nThis variable takes effect when `follow-mode' is initialized.\n\nDue to limitations in Emacs, this only operates on the followers\nof the selected window."] 10) #@365 List of commands that don't require recalculation. In order to be able to use the cache, a command should not change the contents of the buffer, nor should it change selected window or current buffer. The commands in this list are checked at load time. To mark other commands as suitable for caching, set the symbol property `follow-mode-use-cache' to non-nil. (defvar follow-cache-command-list '(next-line previous-line forward-char backward-char right-char left-char) (#$ . 3901)) #@50 If non-nil, emit Follow mode debugging messages. (custom-declare-variable 'follow-debug nil '(#$ . 4393) :type 'boolean :group 'follow) #@53 True when Follow mode should redisplay the windows. (defvar follow-internal-force-redisplay nil (#$ . 4535)) #@46 The menu visible when Follow mode is active. (defvar follow-active-menu nil (#$ . 4650)) #@48 The menu visible when Follow mode is inactive. (defvar follow-inactive-menu nil (#$ . 4745)) #@92 Non-nil when inside Follow modes `post-command-hook'. Used by `follow-window-size-change'. (defvar follow-inside-post-command-hook-call nil (#$ . 4844)) #@62 Cache used by `follow-window-start' and `follow-window-end'. (defvar follow-windows-start-end-cache nil (#$ . 5003)) #@108 If non-nil, the current window must not be scrolled. This is typically set by explicit scrolling commands. (defvar follow-fixed-window nil (#$ . 5127)) #@65 Like `message', but only active when `follow-debug' is non-nil. (defalias 'follow-debug-message #[(&rest args) "\302\300!\205 \205 \303\304 \"\207" [follow-debug args boundp apply message] 3 (#$ . 5285)]) (byte-code "\303\304\305\306#\210\307\211\203 \n@\303 \310\311#\210\nA\211\204 *\307\207" [follow-cache-command-list cmd --dolist-tail-- put follow-debug-message byte-optimizer byte-compile-inline-expand nil follow-mode-use-cache t] 5) #@62 Turn on Follow mode. Please see the function `follow-mode'. (defalias 'turn-on-follow-mode #[nil "\300\301!\207" [follow-mode 1] 2 (#$ . 5742)]) #@63 Turn off Follow mode. Please see the function `follow-mode'. (defalias 'turn-off-follow-mode #[nil "\300\301!\207" [follow-mode -1] 2 (#$ . 5894)]) (put 'follow-mode 'permanent-local t) #@91 Non-nil if Follow mode is enabled. Use the command `follow-mode' to change this variable. (defvar follow-mode nil (#$ . 6087)) (make-variable-buffer-local 'follow-mode) #@1448 Toggle Follow mode. If called interactively, enable Follow mode if ARG is positive, and disable it if ARG is zero or negative. If called from Lisp, also enable the mode if ARG is omitted or nil, and toggle it if ARG is `toggle'; disable the mode otherwise. Follow mode is a minor mode that combines windows into one tall virtual window. This is accomplished by two main techniques: * The windows always displays adjacent sections of the buffer. This means that whenever one window is moved, all the others will follow. (Hence the name Follow mode.) * Should point (cursor) end up outside a window, another window displaying that point is selected, if possible. This makes it possible to walk between windows using normal cursor movement commands. Follow mode comes to its prime when used on a large screen and two or more side-by-side windows are used. The user can, with the help of Follow mode, use these full-height windows as though they were one. Imagine yourself editing a large function, or section of text, and being able to use 144 or 216 lines instead of the normal 72... (your mileage may vary). To split one large window into two side-by-side windows, the commands `\[split-window-right]' or `\[follow-delete-other-windows-and-split]' can be used. Only windows displayed in the same frame follow each other. This command runs the normal hook `follow-mode-hook'. Keys specific to Follow mode: \{follow-mode-map} (defalias 'follow-mode #[(&optional arg) "\306 \307=\203 \n?\202 \310 !\311V\211\203v \312\313\314\315\211$\210\316\317\320\321B\322\323$\210\312\324\325\315#\210\312\326\327\323\315$\210\312\330\331\323\315$\210\312\332\331\323\315$\210\312\333\331\323\315$\210\203T \334\303!\210\335\f\203^ \334\305!\210\323\3363\3372\3401\3410\342/\343.\344-\202\367 \345 \323@A@\204\227 A\203\227 \346\302A@\"@AAA\202} @\204\270 \347\350\351!\322\"\211B\350\351!=\204\262 \352\351B\"\210)\353\324\325\"\210*\354\355!\210\354\356!\210\354\357!\210\354\360!\210\354\361!\210\354\362!\210\354\363!\210\354\305!\210\353\333\331\315#\210\353\332\331\315#\210\353\330\331\315#\210\353\326\327\315#\210\353\313\314\315#\210\364\365\n\203\366\202\367\"\210\370\371!\203)\306 \203\306 \232\203)\372C\373\374\n\203#\375\202$\376C#\210))\377 \210\n\207" [#1=#:last-message arg follow-mode isearch-lazy-highlight follow-hide-ghost-cursors cursor-in-non-selected-windows current-message toggle prefix-numeric-value 0 add-hook compilation-filter-hook follow-align-compilation-windows t advice--add-function :before #[nil "\300\301!\207" [default-value pre-redisplay-function] 2] #[(gv--val) "\301\302\"\207" [gv--val set-default pre-redisplay-function] 3] follow-pre-redisplay-function nil window-size-change-functions follow-window-size-change after-change-functions follow-after-change isearch-update-post-hook follow-post-command-hook replace-update-post-hook ispell-update-post-hook make-local-variable all-windows follow-window-start follow-window-end follow-set-window-start follow-recenter follow-pos-visible-in-window-p follow-all-followers follow-move-to-window-line buffer-list buffer-local-value advice--remove-function default-value pre-redisplay-function set-default remove-hook kill-local-variable move-to-window-group-line-function selected-window-group-function pos-visible-in-window-group-p-function recenter-window-group-function set-window-group-start-function window-group-end-function window-group-start-function run-hooks follow-mode-hook follow-mode-on-hook follow-mode-off-hook called-interactively-p any " in current buffer" message "Follow mode %sabled%s" "en" "dis" force-mode-line-update following buffers #2=#:new local] 6 (#$ . 6264) (list (or current-prefix-arg 'toggle))]) (defvar follow-mode-hook nil) (byte-code "\301\302N\204\f \303\301\302\304#\210\305\306\307\310\211%\207" [follow-mode-map follow-mode-hook variable-documentation put "Hook run after entering or leaving `follow-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" add-minor-mode follow-mode follow-mode-line-text nil] 6) #@66 Find-file hook for Follow mode. See the variable `follow-auto'. (defalias 'follow-find-file-hook #[nil "\205 \301\302!\207" [follow-auto follow-mode 1] 2 (#$ . 10440)]) #@468 Calculate the correct value for point after a scrolling operation. DEST is our default position, typically where point was before the scroll. If `scroll-preserve-screen-position' is non-nil and active, DEST will be in the same screen position as before the scroll. WINDOWS is the list of windows in the follow chain. This function attempts to duplicate the point placing from `window_scroll_line_based' in the Emacs core source window.c. Return the new position. (defalias 'follow-get-scrolled-point #[(dest windows) "\203\f \306N\203\f \n\207\212\nb\210i\307\310!\210iZ)\311@!r\312\216\313\f@\314\"\210\212\315 b\210\307\310!\210`,\311\316!@!r\317\216\313\f@\314\"\210\212\320\321\322\"b\210\323 \203Q `\202S `S,\nW\203 \311@!r\324\216\313\f@\314\"\210\212b\210\307\310B!\210`,\202\246 \n V\203\245 \311\316!@!r\325\216\313\f@\314\"\210\212 b\210\307\310B!\210`,\202\246 \n+\207" [scroll-preserve-screen-position this-command dest windows save-selected-window--state limitn scroll-command vertical-motion 0 internal--before-with-selected-window #[nil "\301!\207" [save-selected-window--state internal--after-with-selected-window] 2] select-window norecord window-start reverse #[nil "\301!\207" [save-selected-window--state internal--after-with-selected-window] 2] window-end nil t pos-visible-in-window-p #[nil "\301!\207" [save-selected-window--state internal--after-with-selected-window] 2] #[nil "\301!\207" [save-selected-window--state internal--after-with-selected-window] 2] limit0 dest-column] 5 (#$ . 10619)]) #@202 Scroll the text in a follow mode window chain up by ARG lines. If ARG is nil, scroll the size of the current window. This is an internal function for `follow-scroll-up' and `follow-scroll-up-window'. (defalias 'follow-scroll-up-arg #[(arg) "`\306 \3071 \310\n!\210\3110\202+ \210\3121 \313 \210\3140\202+ \210\315!\210 b\210\316\317\311\"\204 \2038 \f\320N\204; b\210\314\211*\207" [owin opoint arg scroll-preserve-screen-position this-command follow-fixed-window selected-window (end-of-buffer) scroll-up-command nil (error) follow-previous-window t select-window signal end-of-buffer scroll-command] 3 (#$ . 12178)]) #@208 Scroll the text in a follow mode window chain down by ARG lines. If ARG is nil, scroll the size of the current window. This is an internal function for `follow-scroll-down' and `follow-scroll-down-window'. (defalias 'follow-scroll-down-arg #[(arg) "`\305 !\210\n\203 \306N\204 b\210\307\211)\207" [opoint arg scroll-preserve-screen-position this-command follow-fixed-window scroll-down-command scroll-command t] 2 (#$ . 12814)]) #@378 Scroll text in a Follow mode window up by that window's size. The other windows in the window chain will scroll synchronously. If called with no ARG, the `next-screen-context-lines' last lines of the window will be visible after the scroll. If called with an argument, scroll ARG lines up. Negative ARG means scroll downward. Works like `scroll-up' when not in Follow mode. (defalias 'follow-scroll-up-window #[(&optional arg) "\204 \302 !\207 \303=\203 \304 \207\305 !\207" [follow-mode arg scroll-up-command - follow-scroll-down-window follow-scroll-up-arg] 2 (#$ . 13257) "P"]) (put 'follow-scroll-up-window 'scroll-command t) #@394 Scroll text in a Follow mode window down by that window's size. The other windows in the window chain will scroll synchronously. If called with no ARG, the `next-screen-context-lines' top lines of the window in the chain will be visible after the scroll. If called with an argument, scroll ARG lines down. Negative ARG means scroll upward. Works like `scroll-down' when not in Follow mode. (defalias 'follow-scroll-down-window #[(&optional arg) "\204 \302 !\207 \303=\203 \304 \207\305 !\207" [follow-mode arg scroll-down-command - follow-scroll-up-window follow-scroll-down-arg] 2 (#$ . 13900) "P"]) (put 'follow-scroll-down-window 'scroll-command t) #@318 Scroll text in a Follow mode window chain up. If called with no ARG, the `next-screen-context-lines' last lines of the bottom window in the chain will be visible in the top window. If called with an argument, scroll ARG lines up. Negative ARG means scroll downward. Works like `scroll-up' when not in Follow mode. (defalias 'follow-scroll-up #[(&optional arg) "\204 \306 !\207 \203 \307 !\207\310 \311\312\n!@!\211d=\2034 \f\203( m\203/ \313\314\315\"\202J db\202J \316\n@!\210\203@ b\210\317 [!\210\320\n@`\"*\207" [follow-mode arg windows end scroll-error-top-bottom next-screen-context-lines scroll-up-command follow-scroll-up-arg follow-all-followers window-end reverse signal end-of-buffer nil select-window vertical-motion set-window-start] 4 (#$ . 14565) "P"]) (put 'follow-scroll-up 'scroll-command t) #@321 Scroll text in a Follow mode window chain down. If called with no ARG, the `next-screen-context-lines' top lines of the top window in the chain will be visible in the bottom window. If called with an argument, scroll ARG lines down. Negative ARG means scroll upward. Works like `scroll-down' when not in Follow mode. (defalias 'follow-scroll-down #[(&optional arg) "\204 \306 !\207 \203 \307 !\207\310 \311\n!@\312\n@!\211e=\2037 \203+ o\2032 \313\314\315\"\202e eb\202e \316!\210\fb\210\317\320\321!\203L \322\202M \323#[!\210\324`\"\210\fb\210\317S!\210\325\211+\207" [follow-mode arg windows win start scroll-error-top-bottom scroll-down-command follow-scroll-down-arg follow-all-followers reverse window-start signal beginning-of-buffer nil select-window vertical-motion - window-height 2 1 set-window-start t header-line-format next-screen-context-lines follow-internal-force-redisplay] 6 (#$ . 15392) "P"]) (put 'follow-scroll-down 'scroll-command t) #@122 Scroll the bottom-most window in the current Follow chain. This is to be called by `comint-postoutput-scroll-to-bottom'. (defalias 'follow-comint-scroll-to-bottom #[(&optional _window) "p\306 \307 =\310\n\204 \311 \211\205F \312\310!\210`\n\203% \202+ \313\314!!@\315 !\210\fb\210\310\316 !\210\n?\205E \315 !\210q*,\207" [buffer selected is-selected some-window pos win selected-window window-buffer nil get-buffer-window comint-adjust-point last follow-all-followers select-window follow-adjust-window follow-windows-start-end-cache] 3 (#$ . 16377)]) #@107 Align the windows of the current Follow mode buffer. This is to be called from `compilation-filter-hook'. (defalias 'follow-align-compilation-windows #[nil "p\306 \307 \205>