Browse Source

Merge remote branch 'wh5a/master'

Alex Bennee 15 years ago
parent
commit
c7931f307f
2 changed files with 34 additions and 2 deletions
  1. 10 0
      README
  2. 24 2
      edit-server.el

+ 10 - 0
README

@@ -19,6 +19,16 @@ at:
 As the edit server concept is fairly simple we will try and keep them
 compatible with each other.
 
+Customizing the look of Emacs
+=============================
+
+By default, Emacs opens up a new frame upon an edit request. All the
+UI elements are removed to better mimic a bare text box. You can
+customize the default behavior by `M-x customize-group [RET]
+edit-server [RET]`. Or you can set the variables' values directly in
+your ~/.emacs.
+
+
 How it works
 ============
 

+ 24 - 2
edit-server.el

@@ -48,6 +48,21 @@ Current buffer holds the text that is about to be sent back to the client."
   :group 'edit-server
   :type 'hook)
 
+(defcustom edit-server-new-frame-minibuffer nil
+  "Show the emacs frame's minibuffer if set to t; hide if nil."
+  :group 'edit-server
+  :type 'boolean)
+
+(defcustom edit-server-new-frame-menu-bar 0
+  "Show the emacs frame's menu-bar if set to 1; hide if 0."
+  :group 'edit-server
+  :type 'integer)
+
+(defcustom edit-server-new-frame-no-mode-line t
+  "Hide the emacs frame's mode-line."
+  :group 'edit-server
+  :type 'integer)
+
 ;; Vars
 (defconst edit-server-process-buffer-name " *edit-server*"
   "Template name of the edit-server process buffers.")
@@ -260,10 +275,17 @@ If `edit-server-verbose' is non-nil, then STRING is also echoed to the message l
       (set (make-local-variable 'edit-server-frame) 
            (if edit-server-new-frame
                (make-frame-on-display (getenv "DISPLAY")
-                 `((name . ,edit-server-new-frame-title) (width . ,edit-server-new-frame-width) (height . ,edit-server-new-frame-height)))
+                 `((name . ,edit-server-new-frame-title)
+                   (width . ,edit-server-new-frame-width)
+                   (height . ,edit-server-new-frame-height)
+                   (minibuffer . ,edit-server-new-frame-minibuffer)
+                   (menu-bar-lines . ,edit-server-new-frame-menu-bar)))
              nil))
       (if edit-server-new-frame
-          (raise-frame edit-server-frame)
+        (progn
+          (if edit-server-new-frame-no-mode-line
+            (setq mode-line-format nil))
+          (raise-frame edit-server-frame))
         (pop-to-buffer buffer)))))
 
 (defun edit-server-send-response (proc &optional body close)