;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (byte-code "\300\301!\210\302\303\304\305\306\307%\210\310\311\312\313\314DD\315\316\317%\210\310\320\312\313\321DD\322\316\323%\207" [require dbus custom-declare-group gpastel nil "Configure GPaste integration." :group environment custom-declare-variable gpastel-gpaste-client-command funcall function #[0 "\300\207" [#1="gpaste-client"] 1 #1#] "GPaste client name or path." :type string gpastel-update-hook #[0 "\300\207" [nil] 1] "Hook which runs after gpastel added an element to `kill-ring'.\n\nHook functions can retrieve the latest entry by accessing the\n`car' of `kill-ring'." hook] 6) #@118 D-Bus object remembering the return value of `dbus-register-signal'. This can be used to unregister from the signal. (defvar gpastel--dbus-object nil (#$ . 683)) #@73 Value of `save-interprogram-paste-before-kill' before starting gpastel. (defvar gpastel--save-interprogram-paste-before-kill-orig nil (#$ . 851)) #@57 List of arguments referencing GPaste for the D-Bus API. (defconst gpastel--dbus-arguments '(:session "org.gnome.GPaste" "/org/gnome/GPaste" "org.gnome.GPaste1") (#$ . 1003)) #@225 Return non-nil if gpastel should do anything about an event. The event is represented by the D-Bus parameters of the Update signal (i.e., ACTION, TARGET and INDEX). See `gpastel--update-handler'. (fn ACTION TARGET INDEX) (defalias 'gpastel--handle-event-p #[771 "\300\230\205 \211\301U\207" ["REPLACE" 0] 5 (#$ . 1184)]) #@514 Update `kill-ring' when GPaste's clipboard is changing. The function parameters are the one defined in the "Update" signal sent by GPaste: - ACTION is a string representing how things have changed; - TARGET is a clipboard name - INDEX is a number indicating which element in the clipboard changed (usually 0) This handler is executed each time GPaste changes the clipboard's content. The handler makes sure that the `kill-ring' contains all text in the GPaste clipboard. (fn ACTION TARGET INDEX) (defalias 'gpastel--update-handler #[771 "\302#\205\303\304 \211 @\230?\205\305!\210\306\307!)\266\202\207" [interprogram-cut-function kill-ring gpastel--handle-event-p nil gpastel-get-copied-text kill-new run-hooks gpastel-update-hook] 7 (#$ . 1517)]) #@58 (Re)Start GPaste daemon and return non-nil upon success. (defalias 'gpastel--start-gpaste-daemon #[0 "\3011\302\303\211\211\304%0\202\210\305\306U\207" [gpastel-gpaste-client-command (error) call-process nil "daemon-reexec" 1 0] 6 (#$ . 2299)]) #@85 Call FUNCTION passing `gpastel--dbus-arguments' and ARGS. (fn FUNCTION &rest ARGS) (defalias 'gpastel-dbus-call #[385 "\301\302\"\"\207" [gpastel--dbus-arguments apply append] 7 (#$ . 2555)]) #@71 Return GPaste clipboard content at INDEX, or 0. (fn &optional INDEX) (defalias 'gpastel-get-copied-text #[256 "\300\301\302\303\206 \304$\207" [gpastel-dbus-call dbus-call-method "GetElement" :uint64 0] 6 (#$ . 2757)]) #@36 Start listening for GPaste events. (defalias 'gpastel--start-listening #[0 "\304 \205\305\306\307#\210 \310\311\312\313\314#\211\207" [interprogram-paste-function save-interprogram-paste-before-kill gpastel--save-interprogram-paste-before-kill-orig gpastel--dbus-object gpastel--start-gpaste-daemon advice-add :override ignore nil gpastel-dbus-call dbus-register-signal "Update" gpastel--update-handler] 4 (#$ . 2985)]) #@35 Stop listening for GPaste events. (defalias 'gpastel--stop-listening #[0 "\304!\205\305 \306 \307\"\207" [gpastel--dbus-object gpastel--save-interprogram-paste-before-kill-orig save-interprogram-paste-before-kill interprogram-paste-function dbus-unregister-object nil advice-remove ignore] 3 (#$ . 3417)]) (byte-code "\300\301\302\303\304DD\305\306\307\310\311\312\313& \207" [custom-declare-variable gpastel-mode funcall function #[0 "\300\207" [nil] 1] "Non-nil if Gpastel mode is enabled.\nSee the `gpastel-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 `gpastel-mode'." :set custom-set-minor-mode :initialize custom-initialize-default :type boolean] 10) #@591 Listen to GPaste events. This is a minor mode. If called interactively, toggle the `Gpastel 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 'gpastel-mode)'. The mode's hook is called both when the mode is enabled and when it is disabled. (fn &optional ARG) (defalias 'gpastel-mode #[256 "\302 \303\301\304=\203\305\301!?\202!\247\203 \306W\203 \307\202!\310\"\210\311\300!\2038\312\301\"\305\301!\2038\301B \203B\313 \210\202E\314 \210\315\316\305\301!\203Q\317\202R\320\"\210\321\322!\203z\323\301!\210\302 \203j\211\302 \232\203z\324\325\305\301!\203v\326\202w\327\330#\210\210\331 \210\305\301!\207" [global-minor-modes gpastel-mode current-message set-default toggle default-value 1 nil t boundp delq gpastel--start-listening gpastel--stop-listening run-hooks gpastel-mode-hook gpastel-mode-on-hook gpastel-mode-off-hook called-interactively-p any customize-mark-as-set message "Gpastel mode %sabled%s" "en" "dis" "" force-mode-line-update] 6 (#$ . 4231) (byte-code "\203\n\301!\202 \302C\207" [current-prefix-arg prefix-numeric-value toggle] 2)]) (defvar gpastel-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%\210\314\315\310\316\317\320%\210\314\315\321\322\310\323%\210\324\325!\207" [gpastel-mode-map gpastel-mode-hook variable-documentation put "Hook run after entering or leaving `gpastel-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 gpastel-mode boundp cl-generic-define-method gui-backend-set-selection (selection-symbol value &context (window-system nil)) t #[771 "\203\n\301=\204  \207\302\303\304#\207" [gpastel-mode CLIPBOARD gpastel-dbus-call dbus-call-method "Add"] 7 "\n\n(fn CL--CNM SELECTION-SYMBOL VALUE)"] (:extra "gpastel-override") (selection-symbol value &context (window-system nil) ((terminal-parameter nil 'xterm--set-selection) (eql t))) #[514 "\300\301\302\301#\210\303\"\207" [set-terminal-parameter nil xterm--set-selection gui-backend-set-selection] 6 "\n\n(fn SELECTION-SYMBOL VALUE)"] provide gpastel] 6)