emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/olivetti fd3d39d 006/134: Removed extraneous vars and f


From: Stefan Monnier
Subject: [elpa] externals/olivetti fd3d39d 006/134: Removed extraneous vars and fns
Date: Thu, 25 Apr 2019 09:57:14 -0400 (EDT)

branch: externals/olivetti
commit fd3d39d729300510bb70779c45f8c7477601d938
Author: Paul Rankin <address@hidden>
Commit: Paul Rankin <address@hidden>

    Removed extraneous vars and fns
---
 olivetti.el | 44 ++------------------------------------------
 1 file changed, 2 insertions(+), 42 deletions(-)

diff --git a/olivetti.el b/olivetti.el
index 1f6f306..4479e00 100644
--- a/olivetti.el
+++ b/olivetti.el
@@ -58,16 +58,6 @@ This option does not affect file contents."
   :type '(choice (integer 66) (float 0.5))
   :group 'olivetti)
 
-(defcustom olivetti-hide-menu-bar nil
-  "Turn off `menu-bar-mode'."
-  :type 'boolean
-  :group 'olivetti)
-
-(defcustom olivetti-hide-tool-bar t
-  "Turn off `tool-bar-mode'."
-  :type 'boolean
-  :group 'olivetti)
-
 (defcustom olivetti-hide-mode-line nil
   "Hide the mode line.
 Default is nil because this can cause display issues in console
@@ -75,11 +65,6 @@ mode."
   :type 'boolean
   :group 'olivetti)
 
-(defcustom olivetti-hide-fringes t
-  "Hide fringes."
-  :type 'boolean
-  :group 'olivetti)
-
 (defcustom olivetti-delete-selection t
   "Turn on `delete-selection-mode'."
   :type 'boolean
@@ -112,28 +97,7 @@ mode."
                 ((error "`olivetti-body-width' must be an integer or a 
floating point between 0.0 and 1.0"))))
          (margin
           (round (/ (- (window-total-width) width) 2))))
-    (set-window-margins (selected-window) margin margin))
-  (when olivetti-hide-fringes
-    (set-window-fringes (selected-window) 0 0 t)))
-
-;;; menu ===============================================================
-
-(defvar olivetti-mode-map
-  (make-sparse-keymap)
-  "Mode map for `olivetti-mode'.")
-
-(easy-menu-define olivetti-mode-menu olivetti-mode-map
-  "Menu for Olivetti Mode."
-  '("Olivetti"
-    ["Hide Menu Bar" ignore
-     :style toggle
-     :selected olivetti-hide-menu-bar]
-    ["Hide Tool Bar" ignore
-     :style toggle
-     :selected olivetti-hide-tool-bar]
-    ["Hide Mode Line" (olivetti-set-mode-line 'toggle)
-     :style toggle
-     :selected olivetti-hide-mode-line]))
+    (set-window-margins (selected-window) margin margin)))
 
 ;; mode definition =====================================================
 
@@ -158,10 +122,6 @@ hidden."
       (progn
         (olivetti-set-mode-line)
         (setq-local scroll-conservatively 101)
-        (when olivetti-hide-menu-bar
-          (menu-bar-mode 0))
-        (when olivetti-hide-tool-bar
-          (tool-bar-mode 0))
         (when olivetti-delete-selection
           (delete-selection-mode 1))
         (add-hook 'window-configuration-change-hook
@@ -170,7 +130,7 @@ hidden."
     (olivetti-set-mode-line 'exit)
     (remove-hook 'window-configuration-change-hook
                  'olivetti-set-environment t)
-    (set-window-margins nil nil)))
+    (redraw-frame (selected-frame))))
 
 (provide 'olivetti)
 ;;; olivetti.el ends here



reply via email to

[Prev in Thread] Current Thread [Next in Thread]