;ELC ;;; Compiled ;;; in Emacs version 26.3 ;;; 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. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; #@60 Non-nil if we just set the prefix in the previous command. (defvar ofw--just-set nil (#$ . 408)) #@61 Keymap used for one command right after setting the prefix. (defvar ofw-transient-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307\310!\203\310\202\311#\210\301\312\313#\210\301\314\315#\210\301\316\317#\210\301\320\321#\210\301\322\323#\210\301\324\325#\210\301\326\327#\210\301\330\303#\210\301\331\332#\210\301\333\334#\210\301\335\336#\210\211\207" [make-sparse-keymap define-key [6] find-file [15] display-buffer [46] fboundp xref-find-definitions find-tag [48] ofw-dwim-delete-this [49] ofw-dwim-one [50] ofw-dwim-open-other [97] add-change-log-entry [98] switch-to-buffer [99] clone-indirect-buffer [100] dired [102] [109] compose-mail [111] ofw-dwim-select-other [114] find-file-read-only] 6) (#$ . 511)) #@42 Add ofw prefix function FUNC. (fn FUNC) (defalias 'ofw--set-prefix #[257 "\305 \210@AB\262B\306\307!\203\307 \210\202 \310\n\311\f!\207" [display-buffer-overriding-action ofw--just-set current-prefix-arg prefix-arg ofw-transient-map ofw-delete-from-overriding fboundp prefix-command-preserve-state t set-transient-map] 5 (#$ . 1267)]) (defalias 'ofw--echo-keystrokes #[0 ":\205 @<\205 @\301>\203\302\202\303>\205\304\262\207" [display-buffer-overriding-action ofw-display-buffer-other-frame "[other-frame]" ofw-display-buffer-other-window "[other-window]"] 3]) (byte-code "\300\301!\203 \302\301\303\"\210\300\207" [boundp prefix-command-echo-keystrokes-functions add-hook ofw--echo-keystrokes] 3) (defalias 'ofw--preserve-state #[0 "\301\211\207" [ofw--just-set t] 2]) (byte-code "\300\301!\203 \302\301\303\"\210\300\207" [boundp prefix-command-preserve-state-hook add-hook ofw--preserve-state] 3) #@83 Remove ourselves from `display-buffer-overriding-action' action list, if present. (defalias 'ofw-delete-from-overriding #[0 "@A\301\302\301\303\"\"\262\204\211\205B\211\207" [display-buffer-overriding-action remq ofw-display-buffer-other-frame ofw-display-buffer-other-window] 7 (#$ . 2204)]) #@66 Set `display-buffer-overriding-action' to indicate other window. (defalias 'ofw-other-window #[0 "\300\301!\207" [ofw--set-prefix ofw-display-buffer-other-window] 2 (#$ . 2515) nil]) #@65 Set `display-buffer-overriding-action' to indicate other frame. (defalias 'ofw-other-frame #[0 "\300\301!\207" [ofw--set-prefix ofw-display-buffer-other-frame] 2 (#$ . 2704) nil]) #@211 Show BUFFER in another window in the current frame, creating new window if needed and allowed. If successful, return window; else return nil. Intended for `display-buffer-overriding-action'. (fn BUFFER ALIST) (defalias 'ofw-display-buffer-other-window #[514 "\300 \210\301\302\303\304B\305D\"\"\206\306\"\207" [ofw-delete-from-overriding display-buffer-use-some-frame append frame-predicate #[257 "\211\300 =\207" [selected-frame] 3 "\n\n(fn FRAME)"] (inhibit-same-window . t) display-buffer-pop-up-window] 7 (#$ . 2891)]) #@178 Show BUFFER in another frame, creating a new frame if needed. If successful, return window; else return nil. Intended for `display-buffer-overriding-action'. (fn BUFFER ALIST) (defalias 'ofw-display-buffer-other-frame #[514 "\300 \210\301\"\206\302\"\207" [ofw-delete-from-overriding display-buffer-use-some-frame display-buffer-pop-up-frame] 5 (#$ . 3428)]) #@192 Change `switch-to-buffer' to call `pop-to-buffer'. This allows `switch-to-buffer' to respect `ofw-other-window', `ofw-other-frame'. (fn ORIG-FUN BUFFER &optional NORECORD FORCE-SAME-WINDOW) (defalias 'ofw-switch-to-buffer-advice #[1026 "\203 \301\302C#\207#\207" [display-buffer-overriding-action pop-to-buffer display-buffer-same-window] 8 (#$ . 3801)]) #@106 Call ORIG-FUNC without any ofw actions on `display-buffer-overriding-action'. (fn ORIG-FUNC &rest ARGS) (defalias 'ofw--suspend-and-restore #[385 "\301 \210\302\")\207" [display-buffer-overriding-action ofw-delete-from-overriding apply] 5 (#$ . 4172)]) #@83 Move current buffer to another window in same frame. Point stays in moved buffer. (defalias 'ofw-move-to-other-window #[0 "p\300\301\302\"\210\303\304\305\306B\307DB\"\207" [switch-to-prev-buffer nil bury pop-to-buffer (display-buffer-use-some-frame display-buffer-pop-up-window) frame-predicate #[257 "\211\300 =\207" [selected-frame] 3 "\n\n(fn FRAME)"] (inhibit-same-window . t)] 6 (#$ . 4436) nil]) #@80 Move current buffer to a window in another frame. Point stays in moved buffer. (defalias 'ofw-move-to-other-frame #[0 "p\300\301\302\"\210\303\304\305B\"\207" [switch-to-prev-buffer nil bury pop-to-buffer (display-buffer-use-some-frame display-buffer-pop-up-frame) ((reusable-frames . visible))] 5 (#$ . 4846) nil]) #@54 Local keymap used for other-frame-window minor mode. (defvar other-frame-window-mode-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\301\310\311#\210\211\207" [make-sparse-keymap define-key "7" ofw-other-window "9" ofw-other-frame "W" ofw-move-to-other-window "F" ofw-move-to-other-frame] 5) (#$ . 5169)) (defalias 'ofw--reset-prefix #[0 "\203\301\211\207\302 \207" [ofw--just-set nil ofw-delete-from-overriding] 2]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313\314\315& \207" [custom-declare-variable other-frame-window-mode funcall function #[0 "\300\207" [nil] 1] "Non-nil if Other-Frame-Window mode is enabled.\nSee the `other-frame-window-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 `other-frame-window-mode'." :set custom-set-minor-mode :initialize custom-initialize-default :group other-frame-window :type boolean] 12) #@1135 Minor mode for other frame/window buffer placement. Enable mode if ARG is positive. \[ofw-other-window] causes a buffer displayed by to appear in another window in the same frame; a window is created if necessary. \[ofw-other-frame] causes a buffer displayed by to appear in another frame; a frame is created if necessary. \[ofw-move-to-other-window] moves the current buffer to another window in the same frame. \[ofw-move-to-other-frame] moves the current buffer to another frame. In addition, \[ofw-other-window] and \[ofw-other-frame] can be followed by these keys: 0 - deletes the current window/frame 1 - deletes the other windows/frames. 2 - shows another view of the current buffer in a new window/frame. a - creates a commit log entry for the current defun in another window/frame. b - switches to another buffer in another window/frame. d - start dired in another window/frame. f - find-file in another window/frame. m - compose mail in another window/frame. o - select another window/frame. r - find-file-read-only in another window/frame. (fn &optional ARG) (defalias 'other-frame-window-mode #[256 "\302 \303\300\304=\203\305\300!?\202\306!\307V\"\210\310\311\312\"\210\203D\313\311\312\"\210 @ A\314B\262B\266\315\316\317\320#\210\315\321\317\322#\210\202^ @ A\323\324\"\262B\266\325\316\320\"\210\325\321\322\"\210\326\327\305\300!\203j\330\202k\331\"\210\332\333!\203\225\334\300!\210\302 \203\203\211\302 \232\203\225\335\336\337\305\300!\203\220\340\202\221\341#\266\210\342 \210\305\300!\207" [other-frame-window-mode display-buffer-base-action current-message set-default toggle default-value prefix-numeric-value 0 remove-hook pre-command-hook ofw--reset-prefix add-hook (reusable-frames . visible) advice-add switch-to-buffer :around ofw-switch-to-buffer-advice read-from-minibuffer ofw--suspend-and-restore delq (reusable-frames . visible) advice-remove run-hooks other-frame-window-mode-hook other-frame-window-mode-on-hook other-frame-window-mode-off-hook called-interactively-p any customize-mark-as-set "" message "Other-Frame-Window mode %sabled%s" "en" "dis" force-mode-line-update] 7 (#$ . 6205) (byte-code "\206\301C\207" [current-prefix-arg toggle] 1)]) (defvar other-frame-window-mode-hook nil) (byte-code "\301\302N\204\f\303\301\302\304#\210\305\306\307\310\300!\205\307\211%\210\311\312!\204%\313\312\314\"\210\307\207" [other-frame-window-mode-map other-frame-window-mode-hook variable-documentation put "Hook run after entering or leaving `other-frame-window-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 other-frame-window-mode nil boundp fboundp display-buffer-use-some-frame defalias #[514 "\301\236A\206\302\303!@\211\205\304\305\306\236A#\211\2050\307\310%\311\236A\2040\312!\210\207" [display-buffer-mark-dedicated frame-predicate #[257 "\211\300 =?\205\301\302!\206\303!!?\207" [selected-frame window-dedicated-p get-lru-window frame-first-window] 4 "\n\n(fn FRAME)"] filtered-frame-list get-lru-window nil inhibit-same-window window--display-buffer frame inhibit-switch-frame window--maybe-raise-frame] 11 "Display BUFFER in an existing frame that meets a predicate\n(by default any frame other than the current frame). If\nsuccessful, return the window used; otherwise return nil.\n\nIf ALIST has a non-nil `inhibit-switch-frame' entry, avoid\nraising the frame.\n\nIf ALIST has a non-nil `frame-predicate' entry, its value is a\nfunction taking one argument (a frame), returning non-nil if the\nframe is a candidate; this function replaces the default\npredicate.\n\nIf ALIST has a non-nil `inhibit-same-window' entry, avoid using\nthe currently selected window (only useful with a frame-predicate\nthat allows the selected frame).\n\n(fn BUFFER ALIST)"]] 6) #@71 Return non-nil if the prefix is for "other-frame" rather than window. (defalias 'ofw-dwim--frame-p #[0 "\301@>\207" [display-buffer-overriding-action ofw-display-buffer-other-frame] 2 (#$ . 10149)]) #@30 Delete this frame or window. (defalias 'ofw-dwim-delete-this #[0 "\300\301 \203\n\302\202 \303!\207" [call-interactively ofw-dwim--frame-p delete-frame kill-buffer-and-window] 2 (#$ . 10355) nil]) #@37 Delete all other frames or windows. (defalias 'ofw-dwim-one #[0 "\300\301 \203\n\302\202 \303!\207" [call-interactively ofw-dwim--frame-p delete-other-frames delete-other-windows] 2 (#$ . 10560) nil]) #@47 Show current buffer in other frame or window. (defalias 'ofw-dwim-open-other #[0 "\300 \203 \301\302!\207\303p!\207" [ofw-dwim--frame-p call-interactively make-frame-command display-buffer] 2 (#$ . 10769) nil]) #@31 Select other frame or window. (defalias 'ofw-dwim-select-other #[0 "\300\301 \203\n\302\202 \303!\207" [call-interactively ofw-dwim--frame-p other-frame other-window] 2 (#$ . 10987) nil]) (provide 'other-frame-window)