;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. (require 'cl-lib) (defvar inhibit-message nil) #@118 When non-nil, do not hide output inside `shut-up'. Changes to this variable inside a `shut-up' block has no effect. (defvar shut-up-ignore nil (#$ . 135)) (byte-code "\300\301!\204 \301\302KM\210\300\207" [fboundp shut-up-write-region-original write-region] 2) #@123 Like `write-region', but try to suppress any messages. (fn START END FILENAME &optional APPEND VISIT LOCKNAME MUSTBENEW) (defalias 'shut-up-write-region #[1795 "\204\300\262\301&\207" [no-message shut-up-write-region-original] 15 (#$ . 405)]) (byte-code "\300\301!\204 \301\302KM\210\300\207" [fboundp shut-up-load-original load] 2) #@104 Like `load', but try to be quiet about it. (fn FILE &optional NOERROR NOMESSAGE NOSUFFIX MUST-SUFFIX) (defalias 'shut-up-load #[1281 "\300\301%\207" [shut-up-load-original :nomessage] 11 (#$ . 766)]) #@127 Get the contents of BUFFER. When BUFFER is alive, return its contents without properties. Otherwise return nil. (fn BUFFER) (defalias 'shut-up-buffer-string #[257 "\300!\205r\211q\210\301ed\")\207" [buffer-live-p buffer-substring-no-properties] 4 (#$ . 978)]) #@84 Insert OBJECT into BUFFER. If BUFFER is not live, do nothing. (fn OBJECT BUFFER) (defalias 'shut-up-insert-to-buffer #[514 "\300!\205&r\211q\210\301!\203\302\303\"\202%;\203!c\202%\304\302\")\207" [buffer-live-p natnump insert-char 1 princ] 5 (#$ . 1249)]) #@557 Evaluate BODY with silenced output. While BODY is evaluated, all output is redirected to a buffer, unless `shut-up-ignore' is non-nil. This affects: - `message' - All functions using `standard-output' (e.g. `print', `princ', etc.) Inside BODY, the buffer is bound to the lexical variable `shut-up-sink'. Additionally provide a lexical function `shut-up-current-output', which returns the current contents of `shut-up-sink' when called with no arguments. Changes to the variable `shut-up-ignore' inside BODY does not have any affect. (fn &rest BODY) (defalias 'shut-up '(macro . #[128 "\300\301\302\303\304\305\306B\307\310\311\nBB\312BBFEE\207" [let ((shut-up-sink (generate-new-buffer " *shutup*")) (inhibit-message t)) cl-labels ((shut-up-current-output nil (or (shut-up-buffer-string shut-up-sink) ""))) if shut-up-ignore progn unwind-protect cl-letf ((standard-output (lambda (char) (shut-up-insert-to-buffer char shut-up-sink))) ((symbol-function 'message) (lambda (fmt &rest args) (when fmt (let ((text (concat (apply #'format fmt args) "\n"))) (shut-up-insert-to-buffer text shut-up-sink))))) ((symbol-function 'write-region) #'shut-up-write-region) ((symbol-function 'load) #'shut-up-load)) ((and (buffer-name shut-up-sink) (kill-buffer shut-up-sink)))] 12 (#$ . 1527)])) (byte-code "\300\301\302\303#\300\207" [function-put shut-up lisp-indent-function 0] 4) #@176 Silence Emacs. Change Emacs settings to reduce the output. WARNING: This function has GLOBAL SIDE-EFFECTS. You should only call this function in `noninteractive' sessions. (defalias 'shut-up-silence-emacs #[0 "\300\301\302\"\210\303\304\305\"\207" [remove-hook find-file-hooks vc-find-file-hook eval-after-load "dired" #[0 "\301\211\207" [dired-use-ls-dired nil] 2]] 3 (#$ . 2912)]) (provide 'shut-up)