Browse Source

Clean-up the customisation options for edit-server frames.

Make customisations parameters boolean where appropriate. I've left
the defaults enabled so mode-line/menu-bar stay visible unless
customised away. This is mainly so new users don't get confused if
these things disappear when they first use the server.

Based on a patch from Wei Hu
Alex Bennee 15 năm trước cách đây
mục cha
commit
a62a8a6a59
1 tập tin đã thay đổi với 13 bổ sung12 xóa
  1. 13 12
      edit-server.el

+ 13 - 12
edit-server.el

@@ -38,11 +38,6 @@ localhost. This may present a security issue."
   :group 'edit-server
   :type 'boolean)
 
-(defcustom edit-server-new-frame t
-  "If not nil, edit each buffer in a new frame (and raise it)."
-  :group 'edit-server
-  :type 'boolean)
-
 (defcustom edit-server-verbose nil
   "If not nil, log connections and progress also to the echo area."
   :group 'edit-server
@@ -54,20 +49,26 @@ Current buffer holds the text that is about to be sent back to the client."
   :group 'edit-server
   :type 'hook)
 
+; frame options
+(defcustom edit-server-new-frame t
+  "If not nil, edit each buffer in a new frame (and raise it)."
+  :group 'edit-server
+  :type 'boolean)
+
 (defcustom edit-server-new-frame-minibuffer t
   "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."
+(defcustom edit-server-new-frame-menu-bar t
+  "Show the emacs frame's menu-bar if set to t; hide if nil."
   :group 'edit-server
-  :type 'integer)
+  :type 'boolean)
 
-(defcustom edit-server-new-frame-no-mode-line nil
-  "Hide the emacs frame's mode-line."
+(defcustom edit-server-new-frame-mode-line t
+  "Show the emacs frame's mode-line if set to t; hide if nil."
   :group 'edit-server
-  :type 'integer)
+  :type 'boolean)
 
 ;; Vars
 (defconst edit-server-process-buffer-name " *edit-server*"
@@ -291,7 +292,7 @@ If `edit-server-verbose' is non-nil, then STRING is also echoed to the message l
              nil))
       (if edit-server-new-frame
         (progn
-          (if edit-server-new-frame-no-mode-line
+          (if (not edit-server-new-frame-mode-line)
             (setq mode-line-format nil))
           (raise-frame edit-server-frame))
         (pop-to-buffer buffer)))))