;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\300\302!\210\300\303!\210\300\304!\210\305\306\307\310\311DD\312\313\314\315\316&\207" [require cl-lib haskell-session haskell-process haskell-interactive-mode custom-declare-variable haskell-menu-buffer-name funcall function #[0 "\300\207" [#1="*haskell-menu*"] 1 #1#] "The name of the Haskell session menu buffer" :group haskell-interactive :type string] 8) #@35 Launch the Haskell sessions menu. (defalias 'haskell-menu #[0 "\301!\204r\302!q\210\303 \210)\304\301!!\210\305\306\211\"\207" [haskell-menu-buffer-name get-buffer get-buffer-create haskell-menu-mode switch-to-buffer-other-window haskell-menu-revert-function nil] 3 (#$ . 474) nil]) #@33 Keymap for `haskell-menu-mode'. (defvar haskell-menu-mode-map (byte-code "\300 \301\302\303#\210\301\304\305#\210\301\306\307#\210\207" [make-sparse-keymap define-key "n" next-line "p" previous-line " " haskell-menu-mode-ret] 5) (#$ . 768)) (defvar haskell-menu-mode-hook nil) (byte-code "\300\301N\204\f\302\300\301\303#\210\304\305!\204\302\305\306\307#\210\300\207" [haskell-menu-mode-hook variable-documentation put "Hook run after entering Haskell Session Menu mode.\nNo problems result if this variable is not bound.\n`add-hook' automatically binds it. (This is true for all hook variables.)" boundp haskell-menu-mode-map definition-name haskell-menu-mode] 4) (defvar haskell-menu-mode-map (make-sparse-keymap)) (byte-code "\301\302N\204\303\301\302\304\305!#\210\306\307!\204\303\307\310\311#\210\312\313 !\210\307\302N\204-\303\307\302\304\314!#\210\306\300!\204B\303\300\310\311#\210\315\316\300\317\"\210!\210\300\302N\204P\303\300\302\304\320!#\210\303\311\321\322#\207" [haskell-menu-mode-abbrev-table haskell-menu-mode-map variable-documentation put purecopy "Keymap for `haskell-menu-mode'." boundp haskell-menu-mode-syntax-table definition-name haskell-menu-mode (lambda (#1=#:def-tmp-var) (defvar haskell-menu-mode-syntax-table #1#)) make-syntax-table "Syntax table for `haskell-menu-mode'." (lambda (#1#) (defvar haskell-menu-mode-abbrev-table #1#)) define-abbrev-table nil "Abbrev table for `haskell-menu-mode'." derived-mode-parent special-mode] 5) #@343 Major mode for managing Haskell sessions. Each line describes one session. Letters do not insert themselves; instead, they are commands. In addition to any hooks its parent mode `special-mode' might have run, this mode runs the hook `haskell-menu-mode-hook', as the final or penultimate step during initialization. \{haskell-menu-mode-map} (defalias 'haskell-menu-mode #[0 "\306\300!\210\307\310 \210\311\312\310\313N\203\314\311\313\310\313N#\210\315 !\204'\316 \317 \"\210\320\f!\211\2035\211\321 =\203;\322\f\323 \"\210\210\324 \325\"\204R =\204R\326 \325C#\210\327 !\210\330\f!\210 \307\306\331!\210\332\307 \332\333\307\"\210)\334\335!\207" [delay-mode-hooks major-mode mode-name haskell-menu-mode-map haskell-menu-mode-syntax-table haskell-menu-mode-abbrev-table make-local-variable t special-mode haskell-menu-mode "Haskell Session Menu" mode-class put keymap-parent set-keymap-parent current-local-map char-table-parent standard-syntax-table set-char-table-parent syntax-table abbrev-table-get :parents abbrev-table-put use-local-map set-syntax-table revert-buffer-function haskell-menu-revert-function nil run-mode-hooks haskell-menu-mode-hook local-abbrev-table buffer-read-only truncate-lines] 5 (#$ . 2258) nil]) (suppress-keymap haskell-menu-mode-map t) #@50 Function to refresh the display. (fn ARG1 ARG2) (defalias 'haskell-menu-revert-function #[514 "\302\303 i \304=\204\302\305 \210\306 \210eb\210Sy\210\211u)\207" [buffer-read-only buffer-undo-list nil line-number-at-pos t erase-buffer haskell-menu-insert-menu] 7 (#$ . 3554)]) #@57 Insert the Haskell sessions menu to the current buffer. (defalias 'haskell-menu-insert-menu #[0 "\204\301c\207\302\303\304\305\306\307\310\311\257\312\313\"\"\207" [haskell-sessions "No Haskell sessions." haskell-menu-tabulate "Name" "PID" "Time" "RSS" "Cabal directory" "Working directory" "Command" mapcar #[257 "\300\301!!\211\203h\302!\303\304!\305\306#\307!\203\310!\202 \311\307!\203=\312\313\314\315\316!\236AA@\317\211\211\211\211&\"\202>\311\307!\203T\310\320\316!\236A\321\245!\322P\202U\311\323!\324!\325\326\327\n!\330#\257\207\303\304!\305\306#\331\211\211\323!\324!\257\207" [haskell-process-process haskell-session-process process-id propertize haskell-session-name face buffer-menu-buffer process-live-p number-to-string "-" format-time-string "%H:%M:%S" encode-time etime process-attributes 0 rss 1024 "MB" haskell-session-cabal-dir haskell-session-current-dir mapconcat identity process-command " " "—"] 14 "\n\n(fn SESSION)"]] 8 (#$ . 3843)]) #@88 Prints a list of lists as a formatted table to the current buffer. (fn HEADINGS ROWS) (defalias 'haskell-menu-tabulate #[514 "G\301\302\"\211\203E\211@\303\302\211W\2035\211\21188GT] 8GT]B\262\210\211T\262\202\266\304!\262\262A\266\202\202\210\305\306\307\310#\302\211W\203o\211\311\312\313 8!\314Q 8\"P\262\210\211T\262\202M\266\211\205\247\211@\302\211W\203\233\211\311\312\313 8!\314Q8\"c\266\211T\262\202{\266\315c\210A\266\202\202s\207" [header-line-format make-list 0 nil reverse propertize " " display (space :align-to 0) format "%-" number-to-string "s" "\n"] 14 (#$ . 4850)]) #@17 Handle RET key. (defalias 'haskell-menu-mode-ret #[0 "\212\301 b\210\302`\303\304!\210\305u\210`\")\306\307\310\"\"@\311\312!!\207" [haskell-sessions line-beginning-position buffer-substring-no-properties search-forward " " -1 cl-remove-if-not make-closure #[257 "\301!\300\230\207" [V0 haskell-session-name] 3 "\n\n(fn SESSION)"] switch-to-buffer haskell-session-interactive-buffer] 5 (#$ . 5497) nil]) (provide 'haskell-menu)