Permalink
Browse files

Add group stuff ... bleh.

  • Loading branch information...
1 parent a38b3fd commit 162d7213bd21137846023dab1a4e80969ea5155a @skeeto committed Oct 31, 2012
Showing with 29 additions and 12 deletions.
  1. +9 −2 skewer-mode.el
  2. +9 −5 skewer-proxy.el
  3. +11 −5 skewer-repl.el
View
@@ -57,6 +57,10 @@
(require 'js2-mode)
(require 'json)
+(defgroup skewer nil
+ "Live browser JavaScript interaction."
+ :group 'languages)
+
(defvar skewer-mode-map
(let ((map (make-sparse-keymap)))
(prog1 map
@@ -123,6 +127,7 @@ trust. These whitelisted functions are considered safe.")
(equal "success" (cdr (assoc 'status result))))
(define-derived-mode skewer-error-mode special-mode "skewer-error"
+ :group 'skewer
"Mode for displaying JavaScript errors returned by skewer-mode."
(setq truncate-lines t))
@@ -131,7 +136,8 @@ trust. These whitelisted functions are considered safe.")
:foreground "red" :underline t)
(((class color) (background dark))
:foreground "red" :underline t))
- "Face for JavaScript errors.")
+ "Face for JavaScript errors."
+ :group 'skewer)
(defun skewer--error (string)
(propertize string 'font-lock-face 'skewer-error-face))
@@ -259,7 +265,8 @@ waiting browser."
(define-minor-mode skewer-mode
"Minor mode for interacting with a browser."
:lighter " skewer"
- :keymap skewer-mode-map)
+ :keymap skewer-mode-map
+ :group 'skewer)
;;;###autoload
(add-hook 'js2-mode-hook 'skewer-mode)
View
@@ -22,18 +22,22 @@
(require 'skewer-mode)
-(defvar skewer-proxy-url "http://example.com"
- "Remote server for the silent proxy.")
+(defcustom skewer-proxy-url "http://example.com"
+ "Remote server for the silent proxy."
+ :type 'string
+ :group 'skewer)
+
+(defcustom skewer-inject t
+ "When T, skewer will attempt to modify pages to insert its script."
+ :type 'boolean
+ :group 'skewer)
(defvar skewer--orig-httpd/ (symbol-function 'httpd/)
"Original definition of the servlet at httpd/.")
(defvar skewer--enabled nil
"Current status of skewer-proxy.")
-(defvar skewer-inject t
- "When T, skewer will attempt to modify pages to insert its script.")
-
(defun skewer-proxy-servlet (proc p &rest args)
"Passes requests through to remote host at `httpd-proxy-url'."
(with-current-buffer (url-retrieve-synchronously (concat skewer-proxy-url p))
View
@@ -13,11 +13,15 @@
(require 'comint)
(require 'skewer-mode)
-(defvar skewer-repl-strict-p nil
- "When non-NIL, all REPL evaluations are done in strict mode.")
+(defcustom skewer-repl-strict-p nil
+ "When non-NIL, all REPL evaluations are done in strict mode."
+ :type 'boolean
+ :group 'skewer)
-(defvar skewer-repl-prompt "js> "
- "Prompt string for JavaScript REPL.")
+(defcustom skewer-repl-prompt "js> "
+ "Prompt string for JavaScript REPL."
+ :type 'string
+ :group 'skewer)
(defun skewer-repl-process ()
"Return the process for the skewer REPL."
@@ -28,10 +32,12 @@
:foreground "#77F")
(((class color) (background dark))
:foreground "#77F"))
- "Face for skewer.log() messages.")
+ "Face for skewer.log() messages."
+ :group 'skewer)
(define-derived-mode skewer-repl-mode comint-mode "js-REPL"
"Provide a REPL into the visiting browser."
+ :group 'skewer
:syntax-table emacs-lisp-mode-syntax-table
(setq comint-prompt-regexp (concat "^" (regexp-quote skewer-repl-prompt)))
(setq comint-input-sender 'skewer-input-sender)

0 comments on commit 162d721

Please sign in to comment.