;ELC ;;; Compiled ;;; in Emacs version 28.0.50 ;;; with all optimizations. #@44 The executable to use for formatting HTML. (defvar web-beautify-html-program "html-beautify" (#$ . 87)) #@43 The executable to use for formatting CSS. (defvar web-beautify-css-program "css-beautify" (#$ . 197)) #@59 The executable to use for formatting JavaScript and JSON. (defvar web-beautify-js-program "js-beautify" (#$ . 305)) (defconst web-beautify-args '("-f" "-")) #@46 Construct a message about PROGRAM not found. (defalias 'web-beautify-command-not-found-message #[(program) "\301\302\"\207" [program format "%s not found. Install it with `npm -g install js-beautify`."] 3 (#$ . 468)]) #@52 Construct a format error message with BUFFER-NAME. (defalias 'web-beautify-format-error-message #[(buffer-name) "\301\302\"\207" [buffer-name format "Could not apply web-beautify. See %s to for details."] 3 (#$ . 693)]) #@50 Join PROGRAM with the constant js-beautify args. (defalias 'web-beautify-get-shell-command #[(program) "\302\303\304C \"\305#\207" [program web-beautify-args mapconcat identity append " "] 5 (#$ . 920)]) #@32 Reload mode to activate faces. (defalias 'web-beautify-reload #[nil "\301 \210\302\267\202\303 \207\304 \207\305\207" [major-mode deactivate-mark #s(hash-table size 2 test eq rehash-size 1.5 rehash-threshold 0.8125 purecopy t data (web-mode 9 js2-mode 12)) web-mode-reload js2-mode nil] 2 (#$ . 1131)]) #@62 By PROGRAM, format each line in the BEGINNING .. END region. (defalias 'web-beautify-format-region #[(program beginning end) "\306!\203E\307\310 !`\311 \312!\313 p\314\n\314&\315U\203; b\210\316\317\f\"\210\320\321!\210\322 \210\323\n!\202C\324 \210\320\325 !!-\207\320\326!!\207" [program output-buffer-name output-buffer previous-point previous-window-start shell-command executable-find "*Web Beautify Errors*" get-buffer-create window-start web-beautify-get-shell-command shell-command-on-region t 0 set-window-start nil message "Applied web-beautify." web-beautify-reload kill-buffer undo web-beautify-format-error-message web-beautify-command-not-found-message beginning end] 8 (#$ . 1443)]) #@52 By PROGRAM, format current buffer with EXTENSTION. (defalias 'web-beautify-format-buffer #[(program) "\301ed#\207" [program web-beautify-format-region] 4 (#$ . 2163)]) #@116 Format region if active, otherwise the current buffer. Formatting is done according to the html-beautify command. (defalias 'web-beautify-html #[nil "\301 \203 \302\303 \304 #\207\305 \207" [web-beautify-html-program use-region-p web-beautify-format-region region-beginning region-end web-beautify-html-buffer] 4 (#$ . 2339) nil]) #@67 Format the current buffer according to the html-beautify command. (defalias 'web-beautify-html-buffer #[nil "\301!\207" [web-beautify-html-program web-beautify-format-buffer] 2 (#$ . 2679)]) #@115 Format region if active, otherwise the current buffer. Formatting is done according to the css-beautify command. (defalias 'web-beautify-css #[nil "\301 \203 \302\303 \304 #\207\305 \207" [web-beautify-css-program use-region-p web-beautify-format-region region-beginning region-end web-beautify-css-buffer] 4 (#$ . 2878) nil]) #@66 Format the current buffer according to the css-beautify command. (defalias 'web-beautify-css-buffer #[nil "\301!\207" [web-beautify-css-program web-beautify-format-buffer] 2 (#$ . 3214)]) #@114 Format region if active, otherwise the current buffer. Formatting is done according to the js-beautify command. (defalias 'web-beautify-js #[nil "\301 \203 \302\303 \304 #\207\305 \207" [web-beautify-js-program use-region-p web-beautify-format-region region-beginning region-end web-beautify-js-buffer] 4 (#$ . 3410) nil]) #@65 Format the current buffer according to the js-beautify command. (defalias 'web-beautify-js-buffer #[nil "\301!\207" [web-beautify-js-program web-beautify-format-buffer] 2 (#$ . 3742)]) (provide 'web-beautify)