# HG changeset patch # User Oleksandr Gavenko # Date 1489065089 -7200 # Node ID 4f24c53e6e38ede699a5b0005c6080aa444c793b # Parent 4f43f768473ff111a1c310668c15fbd84e1f5a0a Strip "my/" prefix. Require 'json' library. diff -r 4f43f768473f -r 4f24c53e6e38 spring-actuator.el --- a/spring-actuator.el Thu Mar 09 11:07:23 2017 +0200 +++ b/spring-actuator.el Thu Mar 09 15:11:29 2017 +0200 @@ -1,16 +1,18 @@ -(defvar my/spring-actuator-server-history nil) -(defvar my/spring-actuator-last-server "http://localhost:8080") -(defvar my/spring-actuator-path-history nil) -(defvar my/spring-actuator-path-completion +(require 'json) + +(defvar spring-actuator-server-history nil) +(defvar spring-actuator-last-server "http://localhost:8080") +(defvar spring-actuator-path-history nil) +(defvar spring-actuator-path-completion '("actuator" "auditevents" "autoconfig" "beans" "configprops" "dump" "env" "features" "flyway" "health" "heapdump" "info" "jolokia" "liquibase" "logfile" "loggers" "mappings" "metrics" "trace")) ;;;###autoload -(defun my/spring-actuator (server path) - (interactive (list (read-string "Server: " my/spring-actuator-last-server 'my/spring-actuator-server-history) - (completing-read "Path: " my/spring-actuator-path-completion nil nil "" 'my/spring-actuator-path-history))) - (setq my/spring-actuator-last-server server) +(defun spring-actuator (server path) + (interactive (list (read-string "Server: " spring-actuator-last-server 'spring-actuator-server-history) + (completing-read "Path: " spring-actuator-path-completion nil nil "" 'spring-actuator-path-history))) + (setq spring-actuator-last-server server) (let ( (bufname (format "actuator: %s" path)) ) (when (get-buffer bufname) (kill-buffer bufname)) @@ -26,3 +28,5 @@ (json-mode) (js-mode)) (setq-local js-indent-level 2))) + +(provide 'spring-actuator)