;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. #@107 The current frame's windows and their buffers. This is an alist mapping windows to their current buffers. (defvar winpoint-frame-windows nil (#$ . 88)) (make-variable-frame-local 'winpoint-frame-windows) #@159 The current frame's windows and their associated buffer positions. This is an alist mapping windows to an alist mapping buffers to their stored point marker. (defvar winpoint-frame-positions nil (#$ . 299)) (byte-code "\300\301!\210\302\303\304\"\210\305\304\306\307\310\311\312\313\314\315& \207" [make-variable-frame-local winpoint-frame-positions defalias window-point-remember-mode winpoint-mode custom-declare-variable nil "Non-nil if Winpoint mode is enabled.\nSee the `winpoint-mode' command\nfor a description of this minor mode.\nSetting this variable directly does not take effect;\neither customize it (see the info node `Easy Customization')\nor call the function `winpoint-mode'." :set custom-set-minor-mode :initialize custom-initialize-default :type boolean] 10) #@829 Remember positions in a buffer per-window, not per-buffer. That is, when you have the same buffer open in two different windows, and you switch the buffer in one window and back again, the position is the same as it was when you switched away, not the same as in the other window. This is a minor mode. If called interactively, toggle the `Winpoint mode' mode. If the prefix argument is positive, enable the mode, and if it is zero or negative, disable the mode. If called from Lisp, toggle the mode if ARG is `toggle'. Enable the mode if ARG is nil, omitted, or is a positive number. Disable the mode if ARG is a negative number. To check whether the minor mode is enabled in the current buffer, evaluate `(default-value 'winpoint-mode)'. The mode's hook is called both when the mode is enabled and when it is disabled. (defalias 'winpoint-mode #[(&optional arg) "\305 \306\303 \307=\203\310\303!?\202\" \247\203! \311W\203!\312\202\"\313\"\210\314\302!\2039\315\303\n\"\310\303!\2039\303\nB \203J\316\317\320\"\210\316\321\322\"\210\202T\323\317\320\"\210\323\321\322\"\210\324\325\310\303!\203`\326\202a\327\"\210\330\331!\203\214\332\303!\210\305 \203y\305 \232\203\214\333\334\335\310\303!\203\207\336\202\210\337\f#\210))\340 \210\310\303!\207" [#1=#:last-message arg global-minor-modes winpoint-mode local current-message set-default toggle default-value 1 nil t boundp delq add-hook post-command-hook winpoint-remember window-configuration-change-hook winpoint-remember-configuration remove-hook run-hooks winpoint-mode-hook winpoint-mode-on-hook winpoint-mode-off-hook called-interactively-p any customize-mark-as-set "" message "Winpoint mode %sabled%s" "en" "dis" force-mode-line-update] 4 (#$ . 1084) (list (if current-prefix-arg (prefix-numeric-value current-prefix-arg) 'toggle))]) (defvar winpoint-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\303\301\305\306#\210\303\301\307\310C#\210\311\312\310\313\300!\205#\310\211%\207" [winpoint-mode-map winpoint-mode-hook variable-documentation put "Hook run after entering or leaving `winpoint-mode'.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" custom-type hook standard-value nil add-minor-mode winpoint-mode boundp] 6) #@95 Remember the currently visible buffer's positions. This should be put on `post-command-hook'. (defalias 'winpoint-remember #[nil "\300\301!\207" [walk-windows #[(win) "\302!\303 \304!#)\207" [win buf window-buffer winpoint-put window-point] 5]] 2 (#$ . 3404)]) #@166 This remembers the currently shown windows. If any buffer wasn't shown before, point in that window is restored. If any window isn't shown anymore, forget about it. (defalias 'winpoint-remember-configuration #[nil "\301 \210\302\303\304 \"\211\207" [winpoint-frame-windows winpoint-clean mapcar #[(win) " \236\304!\211\203 A\n=\204\305!\210\n*B\207" [win winpoint-frame-windows newbuf old window-buffer winpoint-restore] 4] window-list] 3 (#$ . 3676)]) #@34 Restore point in the window WIN. (defalias 'winpoint-restore #[(win) "\303!r\304\216\305 @\306\"\210\307p\"\211\205\nb,\207" [win save-selected-window--state point internal--before-with-selected-window #[nil "\301!\207" [save-selected-window--state internal--after-with-selected-window] 2] select-window norecord winpoint-get] 4 (#$ . 4146)]) #@55 Return a cons cell of the stored point of BUF in WIN. (defalias 'winpoint-get #[(win buf) " \236\211\205 \nA\236\211\205\fA))\207" [win winpoint-frame-positions window-entry buf buffer] 3 (#$ . 4502)]) #@50 Store POINT as the current point for BUF in WIN. (defalias 'winpoint-put #[(win buf point) " \236\211\203) \nA\236\211\203\fA \223\202%\n \306 \223B\nAB\241)\2026 \306 \223BD B\211)\207" [win winpoint-frame-positions window-entry buf buffer point make-marker] 6 (#$ . 4717)]) #@25 Remove unknown windows. (defalias 'winpoint-clean #[nil "\302 \303\304 \"\211)\207" [windows winpoint-frame-positions window-list filter-map! #[(entry) "\302\303A\"\211??\205@ B)\207" [entry bufs filter! #[(buf+pos) "\301@!\207" [buf+pos buffer-live-p] 2]] 4]] 3 (#$ . 5014)]) #@52 Map FUN over LIST, retaining all non-nil elements. (defalias 'filter-map! #[(fun list) "\203 @!\240\204A\211\204\203;A\203:A A@!\240\2043\211AA\241\210\202A\211\202)\207" [list fun] 4 (#$ . 5305)]) #@99 Return all elements of LIST for which PRED returns non-nil. This modifies LIST whenever possible. (defalias 'filter! #[(pred list) "\203 @!\204A\211\204\2036A\2035 A@!\204.\211AA\241\210\202A\211\202)\207" [list pred] 3 (#$ . 5537)]) (provide 'winpoint)